BuildChannelFactory(TChannel) Method

SecurityBindingElement.BuildChannelFactory(Of TChannel) Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)

'Declaration
Public Overrides Function BuildChannelFactory(Of TChannel) ( _
	context As BindingContext _
) As IChannelFactory(Of TChannel)

Type Parameters

TChannel

Type of channel factory.

ExceptionCondition
ArgumentNullException

context is Nothing.

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(Of 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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft