WindowsStreamSecurityBindingElement.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

通道侦听器的类型。

参数

context
BindingContext

BindingContext 成员,描述创建通道侦听器所需的绑定、行为、协定和其他信息。

返回

IChannelListener<TChannel>

返回指定类型的通道侦听器。 此方法会将此类实例添加到 BindingParameters 并委托给生成方法 BuildInnerChannelListener<TChannel>()

例外

context 不能为 null

注解

此方法可创建通道侦听器,该侦听器用于创建将为此绑定处理传入消息的通道。

适用于