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::CanBuildChannelListener<TChannel> Method (BindingContext^)

 

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

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

public:
generic<typename TChannel>
where TChannel : ref class, IChannel
virtual bool CanBuildChannelListener(
	BindingContext^ context
) override

Parameters

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

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

Return Value

Type: System::Boolean

true if a channel listener 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 listener for channels of type of TChannel can be built for the specified context, before attempting to actually build the listener. Note that BuildChannelListener<TChannel> throws an exception if it cannot build a channel listener for the specified channel type.

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