ServiceDescriptionCollection.GetMessage(XmlQualifiedName) 方法

定义

搜索 ServiceDescriptionCollection,然后返回具有指定名称的 Message(它是包含在该集合中的 ServiceDescription 实例之一的成员)。

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

参数

name
XmlQualifiedName

通过引用传递的 XmlQualifiedName,其 Name 属性由返回的 Message 共享。

返回

Message

具有指定名称的消息。

例外

指定的 Message 不是集合内任何 ServiceDescription 实例的成员。

示例

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

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

// Get the Message from the collection.
Message  myMessage = myCollection.GetMessage(myXmlQualifiedName);
' Construct an XML qualified name.
Dim myXmlQualifiedName As _
   New XmlQualifiedName("AddSoapIn", "http://tempuri2.org/")

' Get the Message from the collection.
Dim myMessage As Message = myCollection.GetMessage(myXmlQualifiedName)

适用于