編輯

共用方式為


TransactionFlowBindingElement.BuildChannelFactory<TChannel> Method

Definition

Initializes a channel factory for producing channels of a specified type from a binding context.

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)

Type Parameters

TChannel

The channel type.

Parameters

context
BindingContext

The BindingContext that should be used to build the channel factory.

Returns

The IChannelFactory<TChannel> of type TChannel initialized from context.

Exceptions

context is null.

A channel factory for the specified channel type cannot be built.

Remarks

This method creates a channel factory that can be used to make outgoing channels of the specified type. This method is called by the infrastructure when building the channel stack. You should use it in your code only when you implement a custom binding element.

Applies to