次の方法で共有


ServiceDescriptionCollection.GetPortType メソッド

ServiceDescriptionCollection を検索し、コレクションに含まれた ServiceDescription インスタンスのいずれかのメンバである、指定した名前を持つ PortType を返します。

Public Function GetPortType( _
   ByVal name As XmlQualifiedName _) As PortType
[C#]
public PortType GetPortType(XmlQualifiedNamename);
[C++]
public: PortType* GetPortType(XmlQualifiedName* name);
[JScript]
public function GetPortType(
   name : XmlQualifiedName) : PortType;

パラメータ

戻り値

PortType

例外

例外の種類 条件
Exception 指定した PortType は、コレクション内のどの ServiceDescription インスタンスのメンバでもありません。

使用例

 
' Construct an XML qualified name.
Dim myXmlQualifiedName As _
   New XmlQualifiedName("MathServiceSoap", "http://tempuri2.org/")
' Get the PortType from the collection.
Dim myPort As PortType = myCollection.GetPortType(myXmlQualifiedName)

[C#] 
// Construct an XML qualified name.
XmlQualifiedName myXmlQualifiedName = 
   new XmlQualifiedName("MathServiceSoap","http://tempuri2.org/");
// Get the PortType from the collection.
PortType myPort = myCollection.GetPortType(myXmlQualifiedName);

[C++] 
// Construct an XML qualified name.
XmlQualifiedName* myXmlQualifiedName = 
   new XmlQualifiedName(S"MathServiceSoap", S"http://tempuri2.org/");

// Get the PortType from the collection.
myCollection->GetPortType(myXmlQualifiedName);

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

ServiceDescriptionCollection クラス | ServiceDescriptionCollection メンバ | System.Web.Services.Description 名前空間