Redigera

Dela via


ReliableSessionBindingElement.BuildChannelListener<TChannel> Method

Definition

Returns a listener that accepts a channel of a specified type that supports a reliable session.

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 IChannel that the listener is built to accept.

Parameters

context
BindingContext

The BindingContext that contains the information required to build the listeners that can accept channels of type TChannel.

Returns

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

Exceptions

TChannel is not supported.

Remarks

The IChannel accepted by the listener is of type TChannel. The types of TChannel supported on the server that hosts the service is dependent of the types of underlying channels used to connect to the client. The following table indicates what reliable session channel types are supported as a function of the underlying channels.

Support for Reliable Session TChannel Types by Underlying Channel Types IReplyChannel IReplySessionChannel IDuplexChannel IDuplexSessionChannel
IInputSessionChannel Yes Yes Yes Yes
IReplySessionChannel Yes Yes No No
IDuplexSessionChannel No No Yes Yes

Applies to