Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TransactionFlowBindingElement::CanBuildChannelFactory<TChannel> Method (BindingContext^)

 

Returns a value that indicates whether the specified binding context can build a channel factory for producing channels of a specified type.

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

public:
generic<typename TChannel>
virtual bool CanBuildChannelFactory(
	BindingContext^ context
) override

Parameters

context
Type: System.ServiceModel.Channels::BindingContext^

The BindingContext that should be used to determine if a channel factory can be built.

Return Value

Type: System::Boolean

true if a channel factory for the specified type of channel can be built from context; otherwise, false.

Type Parameters

TChannel

The channel type.

Exception Condition
ArgumentNullException

context is null.

You should call this method to check that the channel factory for channels of type TChannel can be built for the specified context, before attempting to actually build the factory. Note that BuildChannelFactory<TChannel> throws an exception if it cannot build a channel factory for the specified channel type.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft