Export (0) Print
Expand All

SecurityBindingElement.BuildChannelFactory<TChannel> Method

Creates a channel factory based on the SecurityBindingElement settings and the binding context passed in. The channel factory created is a SOAP message security channel factory, which internally has a reference to the channel factory that corresponds to the binding context, (which includes the transport channel factory).

Namespace:  System.ServiceModel.Channels
Assemblies:   System.ServiceModel.Security (in System.ServiceModel.Security.dll)
  System.ServiceModel (in System.ServiceModel.dll)

public override IChannelFactory<TChannel> BuildChannelFactory<TChannel>(
	BindingContext context
)

Type Parameters

TChannel

The type of channel factory.

Return Value

Type: System.ServiceModel.Channels.IChannelFactory<TChannel>
A channel factory based on the SecurityBindingElement settings and the binding context passed in.

ExceptionCondition
ArgumentNullException

context is null.

ArgumentException

A channel of type TChannel is not supported.

The channel factory created is a SOAP message security channel factory, which internally has a reference to the channel factory that corresponds to the binding context, (which includes the transport channel factory).

This method does parameter error-checking, and then calls BuildChannelFactoryCore<TChannel>. That method, when implemented in a derived class, creates a channel factory, which is used to create a channel that processes outgoing messages for this binding.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft