Redigera

Dela via


WSHttpBinding.CreateBindingElements Method

Definition

Returns an ordered collection of binding elements contained in the current binding.

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

Returns

The BindingElementCollection that contains the ordered stack of binding elements described by the WSHttpBinding binding.

Exceptions

The transport security mode set cannot provide the reliable session that has been enabled.

Examples

The following example shows how to obtain the BindingElementCollection that contains the ordered stack of binding elements described by WSHttpBinding binding.

WSHttpBinding wsHttpBinding = new WSHttpBinding();
BindingElementCollection beCollection = wsHttpBinding.CreateBindingElements();
Dim wsHttpBinding As New WSHttpBinding()
Dim beCollection As BindingElementCollection = wsHttpBinding.CreateBindingElements()

Remarks

The order of the binding elements is important. It reflects the order in which the protocol and transport channels are constructed and stacked.

Applies to