Binding.CanBuildChannelListener Binding.CanBuildChannelListener Binding.CanBuildChannelListener Binding.CanBuildChannelListener Method

定义

返回一个值,该值指示当前绑定是否可以在服务上生成满足某些指定条件的通道侦听器堆栈。Returns a value that indicates whether the current binding can build a channel listener stack on the service that satisfies some specified criteria.

重载

CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[])

返回一个值,该值指示当前绑定是否可以在服务上生成满足对象数组所指定的条件的通道侦听器堆栈。Returns a value that indicates whether the current binding can build a channel listener stack on the service that satisfies the criteria specified in an array of objects.

CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection)

返回一个值,该值指示当前绑定是否可以在服务上生成满足指定绑定参数集合的通道侦听器堆栈。Returns a value that indicates whether the current binding can build a channel listener stack on the service that satisfies the collection of binding parameters specified.

CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[])

返回一个值,该值指示当前绑定是否可以在服务上生成满足对象数组所指定的条件的通道侦听器堆栈。Returns a value that indicates whether the current binding can build a channel listener stack on the service that satisfies the criteria specified in an array of objects.

public:
generic <typename TChannel>
 where TChannel : class, System::ServiceModel::Channels::IChannel bool CanBuildChannelListener(... cli::array <System::Object ^> ^ parameters);
public bool CanBuildChannelListener<TChannel> (params object[] parameters) where TChannel : class, System.ServiceModel.Channels.IChannel;
member this.CanBuildChannelListener : obj[] -> bool (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Function CanBuildChannelListener(Of TChannel As {Class, IChannel}) (ParamArray parameters As Object()) As Boolean

类型参数

TChannel

要为其进行侦听器测试的通道类型。The type of channel for which the listener is being tested.

参数

parameters
Object[]

为生成的通道工厂指定需求的对象数组。The object array that specifies requirements for the channel factory that is built.

返回

如果可以在服务上生成指定的通道侦听器堆栈,则为 true;否则为 falsetrue if the specified channel listener stack can be build on the service; otherwise, false.

注解

如果要在实际生成侦听器之前检查是否可以为提供的 TChannel 生成 parameters 类型通道的通道侦听器,请使用此方法。Use this method if you want to check that the channel listener for channels of type TChannel can be build for the binding parameters specified before attempting to actually build the listener. 或者,通过调用 BuildChannelListener<TChannel>(Object[]) 来生成通道侦听器,并捕捉无法生成时所生成的异常。Alternatively, try to build the channel listener by calling BuildChannelListener<TChannel>(Object[]) and catch the exception generated if it cannot be built.

CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection)

返回一个值,该值指示当前绑定是否可以在服务上生成满足指定绑定参数集合的通道侦听器堆栈。Returns a value that indicates whether the current binding can build a channel listener stack on the service that satisfies the collection of binding parameters specified.

public:
generic <typename TChannel>
 where TChannel : class, System::ServiceModel::Channels::IChannel virtual bool CanBuildChannelListener(System::ServiceModel::Channels::BindingParameterCollection ^ parameters);
public virtual bool CanBuildChannelListener<TChannel> (System.ServiceModel.Channels.BindingParameterCollection parameters) where TChannel : class, System.ServiceModel.Channels.IChannel;
abstract member CanBuildChannelListener : System.ServiceModel.Channels.BindingParameterCollection -> bool (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
override this.CanBuildChannelListener : System.ServiceModel.Channels.BindingParameterCollection -> bool (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Overridable Function CanBuildChannelListener(Of TChannel As {Class, IChannel}) (parameters As BindingParameterCollection) As Boolean

类型参数

TChannel

要为其进行侦听器测试的通道类型。The type of channel for which the listener is being tested.

参数

parameters
BindingParameterCollection BindingParameterCollection BindingParameterCollection BindingParameterCollection

为生成的通道侦听器指定要求的 BindingParameterCollectionThe BindingParameterCollection that specifies requirements for the channel listener that is built.

返回

如果可以在服务上生成指定的通道侦听器堆栈,则为 true;否则为 falsetrue if the specified channel listener stack can be build on the service; otherwise, false.

注解

如果要在实际生成侦听器之前检查是否可以为提供的 TChannel 生成 parameters 类型通道的通道侦听器,请使用此方法。Use this method if you want to check that the channel listener for channels of type TChannel can be build for the binding parameters specified before attempting to actually build the listener. 或者,通过调用 BuildChannelListener<TChannel>(BindingParameterCollection) 来生成通道侦听器,并捕捉无法生成时所生成的异常。Alternatively, try to build the channel listener by calling BuildChannelListener<TChannel>(BindingParameterCollection) and catch the exception generated if it cannot be built.

适用于