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.

MsmqTransportBindingElement::CanBuildChannelListener<TChannel> Method (BindingContext^)

 

Returns a Boolean value that indicates whether you can build a channel listener with the context provided.

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 with which to build the channel listener.

Return Value

Type: System::Boolean

true if you can build a channel listener with the context provided; otherwise, false.

The binding returns true only when TChannel is IInputChannel or IInputSessionChannel.

Type Parameters

TChannel

The channel type to be used to build the channel listener. Permitted channel types are IInputSessionChannel or a IInputChannel class.

if (transportBindingElement.CanBuildChannelListener<IInputChannel>(context))
{
    // Do something...
}

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