MimeContentBinding.Namespace Поле
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Задает URI для пространства имен XML класса MimeContentBinding. Это поле является константой.
public: System::String ^ Namespace;
public const string Namespace;
val mutable Namespace : string
Public Const Namespace As 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 );
}
Console::WriteLine( "Namespace: {0}", MimeContentBinding::Namespace );
ServiceDescription myServiceDescription =
ServiceDescription.Read("MimeContentSample_cs.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.
MimeContentBinding[] myMimeContentBindings = (MimeContentBinding[])
myServiceDescriptionFormatExtensionCollection.FindAll(
typeof(MimeContentBinding));
// Enumerate the array and display MimeContentBinding properties.
foreach(MimeContentBinding myMimeContentBinding in
myMimeContentBindings)
{
Console.WriteLine("Type: " + myMimeContentBinding.Type);
Console.WriteLine("Part: " + myMimeContentBinding.Part);
}
Console.WriteLine("Namespace: " + MimeContentBinding.Namespace);
Dim myServiceDescription As ServiceDescription = _
ServiceDescription.Read ("MimeContentSample_vb.wsdl")
' Get the Binding.
Dim myBinding As Binding = myServiceDescription.Bindings("b1")
' Get the first OperationBinding.
Dim myOperationBinding As OperationBinding = myBinding.Operations(0)
Dim myOutputBinding As OutputBinding = myOperationBinding.Output
Dim myServiceDescriptionFormatExtensionCollection As _
ServiceDescriptionFormatExtensionCollection = _
myOutputBinding.Extensions
' Find all MimeContentBinding objects in extensions.
Dim myMimeContentBindings As MimeContentBinding() = _
CType(myServiceDescriptionFormatExtensionCollection.FindAll( _
GetType(MimeContentBinding)), MimeContentBinding())
' Enumerate the array and display MimeContentBinding properties.
Dim myMimeContentBinding As MimeContentBinding
For Each myMimeContentBinding In myMimeContentBindings
Console.WriteLine("Type: " & myMimeContentBinding.Type)
Console.WriteLine("Part: " & myMimeContentBinding.Part)
Next myMimeContentBinding
Console.WriteLine("Namespace: " & MimeContentBinding.Namespace)