OneWayBindingElement.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> 类型的 IChannel(从 context 中初始化)。

例外

contextnull

TChannel 类型不是 IInputChannel

注解

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

适用于