SoapHeaderBinding.MapToProperty プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
SoapHeaderBinding インスタンスを、生成されたプロキシ クラスの特定のプロパティに割り当てるかどうかを示す値を取得または設定します。
public:
property bool MapToProperty { bool get(); void set(bool value); };
public bool MapToProperty { get; set; }
member this.MapToProperty : bool with get, set
Public Property MapToProperty As Boolean
プロパティ値
SoapHeaderBinding を特定のプロパティに割り当てる場合は true
。それ以外の場合は false
。
例
// Read from an existing wsdl file.
ServiceDescription^ myServiceDescription = ServiceDescription::Read( "MapToProperty_cpp.wsdl" );
// Get the existing binding
Binding^ myBinding = myServiceDescription->Bindings[ "MyWebServiceSoap" ];
OperationBinding^ myOperationBinding = (OperationBinding^)(myBinding->Operations[ 0 ]);
InputBinding^ myInputBinding = myOperationBinding->Input;
// Get the 'SoapHeaderBinding' instance from 'myInputBinding'.
SoapHeaderBinding^ mySoapHeaderBinding = (SoapHeaderBinding^)(myInputBinding->Extensions[ 1 ]);
if ( mySoapHeaderBinding->MapToProperty )
Console::WriteLine( "'SoapHeaderBinding' instance is mapped to a specific property in proxy generated class" );
else
Console::WriteLine( "'SoapHeaderBinding' instance is not mapped to a specific property in proxy generated class" );
// Read from an existing wsdl file.
ServiceDescription myServiceDescription =
ServiceDescription.Read("MapToProperty_cs.wsdl");
// Get the existing binding
Binding myBinding=myServiceDescription.Bindings["MyWebServiceSoap"];
OperationBinding myOperationBinding =
(OperationBinding)myBinding.Operations[0];
InputBinding myInputBinding = myOperationBinding.Input;
// Get the 'SoapHeaderBinding' instance from 'myInputBinding'.
SoapHeaderBinding mySoapHeaderBinding =
(SoapHeaderBinding)myInputBinding.Extensions[1];
if(mySoapHeaderBinding.MapToProperty)
{
Console.WriteLine("'SoapHeaderBinding' instance is mapped to a "+
"specific property in proxy generated class");
}
else
{
Console.WriteLine("'SoapHeaderBinding' instance is not mapped to "+
"a specific property in proxy generated class");
}
' Read from an existing wsdl file.
Dim myServiceDescription As ServiceDescription = ServiceDescription.Read( _
"MapToProperty_vb.wsdl")
' Get the existing binding
Dim myBinding As Binding = myServiceDescription.Bindings("MyWebServiceSoap")
Dim myOperationBinding As OperationBinding = CType(myBinding.Operations(0), _
OperationBinding)
Dim myInputBinding As InputBinding = myOperationBinding.Input
' Get the 'SoapHeaderBinding' instance from 'myInputBinding'.
Dim mySoapHeaderBinding As SoapHeaderBinding = CType(myInputBinding.Extensions(1), _
SoapHeaderBinding)
If mySoapHeaderBinding.MapToProperty Then
Console.WriteLine("'SoapHeaderBinding' instance is mapped to a " & _
"specific property in proxy generated class")
Else
Console.WriteLine("'SoapHeaderBinding' instance is not mapped to " & _
"a specific property in proxy generated class")
End If
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET