共用方式為


BindingContext.CanBuildInnerChannelListener<TChannel> 方法

定義

傳回值,這個值會指出是否可以建置內部通道接聽項來接聽指定之型別的通道。

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

類型參數

TChannel

內部通道接聽項接聽之 IChannel 物件的型別。

傳回

如果可以建置內部通道接聽項來接聽指定的 true 則為 TChannel,否則為 false

範例

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

適用於