ReliableSessionBindingElement::BuildChannelFactory<TChannel> Method (BindingContext^)
Returns a factory that creates a channel of a specified type that supports a reliable session.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
public: generic<typename TChannel> virtual IChannelFactory<TChannel>^ BuildChannelFactory( BindingContext^ context ) override
Parameters
- context
-
Type:
System.ServiceModel.Channels::BindingContext^
The BindingContext that contains the information required to build the factories that can produce channels of type TChannel.
Return Value
Type: System.ServiceModel.Channels::IChannelFactory<TChannel>^A IChannelFactory<TChannel> of type IChannel initialized from the context.
Type Parameters
- TChannel
The type of channel the factory builds.
| Exception | Condition |
|---|---|
| ArgumentException | TChannel is not supported. |
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 |
Available since 3.0