IDuplexSession 介面

定義

針對在傳訊端點之間雙向通訊的每一端上實作的工作階段定義介面。Defines the interface for the session implemented on each side of a bi-directional communication between messaging endpoints.

public interface class IDuplexSession : System::ServiceModel::Channels::IInputSession, System::ServiceModel::Channels::IOutputSession
public interface IDuplexSession : System.ServiceModel.Channels.IInputSession, System.ServiceModel.Channels.IOutputSession
type IDuplexSession = interface
    interface IInputSession
    interface IOutputSession
    interface ISession
Public Interface IDuplexSession
Implements IInputSession, IOutputSession
實作

備註

IDuplexSession 介面是傳入工作階段 (由 IInputSession 介面所定義) 和傳出工作階段 (由 IOutputSession 介面所定易) 的聯合。The IDuplexSession interface is the union of the inbound session, defined by the IInputSession interface, and the outbound session, defined by the IOutputSession interface. 傳入工作階段或傳出工作階段都可以各自獨立結束。Either the inbound session or outbound session can be terminated independently of the other. 可以透過同步方式呼叫 CloseOutputSession 或非同步方式呼叫 BeginCloseOutputSession 來結束傳出工作階段。The outbound session can be terminated synchronously by calling CloseOutputSession or asynchronously by calling BeginCloseOutputSession.

傳入工作階段可以在遠端結束。The inbound session can be remotely terminated. 與傳入工作階段相關聯的 Receive 會在該工作階段關閉時,開始傳回 nullThe Receive associated with the inbound session starts returning null when that session is shutdown.

屬性

Id

取得可唯一識別此工作階段的識別碼。Gets the ID that uniquely identifies the session.

(繼承來源 ISession)

方法

BeginCloseOutputSession(AsyncCallback, Object)

開始非同步作業,以便結束傳出工作階段。Begins an asynchronous operation to terminate the outbound session.

BeginCloseOutputSession(TimeSpan, AsyncCallback, Object)

開始非同步作業來結束傳出工作階段,且包含此作業必須在限期內完成的指定逾時值。Begins an asynchronous operation to terminate the outbound session with a specified timeout within which the operation must complete.

CloseOutputSession()

結束傳出工作階段,表示將不會再從與該工作階段相關聯之通道上的這個端點傳送任何訊息。Terminates the outbound session that indicates that no more messages will be sent from this endpoint on the channel associated with the session.

CloseOutputSession(TimeSpan)

結束傳出工作階段,表示在指定的時間間隔內,將不會再從與該工作階段相關聯之通道上的這個端點傳送任何訊息。Terminates the outbound session that indicates that no more messages will be sent from this endpoint on the channel associated with the session within a specified interval of time.

EndCloseOutputSession(IAsyncResult)

完成非同步作業來結束傳出工作階段,表示將不會再從與該工作階段相關聯之通道上的這個端點傳送任何訊息。Completes an asynchronous operation to terminate the outbound session that indicates that no more messages will be sent from this endpoint on the channel associated with the session.

適用於