PeerCustomResolverBindingElement.BuildChannelFactory<TChannel>(BindingContext) 方法

定义

创建一个通道工厂,该工厂可创建用于发送消息的通道。Creates a channel factory that can be used to create a channel for sending messages.

public:
generic <typename TChannel>
 override System::ServiceModel::Channels::IChannelFactory<TChannel> ^ BuildChannelFactory(System::ServiceModel::Channels::BindingContext ^ context);
public override System.ServiceModel.Channels.IChannelFactory<TChannel> BuildChannelFactory<TChannel> (System.ServiceModel.Channels.BindingContext context);
override this.BuildChannelFactory : System.ServiceModel.Channels.BindingContext -> System.ServiceModel.Channels.IChannelFactory<'Channel>
Public Overrides Function BuildChannelFactory(Of TChannel) (context As BindingContext) As IChannelFactory(Of TChannel)

类型参数

TChannel

要生成的通道类型。The type of channel to produce.

参数

context
BindingContext

BindingContext,指定通道工厂的绑定上下文。BindingContext that specifies the binding context for the channel factory.

返回

IChannelFactory<TChannel>

IChannelFactory,包含指定类型的新通道工厂。IChannelFactory that contains the new channel factory of the specified type.

注解

此方法可用于获取通道工厂,以基于传输绑定元素的配置发送消息。This method can be used to get a channel factory for sending messages based on the configuration of the transport binding element.

适用于