SALES: 1-800-867-1380

HttpRelayTransportBindingElement.CanBuildChannelListener<TChannel> Method

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

Namespace:  Microsoft.ServiceBus
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public override bool CanBuildChannelListener<TChannel>(
	BindingContext context
where TChannel : class, IChannel

Type Parameters


The type of channel the listener accepts.


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

Return Value

Type: System.Boolean
true if the IChannelListener<TChannel> of type IChannel can be built by the binding element; otherwise, false.


context is null.

Use this method if you want to check that the channel listener for channels of type TChannel can be built for the context provided before attempting to build the listener. Alternatively, build the channel listener by calling BuildChannelListener<TChannel> and catch the exception generated if it cannot be built.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft