Message.Parts Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the collection of the MessagePart objects contained in the Message.
public:
property System::Web::Services::Description::MessagePartCollection ^ Parts { System::Web::Services::Description::MessagePartCollection ^ get(); };
public System.Web.Services.Description.MessagePartCollection Parts { get; }
member this.Parts : System.Web.Services.Description.MessagePartCollection
Public ReadOnly Property Parts As MessagePartCollection
Property Value
Examples
The following example demonstrates a typical use of the Parts property.
// Creates a Message with name = messageName having one MessagePart
// with name = partName.
public:
static Message^ CreateMessage( String^ messageName, String^ partName, String^ element, String^ targetNamespace )
{
Message^ myMessage = gcnew Message;
myMessage->Name = messageName;
MessagePart^ myMessagePart = gcnew MessagePart;
myMessagePart->Name = partName;
myMessagePart->Element = gcnew XmlQualifiedName( element,targetNamespace );
myMessage->Parts->Add( myMessagePart );
return myMessage;
}
// Creates a Message with name = messageName having one MessagePart
// with name = partName.
public static Message CreateMessage(string messageName,string partName,
string element,string targetNamespace)
{
Message myMessage = new Message();
myMessage.Name = messageName;
MessagePart myMessagePart = new MessagePart();
myMessagePart.Name = partName;
myMessagePart.Element = new XmlQualifiedName(element,targetNamespace);
myMessage.Parts.Add(myMessagePart);
return myMessage;
}
' Creates a Message with name = messageName having one MessagePart
' with name = partName.
Public Shared Function CreateMessage(messageName As String, _
partName As String, element As String, targetNamespace As String) _
As Message
Dim myMessage As New Message()
myMessage.Name = messageName
Dim myMessagePart As New MessagePart()
myMessagePart.Name = partName
myMessagePart.Element = New XmlQualifiedName(element, targetNamespace)
myMessage.Parts.Add(myMessagePart)
Return myMessage
End Function 'CreateMessage
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET