Share via


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

适用于