편집

다음을 통해 공유


MsmqTransportBindingElement.CanBuildChannelFactory<TChannel> Method

Definition

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

public:
generic <typename TChannel>
 override bool CanBuildChannelFactory(System::ServiceModel::Channels::BindingContext ^ context);
public override bool CanBuildChannelFactory<TChannel> (System.ServiceModel.Channels.BindingContext context);
override this.CanBuildChannelFactory : System.ServiceModel.Channels.BindingContext -> bool
Public Overrides Function CanBuildChannelFactory(Of TChannel) (context As BindingContext) As Boolean

Type Parameters

TChannel

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

Parameters

context
BindingContext

The BindingContext with which to build the channel factory.

Returns

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.

Examples

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

Applies to