MimeContentBinding::Part Property

 

Gets or sets the name of the MessagePart to which the MimeContentBinding applies.

Namespace:   System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

public:
property String^ Part {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

A string representing the name of the MessagePart with which the current MimeContentBinding is associated. The default value is an empty string ("").

ServiceDescription^ myServiceDescription = ServiceDescription::Read( "MimeContentSample_cpp.wsdl" );

// Get the Binding.
Binding^ myBinding = myServiceDescription->Bindings[ "b1" ];

// Get the first OperationBinding.
OperationBinding^ myOperationBinding = myBinding->Operations[ 0 ];
OutputBinding^ myOutputBinding = myOperationBinding->Output;
ServiceDescriptionFormatExtensionCollection ^ myServiceDescriptionFormatExtensionCollection = myOutputBinding->Extensions;

// Find all MimeContentBinding objects in extensions.
array<MimeContentBinding^>^myMimeContentBindings = (array<MimeContentBinding^>^)myServiceDescriptionFormatExtensionCollection->FindAll( MimeContentBinding::typeid );

// Enumerate the array and display MimeContentBinding properties.
IEnumerator^ myEnum = myMimeContentBindings->GetEnumerator();
while ( myEnum->MoveNext() )
{
   MimeContentBinding^ myMimeContentBinding = safe_cast<MimeContentBinding^>(myEnum->Current);
   Console::WriteLine( "Type: {0}", myMimeContentBinding->Type );
   Console::WriteLine( "Part: {0}", myMimeContentBinding->Part );
}

.NET Framework
Available since 1.1
Return to top
Show: