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

返品

BasicHttpBindingによって記述されたバインド要素の順序付けられたスタックを含むBindingElementCollection

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

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

注釈

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

適用対象