This documentation is archived and is not being maintained.

MimePart.Extensions Property

Gets the collection of MIME extensibility elements for the part of the MimeMultipartRelatedBinding of which the MimePart is a member.

[Visual Basic]
Public ReadOnly Property Extensions As _
   ServiceDescriptionFormatExtensionCollection
[C#]
public ServiceDescriptionFormatExtensionCollection Extensions
   {get;}
[C++]
public: __property ServiceDescriptionFormatExtensionCollection*
   get_Extensions();
[JScript]
public function get Extensions() :
   ServiceDescriptionFormatExtensionCollection;

Property Value

A ServiceDescriptionFormatExtensionCollection.

Remarks

This collection must have at least one member. If it has more than one member, the members are alternative MIME formats for the current MimePart. Members can be of the following types:

Each of these classes exposes a Part property specifying the MessagePart with which the MimePart is associated. If this collection has no members, the XML Web service will fail to generate a Web Services Description Language (WSDL) file when it is requested. For more information about how MIME extends WSDL, see the specification at http://www.w3.org/TR/wsdl/.

Example

[Visual Basic] 
' Create the OutputBinding.
Dim myOutputBinding As OutputBinding = myOperationBinding.Output
Dim myMimeXmlBinding As New MimeXmlBinding()
myMimeXmlBinding.Part = "body"

' Create the MimePart.
Dim myMimePart As New MimePart()
myMimePart.Extensions.Add(myMimeXmlBinding)
Dim myMimePartRelatedBinding As New MimeMultipartRelatedBinding()

' Add the MimePart to the MimePartRelatedBinding.
myMimePartRelatedBinding.Parts.Add(myMimePart)
myOutputBinding.Extensions.Add(myMimePartRelatedBinding)

[C#] 
// Create the OutputBinding.
OutputBinding myOutputBinding = myOperationBinding.Output;
MimeXmlBinding myMimeXmlBinding = new MimeXmlBinding();
myMimeXmlBinding.Part = "body";

// Create the MimePart.
MimePart myMimePart = new MimePart();
myMimePart.Extensions.Add(myMimeXmlBinding);
MimeMultipartRelatedBinding myMimePartRelatedBinding =
   new MimeMultipartRelatedBinding();

// Add the MimePart to the MimePartRelatedBinding.
myMimePartRelatedBinding.Parts.Add(myMimePart);
myOutputBinding.Extensions.Add(myMimePartRelatedBinding);

[C++] 
// Create the OutputBinding.
OutputBinding* myOutputBinding = myOperationBinding->Output;
MimeXmlBinding* myMimeXmlBinding = new MimeXmlBinding();
myMimeXmlBinding->Part = S"body";

// Create the MimePart.
MimePart* myMimePart = new MimePart();
myMimePart->Extensions->Add(myMimeXmlBinding);
MimeMultipartRelatedBinding* myMimePartRelatedBinding =
   new MimeMultipartRelatedBinding();

// Add the MimePart to the MimePartRelatedBinding.
myMimePartRelatedBinding->Parts->Add(myMimePart);
myOutputBinding->Extensions->Add(myMimePartRelatedBinding);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

MimePart Class | MimePart Members | System.Web.Services.Description Namespace

Show: