共用方式為


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)

適用於