BindingCollection.Add メソッド
指定した Binding を BindingCollection の末尾に追加します。
Public Function Add( _
ByVal binding As Binding _) As Integer
[C#]
public int Add(Bindingbinding);
[C++]
public: int Add(Binding* binding);
[JScript]
public function Add(
binding : Binding) : int;
パラメータ
- binding
コレクションに追加する Binding 。
戻り値
binding パラメータが追加された、0 から始まるインデックス番号。
使用例
Dim myServiceDescription As ServiceDescription = ServiceDescription.Read("MathService_input.wsdl")
Console.WriteLine(("Total Number of bindings defined are:" + myServiceDescription.Bindings.Count.ToString()))
myBinding = myServiceDescription.Bindings(0)
' Remove the first binding in the collection.
myServiceDescription.Bindings.Remove(myBinding)
Console.WriteLine(("Successfully removed binding " + myBinding.Name))
Console.WriteLine(("Total Number of bindings defined now are:" + myServiceDescription.Bindings.Count.ToString()))
myServiceDescription.Write("MathService_temp.wsdl")
' Add binding to the ServiceDescription instance.
myServiceDescription.Bindings.Add(myBinding)
[C#]
ServiceDescription myServiceDescription = ServiceDescription.Read("MathService_input.wsdl");
Console.WriteLine("Total Number of bindings defined are:" + myServiceDescription.Bindings.Count);
myBinding = myServiceDescription.Bindings[0];
// Remove the first binding in the collection.
myServiceDescription.Bindings.Remove(myBinding);
Console.WriteLine("Successfully removed binding " + myBinding.Name);
Console.WriteLine("Total Number of bindings defined now are:" + myServiceDescription.Bindings.Count);
myServiceDescription.Write("MathService_temp.wsdl");
// Add binding to the ServiceDescription instance.
myServiceDescription.Bindings.Add(myBinding);
[C++]
ServiceDescription * myServiceDescription = ServiceDescription::Read(S"MathService_input.wsdl");
Console::WriteLine(S"Total Number of bindings defined are: {0}", __box(myServiceDescription -> Bindings->Count));
myBinding = myServiceDescription -> Bindings->Item[0];
// Remove the first binding in the collection.
myServiceDescription -> Bindings -> Remove(myBinding);
Console::WriteLine(S"Successfully removed binding {0}", myBinding -> Name);
Console::WriteLine(S"Total Number of bindings defined now are: {0}", __box(myServiceDescription -> Bindings->Count));
myServiceDescription -> Write(S"MathService_temp.wsdl");
// Add binding to the ServiceDescription instance.
myServiceDescription -> Bindings->Add(myBinding);
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
BindingCollection クラス | BindingCollection メンバ | System.Web.Services.Description 名前空間