ReliableSessionBindingElement.CanBuildChannelListener<TChannel> 方法

定義

傳回值,這個值會指出是否可以為可支援可靠工作階段的通道和內容建置通道接聽程式。

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

IChannel如果建置,通道接聽程式接受的 。

參數

context
BindingContext

BindingContext,其中包含建置可接受 TChannel 型別通道之接聽程式時的必要資訊。

傳回

如果可以由繫結項目建置可以產生型別 trueChannelListenerBase<TChannel>IChannel,則為 TChannel,否則為 false

備註

通道堆疊通常是使用處理站模式所建立,在此種模式中,繫結程序會建立通道堆疊。 當傳送訊息時,繫結會使來建置通道處理站,而此處理站會接著建置通道堆疊,並傳回在堆疊中頂端通道的參考。 應用程式可以接著使用這個通道來傳送訊息。 同樣地,當接收訊息時,繫結會用來建置通道接聽程式,以便接聽傳入的訊息。 此通道接聽程式會會透過建立通道堆疊並將應用程式參考傳遞至頂端通道的方式,來提供訊息給接聽應用程式。

這個方法會根據 true 中所提供值的表格,為 false 傳回 TChannelBuildChannelListener<TChannel>(BindingContext)

適用於