SecurityBindingElement.BuildChannelFactory<TChannel> 方法

定义

基于传入的设置 SecurityBindingElement 和绑定上下文创建通道工厂。 创建的通道工厂是 SOAP 消息安全通道工厂,该工厂在内部具有对与绑定上下文对应的通道工厂的引用(包括传输通道工厂)。

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

通道工厂的类型。

参数

返回

基于 SecurityBindingElement 传入的设置和绑定上下文的通道工厂。

例外

contextnull

不支持类型 TChannel 通道。

注解

创建的通道工厂是 SOAP 消息安全通道工厂,该工厂在内部具有对与绑定上下文对应的通道工厂的引用(包括传输通道工厂)。

此方法执行参数错误检查,然后调用 BuildChannelFactoryCore。 此方法在派生类中实现时,会创建通道工厂,该工厂用于创建处理此绑定传出消息的通道。

适用于