Edytuj

Udostępnij za pośrednictwem


TransactionFlowBindingElement.BuildChannelListener<TChannel> Method

Definition

Initializes a channel listener for accepting channels of a specified type from the binding context.

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 channel type.

Parameters

context
BindingContext

The BindingContext that should be used to build the channel listener.

Returns

The IChannelListener<TChannel> of type TChannel initialized from context.

Exceptions

context is null.

A channel listener for the specified channel type cannot be built.

Remarks

This method creates a channel listener to receive messages for this binding.

This method is called by the infrastructure when building the channel. You should use it in your code only when you implement a custom binding element.

Applies to