This documentation is archived and is not being maintained.
MimeContentBinding::Part Property
Visual Studio 2008
Gets or sets the name of the MessagePart to which the MimeContentBinding applies.
Assembly: System.Web.Services (in System.Web.Services.dll)
Property Value
Type: System::StringA 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 ); }
ServiceDescription* myServiceDescription =
ServiceDescription::Read(S"MimeContentSample_cpp.wsdl");
// Get the Binding.
Binding * myBinding = myServiceDescription->Bindings->Item[S"b1"];
// Get the first OperationBinding.
OperationBinding * myOperationBinding = myBinding->Operations->Item[0];
OutputBinding * myOutputBinding = myOperationBinding->Output;
ServiceDescriptionFormatExtensionCollection *
myServiceDescriptionFormatExtensionCollection =
myOutputBinding->Extensions;
// Find all MimeContentBinding objects in extensions.
MimeContentBinding* myMimeContentBindings[] = (MimeContentBinding* [])
myServiceDescriptionFormatExtensionCollection->FindAll(
__typeof(MimeContentBinding));
// Enumerate the array and display MimeContentBinding properties.
IEnumerator* myEnum = myMimeContentBindings->GetEnumerator();
while (myEnum->MoveNext())
{
MimeContentBinding* myMimeContentBinding =
__try_cast<MimeContentBinding*>(myEnum->Current);
Console::WriteLine(S"Type: {0}", myMimeContentBinding->Type);
Console::WriteLine(S"Part: {0}", myMimeContentBinding->Part);
}
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: