语言

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)()

适用于