共用方式為


BindingContext.CanBuildInnerChannelFactory<TChannel> 方法

定義

傳回值,這個值會指出內部通道處理站是否可以產生指定之型別的通道。

public:
generic <typename TChannel>
 bool CanBuildInnerChannelFactory();
public bool CanBuildInnerChannelFactory<TChannel> ();
member this.CanBuildInnerChannelFactory : unit -> bool
Public Function CanBuildInnerChannelFactory(Of TChannel) () As Boolean

類型參數

TChannel

內部通道處理站所產生之 IChannel 物件的型別。

傳回

如果內部通道處理站可以產生指定的 TChannel 則為 true,否則為 false

範例

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

適用於