BindingContext.BuildInnerChannelListener<TChannel> 方法

定义

生成用于侦听指定类型的通道的内部通道侦听器。

public:
generic <typename TChannel>
 where TChannel : class, System::ServiceModel::Channels::IChannel System::ServiceModel::Channels::IChannelListener<TChannel> ^ BuildInnerChannelListener();
public System.ServiceModel.Channels.IChannelListener<TChannel> BuildInnerChannelListener<TChannel> () where TChannel : class, System.ServiceModel.Channels.IChannel;
member this.BuildInnerChannelListener : unit -> System.ServiceModel.Channels.IChannelListener<'Channel (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)> (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Function BuildInnerChannelListener(Of TChannel As {Class, IChannel}) () As IChannelListener(Of TChannel)

类型参数

TChannel

内部通道侦听器侦听的 IChannel 对象的类型。

返回

类型为 IChannelListener<TChannel>IChannel,表示当前通道工厂的内部通道侦听器。

示例

CustomBinding binding = new CustomBinding();
BindingParameterCollection bpCol = new BindingParameterCollection();
BindingContext context = new BindingContext(binding, bpCol);
context.BuildInnerChannelListener<IDuplexChannel>();
Dim binding As New CustomBinding()
Dim bpCol As New BindingParameterCollection()
Dim context As New BindingContext(binding, bpCol)
context.BuildInnerChannelListener(Of IDuplexChannel)()

适用于