MsmqTransportBindingElement::CanBuildChannelFactory<TChannel> Method (BindingContext^)
Returns a Boolean value that indicates whether you can build a channel factory with the context provided.
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::Booleantrue 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... }
Available since 3.0