ServiceDescriptionCollection.GetPortType(XmlQualifiedName) Methode

Definition

Durchsucht und ServiceDescriptionCollection gibt den PortType angegebenen Namen zurück, der ein Element einer der ServiceDescription In der Auflistung enthaltenen Instanzen ist.

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

Parameter

name
XmlQualifiedName

Der XmlQualifiedNamevom Verweis übergebene Wert, dessen Name Eigenschaft von der PortType zurückgegebenen Eigenschaft gemeinsam verwendet wird.

Gibt zurück

Der PortType mit dem angegebenen Namen.

Ausnahmen

Das angegebene PortType Element ist kein Element von ServiceDescription Instanzen innerhalb der Auflistung.

Beispiele

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

// Get the PortType from the collection.
myCollection->GetPortType( myXmlQualifiedName );
// Construct an XML qualified name.
XmlQualifiedName myXmlQualifiedName =
   new XmlQualifiedName("MathServiceSoap","http://tempuri2.org/");
// Get the PortType from the collection.
PortType myPort = myCollection.GetPortType(myXmlQualifiedName);
' 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)

Gilt für: