MtomMessageEncodingBindingElement.CanBuildChannelListener<TChannel>(BindingContext) 方法

定義

傳回值,這個值會指出目前的繫結是否可以建置指定之通道及內容類型的接聽程式。Returns a value that indicates whether the current binding can build a listener for a specified type of channel and context.

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

類型參數

TChannel

通道接聽程式接受的通道類型。The type of channel the channel listener accepts.

參數

context
BindingContext

接聽程式的 BindingContextThe BindingContext for the listener.

傳回

如果可以在服務上建置指定的通道接聽程式堆疊,則為 true,否則為 falsetrue if the specified channel listener stack can be built on the service; otherwise, false.

適用於