TransactionFlowBindingElement.CanBuildChannelListener<TChannel> Method

Definition

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

public:
generic <typename TChannel>
 where TChannel : class, System::ServiceModel::Channels::IChannel override bool CanBuildChannelListener(System::ServiceModel::Channels::BindingContext ^ context);
public override bool CanBuildChannelListener<TChannel> (System.ServiceModel.Channels.BindingContext context) where TChannel : class, System.ServiceModel.Channels.IChannel;
override this.CanBuildChannelListener : System.ServiceModel.Channels.BindingContext -> bool (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Overrides Function CanBuildChannelListener(Of TChannel As {Class, IChannel}) (context As BindingContext) As Boolean

Type Parameters

TChannel

The channel type.

Parameters

context
BindingContext

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

Returns

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

Exceptions

context is null.

Remarks

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 throws an exception if it cannot build a channel listener for the specified channel type.

Applies to