ReliableSessionBindingElement.BuildChannelFactory<TChannel> Method
Returns a factory that creates a channel of a specified type that supports a reliable session.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
public override IChannelFactory<TChannel> BuildChannelFactory<TChannel>( BindingContext context )
Type Parameters
- TChannel
The type of channel the factory builds.
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.
| 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 |
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.