BindingContext.BuildInnerChannelListener<TChannel> 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
生成用于侦听指定类型的通道的内部通道侦听器。
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)()