แก้ไข

แชร์ผ่าน


SecurityBindingElement.BuildChannelListener<TChannel> Method

Definition

Creates a channel listener based on the SecurityBindingElement settings and the binding context passed in.

public:
generic <typename TChannel>
 where TChannel : class, System::ServiceModel::Channels::IChannel override System::ServiceModel::Channels::IChannelListener<TChannel> ^ BuildChannelListener(System::ServiceModel::Channels::BindingContext ^ context);
public override System.ServiceModel.Channels.IChannelListener<TChannel> BuildChannelListener<TChannel> (System.ServiceModel.Channels.BindingContext context) where TChannel : class, System.ServiceModel.Channels.IChannel;
override this.BuildChannelListener : System.ServiceModel.Channels.BindingContext -> System.ServiceModel.Channels.IChannelListener<'Channel (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)> (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Overrides Function BuildChannelListener(Of TChannel As {Class, IChannel}) (context As BindingContext) As IChannelListener(Of TChannel)

Type Parameters

TChannel

The type of channel listener.

Parameters

Returns

A channel listener based on the SecurityBindingElement settings and the binding context passed in.

Exceptions

context is null.

A channel of type TChannel is not supported.

Remarks

The channel factory created is a SOAP message security channel listener, which internally has a reference to the channel listener that corresponds to the binding context, which includes the transport channel listener.

This method does parameter error-checking, and then calls BuildChannelListenerCore. That method, when implemented in a derived class, creates a channel listener, which is used to create a channel that processes incoming messages for this binding.

Applies to