แก้ไข

แชร์ผ่าน


BindingContext.CanBuildInnerChannelListener<TChannel> Method

Definition

Returns a value that indicates whether the inner channel listener can be built to listen for a specified type of channel.

public:
generic <typename TChannel>
 where TChannel : class, System::ServiceModel::Channels::IChannel bool CanBuildInnerChannelListener();
public bool CanBuildInnerChannelListener<TChannel> () where TChannel : class, System.ServiceModel.Channels.IChannel;
member this.CanBuildInnerChannelListener : unit -> bool (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Function CanBuildInnerChannelListener(Of TChannel As {Class, IChannel}) () As Boolean

Type Parameters

TChannel

The type of IChannel object for which the inner channel listener listens.

Returns

true if the inner channel listener can be built to listen for the TChannel specified; otherwise, false.

Examples

CustomBinding binding = new CustomBinding();
BindingParameterCollection bpCol = new BindingParameterCollection();
BindingContext context = new BindingContext(binding, bpCol);
context.CanBuildInnerChannelListener<IDuplexChannel>();
Dim binding As New CustomBinding()
Dim bpCol As New BindingParameterCollection()
Dim context As New BindingContext(binding, bpCol)
context.CanBuildInnerChannelListener(Of IDuplexChannel)()

Applies to