語言

ServiceDescriptionCollection.GetBinding(XmlQualifiedName) 方法

定義

搜尋 並 ServiceDescriptionCollection 回傳指定名稱的 , Binding 該名稱是集合中某 ServiceDescription 個實例的成員。

public:
 System::Web::Services::Description::Binding ^ GetBinding(System::Xml::XmlQualifiedName ^ name);
public System.Web.Services.Description.Binding GetBinding(System.Xml.XmlQualifiedName name);
member this.GetBinding : System.Xml.XmlQualifiedName -> System.Web.Services.Description.Binding
Public Function GetBinding (name As XmlQualifiedName) As Binding

參數

name
XmlQualifiedName

一個XmlQualifiedNameName屬性用於檢索實Binding例的物件。

傳回

那個指定名稱的綁定。

例外狀況

指定的 Binding 不屬於集合中的任何 ServiceDescription 實例。

範例

// Construct an XML qualified name.
XmlQualifiedName^ myXmlQualifiedName =
   gcnew XmlQualifiedName( "MathServiceSoap","http://tempuri2.org/" );

// Get the Binding from the collection.
myCollection->GetBinding( myXmlQualifiedName );
// Construct an XML qualified name.
XmlQualifiedName myXmlQualifiedName =
   new XmlQualifiedName("MathServiceSoap", "http://tempuri2.org/");

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

' Get the Binding from the collection.
Dim myBinding As Binding = _
   myCollection.GetBinding(myXmlQualifiedName)

適用於