CompositeDuplexBindingElement.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<TChannel>,可以接受 TChannel 类型的复合双工通道。

例外

contextnull

TChannel 的类型不为 IInputChannel,不受支持。

注解

生成上下文需要 IInputChannelTChannel

适用于