편집

다음을 통해 공유


ServiceDescriptionCollection.GetBinding(XmlQualifiedName) Method

Definition

Searches the ServiceDescriptionCollection and returns the Binding with the specified name that is a member of one of the ServiceDescription instances contained in the collection.

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

Parameters

name
XmlQualifiedName

An XmlQualifiedName whose Name property is used to retrieve a Binding instance.

Returns

The binding with the specified name.

Exceptions

The specified Binding is not a member of any ServiceDescription instances within the collection.

Examples

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

Applies to