PeerCustomResolverBindingElement.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,指定通道侦听器的绑定上下文。

返回

IChannelListener,包含指定类型的新通道侦听器。

注解

此方法可用于获取通道侦听器,以基于传输绑定元素的配置接收消息。

适用于