ServiceDescriptionCollection.GetService(XmlQualifiedName) Method

Definition

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

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

Parameters

name
XmlQualifiedName

The XmlQualifiedName, passed by reference, whose Name property is shared by the Service returned.

Returns

The service with the specified name.

Exceptions

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

Examples

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

Applies to