MsmqTransportBindingElement.CanBuildChannelListener<TChannel> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a Boolean value that indicates whether you can build a channel listener with the context provided.
public:
generic <typename TChannel>
where TChannel : class, System::ServiceModel::Channels::IChannel override bool CanBuildChannelListener(System::ServiceModel::Channels::BindingContext ^ context);
public override bool CanBuildChannelListener<TChannel> (System.ServiceModel.Channels.BindingContext context) where TChannel : class, System.ServiceModel.Channels.IChannel;
override this.CanBuildChannelListener : System.ServiceModel.Channels.BindingContext -> bool (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Overrides Function CanBuildChannelListener(Of TChannel As {Class, IChannel}) (context As BindingContext) As Boolean
Type Parameters
- TChannel
The channel type to be used to build the channel listener. Permitted channel types are IInputSessionChannel or a IInputChannel class.
Parameters
- context
- BindingContext
The BindingContext with which to build the channel listener.
Returns
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.
Examples
if (transportBindingElement.CanBuildChannelListener<IInputChannel>(context))
{
// Do something...
}