ServiceDescriptionCollection.GetService(XmlQualifiedName) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
搜索 ServiceDescriptionCollection,然后返回具有指定名称的 Service(它是包含在该集合中的 ServiceDescription 实例之一的成员)。
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
参数
- name
- XmlQualifiedName
通过引用传递的 XmlQualifiedName,其 Name 属性由返回的 Service 共享。
返回
指定名称的服务。
例外
指定的 Service
不是集合内任何 ServiceDescription 实例的成员。
示例
// 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)