BindingContext.CanBuildInnerChannelListener<TChannel> Méthode

Définition

Retourne une valeur qui indique si l'écouteur de canal interne peut être généré pour écouter un type spécifié de canal.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

Paramètres de type

TChannel

Le type d'objet IChannel que l'écouteur de canal interne écoute.The type of IChannel object for which the inner channel listener listens.

Retours

true si l'écouteur de canal interne peut être généré pour écouter le TChannel spécifié ; sinon, false.true if the inner channel listener can be built to listen for the TChannel specified; otherwise, false.

Exemples

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)()

S’applique à