ISessionChannel<TSession> 介面

定義

定義會將通道與工作階段之特定型別產生關聯的介面。Defines the interface that associates a channel with a specific type of session.

generic <typename TSession>
 where TSession : ISessionpublic interface class ISessionChannel
public interface ISessionChannel<TSession> where TSession : ISession
type ISessionChannel<'Session (requires 'Session :> ISession)> = interface
Public Interface ISessionChannel(Of TSession)

類型參數

TSession

與通道相關聯之 ISession 的型別。The type of ISession associated with the cannel.

衍生

備註

ISessionChannel<TSession> 介面是工作階段型通道的基底介面。The ISessionChannel<TSession> interface is the base interface for session-based channels. 它會將工作階段的型別與通道產生關聯,其方式是將泛型型別參數 TSession 設定為實作 ISession 介面的型別,藉以在訊息交換中反映其角色。It associates the type of session with the channel by setting the generic type parameter TSession to a type that implements the ISession interface in a way that reflects its role in the message exchange. 例如,在單向通訊之接收端的傳入工作階段中,TSession 會設定為 IInputSession,在單向通訊之傳送端的傳出工作階段上則設定為 IOutputSession,而在雙向通訊模式的雙工工作階段上則設定為 IDuplexSessionFor example, the TSession is set to IInputSession for an incoming session on the receiving side of a one-way communication, to IOutputSession for an outgoing session on the sending side of a one-way communication, and to IDuplexSession for a duplex session for a bi-directional communication pattern.

ISessionChannel<TSession> 介面提供了 Session 屬性,以擷取與通道相關聯的工作階段。The ISessionChannel<TSession> interface provides a Session property to retrieve the session with which the channel is associated.

屬性

Session

取得與此通道相關聯之工作階段的型別。Gets the type of session associated with this channel.

適用於