BasicHttpBinding.CreateBindingElements メソッド

定義

現在のバインディングに含まれるバインド要素の順序付けられたコレクションを作成して返します。

public:
 override System::ServiceModel::Channels::BindingElementCollection ^ CreateBindingElements();
public override System.ServiceModel.Channels.BindingElementCollection CreateBindingElements ();
override this.CreateBindingElements : unit -> System.ServiceModel.Channels.BindingElementCollection
Public Overrides Function CreateBindingElements () As BindingElementCollection

戻り値

BindingElementCollection により記述されたバインディング要素の順序付けられたスタックを含む BasicHttpBinding

次の例では、現在のバインドに含まれるバインド要素の順序付けられたコレクションを作成します。

BasicHttpBinding binding = new BasicHttpBinding();
binding.Name = "binding1";
binding.Namespace = "http:\\My.ServiceModel.Samples";
BindingElementCollection elements = binding.CreateBindingElements();

注釈

バインド要素の順序は重要です。 これは、プロトコルおよびトランスポート チャネルが構築され、スタックされる順序を反映します。 バインド要素のこのコレクションは新しいコレクションであり、変更できます。また、CustomBinding を作成するために使用できます。

適用対象