語言

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 不屬於集合中的任何 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)

適用於