ReliableSessionBindingElement.BuildChannelListener<TChannel> Метод

Определение

Возвращает прослушиватель, принимающий канал заданного типа, который поддерживает надежный сеанс.

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)

Параметры типа

TChannel

Объект IChannel, который должен принимать прослушиватель.

Параметры

context
BindingContext

Объект BindingContext, содержащий сведения, необходимые для создания прослушивателей, которые могут принимать каналы типа TChannel.

Возвращаемое значение

Объект IChannelListener<TChannel> типа IChannel, инициализированный из параметра context.

Исключения

Тип TChannel не поддерживается.

Комментарии

Объект IChannel, принимаемый прослушивателем, принадлежит к типу TChannel. Типы TChannel, поддерживаемые на сервере, где расположена служба, зависят от типов базовых каналов, используемых для подключения к клиенту. Следующая таблица показывает, какие типы каналов надежных сеансов поддерживаются, в зависимости от базовых каналов.

Поддержка типов TChannel надежных сеансов для базовых типов каналов IReplyChannel IReplySessionChannel IDuplexChannel IDuplexSessionChannel
IInputSessionChannel Да Да Да Да
IReplySessionChannel Да Да Нет нет
IDuplexSessionChannel нет Нет Да Да

Применяется к