SecurityBindingElement::BuildChannelFactory<TChannel> Method (BindingContext^)

 

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
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public:
generic<typename TChannel>
virtual IChannelFactory<TChannel>^ BuildChannelFactory(
	BindingContext^ context
) override

Return Value

Type: System.ServiceModel.Channels::IChannelFactory<TChannel>^

A channel factory based on the SecurityBindingElement settings and the binding context passed in.

Type Parameters

TChannel

The type of channel factory.

Exception Condition
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.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: