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

 

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

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

Return Value

Type: System::Boolean

true if you can build a channel factory with the context provided; otherwise, false. The binding element returns true only when TChannel is IOutputChannel or IOutputSessionChannel.

Type Parameters

TChannel

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

if (transportBindingElement.CanBuildChannelFactory<IOutputChannel>(context))
{
    // Do something...
}

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