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).
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.
Parameters
- context
- Type: System.ServiceModel.Channels.BindingContext
The BindingContext.
| Exception | Condition |
|---|---|
| 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.