ServiceDescriptionCollection.GetBinding(XmlQualifiedName) Methode

Definition

Durchsucht die ServiceDescriptionCollection und gibt das Binding mit dem angegebenen Namen zurück, das ein Member einer der in der Auflistung enthaltenen ServiceDescription-Instanzen ist.

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

Parameter

name
XmlQualifiedName

Ein XmlQualifiedName, mit dessen Name-Eigenschaft eine Binding-Instanz abgerufen wird.

Gibt zurück

Die Bindung mit dem angegebenen Namen.

Ausnahmen

Das angegebene Binding ist kein Member einer der ServiceDescription-Instanzen in der Auflistung.

Beispiele

// 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)

Gilt für: