Редагувати

Поділитися через


ReliableSessionBindingElement.BuildChannelFactory<TChannel> Method

Definition

Returns a factory that creates a channel of a specified type that supports a reliable session.

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 type of channel the factory builds.

Parameters

context
BindingContext

The BindingContext that contains the information required to build the factories that can produce channels of type TChannel.

Returns

A IChannelFactory<TChannel> of type IChannel initialized from the context.

Exceptions

TChannel is not supported.

Remarks

The IChannel produced by the factory is of type TChannel. The types of TChannel supported on the client is dependent of the types of underlying channels that connect to the service. The following table indicates what reliable session channel types are supported as a function of the underlying channels.

Support for Reliable Session TChannel Types by Underlying Channel Types IRequestChannel IRequestSessionChannel IDuplexChannel IDuplexSessionChannel
IOutputSessionChannel Yes Yes Yes Yes
IRequestSessionChannel Yes Yes No No
IDuplexSessionChannel No No Yes Yes

Applies to