CanBuildChannelFactory(TChannel) Method
Collapse the table of content
Expand the table of content

BindingElement.CanBuildChannelFactory(Of TChannel) Method

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

Returns a value that indicates whether the binding element can build a channel factory for a specific type of channel.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

'Declaration
Public Overridable Function CanBuildChannelFactory(Of TChannel) ( _
	context As BindingContext _
) As Boolean

Type Parameters

TChannel

The type of channel the channel factory produces.

Parameters

context
Type: System.ServiceModel.Channels.BindingContext
The BindingContext that provides context for the binding element.

Return Value

Type: System.Boolean
true if the IChannelFactory(Of TChannel) of type TChannel can be built by the binding element; otherwise, false.

ExceptionCondition
ArgumentNullException

context is Nothing.

Use this method if you want to check that the channel factory for channels of type TChannel can be build for the context provided before attempting to build the factory. Alternatively, build the channel factory by calling BuildChannelFactory(Of TChannel) and catch the exception generated if it cannot be built.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft