Edit

Share via


PeerTransportBindingElement.BuildChannelListener<TChannel> Method

Definition

Creates a channel listener of the specified type for receiving messages.

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

IChannel that specifies the type of the channels to produce.

Parameters

context
BindingContext

BindingContext that specifies the binding context for the channel listener.

Returns

IChannelListener that contains the new channel listener of the specified type.

Exceptions

The context parameter is set to null.

The channel type indicated by this binding context is not supported.

Remarks

This method can be used to get a channel listener for receiving messages based on the configuration of the transport binding element.

Applies to