CompositeDuplexBindingElement.CanBuildChannelFactory<TChannel>(BindingContext) 方法
定义
返回一个值,该值指示绑定是否可以创建能够生成符合上下文需要的特定类型通道的通道工厂。Returns a value that indicates whether the binding can build the channel factory that produces a specific type of channel that satisfies the context requirements.
public:
generic <typename TChannel>
override bool CanBuildChannelFactory(System::ServiceModel::Channels::BindingContext ^ context);
public override bool CanBuildChannelFactory<TChannel> (System.ServiceModel.Channels.BindingContext context);
override this.CanBuildChannelFactory : System.ServiceModel.Channels.BindingContext -> bool
Public Overrides Function CanBuildChannelFactory(Of TChannel) (context As BindingContext) As Boolean
类型参数
参数
- context
- BindingContext
用于提供生成通道侦听器所需上下文的 BindingContext。The BindingContext that provides the context required to build the channel listener.
返回
如果绑定可以生成通道工厂,则为 true;否则为 false。true if the binding can build the channel factory; otherwise, false.
例外
context 为 null。context is null.
注解
true如果 TChannel == IOutputChannel 和内部绑定也可以生成, IOutputChannel 则为; 否则为 false 。true if TChannel == IOutputChannel and the inner binding can also build IOutputChannel; otherwise, false.