BindingContext.BuildInnerChannelFactory<TChannel> 方法

定义

在当前通道工厂之下为指定类型的通道生成内部通道工厂。

public:
generic <typename TChannel>
 System::ServiceModel::Channels::IChannelFactory<TChannel> ^ BuildInnerChannelFactory();
public System.ServiceModel.Channels.IChannelFactory<TChannel> BuildInnerChannelFactory<TChannel> ();
member this.BuildInnerChannelFactory : unit -> System.ServiceModel.Channels.IChannelFactory<'Channel>
Public Function BuildInnerChannelFactory(Of TChannel) () As IChannelFactory(Of TChannel)

类型参数

TChannel

内部通道工厂生成的 IChannel 对象的类型。

返回

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

示例

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

适用于