ServiceDescriptionCollection.GetService(XmlQualifiedName) Metoda

Definicja

Wyszukuje element ServiceDescriptionCollection i zwraca Service element z określoną nazwą, która jest elementem członkowskim jednego z ServiceDescription wystąpień zawartych w kolekcji.

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

Parametry

name
XmlQualifiedName

Element XmlQualifiedName, przekazany przez odwołanie, którego Name właściwość jest współużytkowana przez zwróconą Service wartość .

Zwraca

Service

Usługa o określonej nazwie.

Wyjątki

Określony Service element nie jest członkiem żadnych ServiceDescription wystąpień w kolekcji.

Przykłady

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

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

// Get the Service from the collection.
Service myService = myCollection.GetService(myXmlQualifiedName);
' Construct an XML qualified name.
Dim myXmlQualifiedName As _
   New XmlQualifiedName("MathService", "http://tempuri2.org/")

' Get the Service from the collection.
Dim myService As Service = myCollection.GetService(myXmlQualifiedName)

Dotyczy