語言

MessageFormatterDuplexPipeTracker 類別

定義

協助 IJsonRpcMessageFormatter 實作支援 JSON-RPC 的編組 IDuplexPipe 。

public class MessageFormatterDuplexPipeTracker : IDisposable, Microsoft.IDisposableObservable
type MessageFormatterDuplexPipeTracker = class
    interface IDisposableObservable
    interface IDisposable
Public Class MessageFormatterDuplexPipeTracker
Implements IDisposable, IDisposableObservable
繼承
MessageFormatterDuplexPipeTracker
實作

備註

終身規則:* 總是 IDuplexPipe 從客戶端開始,並作為參數傳遞給伺服器。 伺服器不被允許返回 IDuplexPipe 用戶端,因為如果用戶端掉落伺服器,伺服器將無法獲得回饋,導致資源外洩。 * 客戶端只能在請求中發送 ( IDuplexPipe 期望回應) 通知不會讓客戶端知道伺服器掉落了,導致資源外洩。 * 如果伺服器回應請求時回傳任何錯誤,客戶端將立即終止 ,IDuplexPipe因為伺服器可能不知道 。IDuplexPipe * 當伺服器成功回應時,不會終止。IDuplexPipe 客戶端與伺服器預期會自行協商結束 IDuplexPipe 。

建構函式

名稱 Description
MessageFormatterDuplexPipeTracker()

初始化 MessageFormatterDuplexPipeTracker 類別的新執行個體。

MessageFormatterDuplexPipeTracker(JsonRpc, IJsonRpcFormatterState)

初始化 MessageFormatterDuplexPipeTracker 類別的新執行個體。

屬性

名稱 Description
MultiplexingStream

接收或設定用於建立和接受通道的多工串流。

RequestIdBeingDeserialized

取得或設定目前正在反序列化請求的 ID,作為 中的 StreamJsonRpc.Reflection.MessageFormatterDuplexPipeTracker.inboundRequestChannelMap金鑰使用。

RequestIdBeingSerialized

取得或設定目前序列化請求的 ID,作為 中的 StreamJsonRpc.Reflection.MessageFormatterDuplexPipeTracker.outboundRequestChannelMap金鑰使用。

方法

名稱 Description
Dispose()

協助 IJsonRpcMessageFormatter 實作支援 JSON-RPC 的編組 IDuplexPipe 。

Dispose(Boolean)

處理此實例持有的管理及本地資源。

GetPipe(Nullable<Int32>)
已淘汰.

從在 RPC 伺服器收到的標記中建立 方法 IDuplexPipe 參數。

GetPipe(Nullable<UInt64>)

從在 RPC 伺服器收到的標記中建立 方法 IDuplexPipe 參數。

GetPipeReader(Nullable<Int32>)
已淘汰.

從在 RPC 伺服器收到的標記作為方法參數時,從給定的標記中產生 a PipeReader 。

GetPipeReader(Nullable<UInt64>)

從在 RPC 伺服器收到的標記作為方法參數時,從給定的標記中產生 a PipeReader 。

GetPipeWriter(Nullable<Int32>)
已淘汰.

從在 RPC 伺服器收到的標記作為方法參數時,從給定的標記中產生 a PipeWriter 。

GetPipeWriter(Nullable<UInt64>)

從在 RPC 伺服器收到的標記作為方法參數時,從給定的標記中產生 a PipeWriter 。

GetToken(IDuplexPipe)
已淘汰.

建立一個標記,表示從用戶端傳送到 RPC 伺服器時的 方法 IDuplexPipe 參數。

GetToken(PipeReader)
已淘汰.

在從用戶端傳送到 RPC 伺服器時,建立一個標記來表示 方法 PipeReader 參數。

GetToken(PipeWriter)
已淘汰.

在從用戶端傳送到 RPC 伺服器時,建立一個標記來表示 方法 PipeWriter 參數。

GetULongToken(IDuplexPipe)

建立一個標記,表示從用戶端傳送到 RPC 伺服器時的 方法 IDuplexPipe 參數。

GetULongToken(PipeReader)

在從用戶端傳送到 RPC 伺服器時,建立一個標記來表示 方法 PipeReader 參數。

GetULongToken(PipeWriter)

在從用戶端傳送到 RPC 伺服器時,建立一個標記來表示 方法 PipeWriter 參數。

OnResponseReceived(Int64, Boolean)

當收到任何請求的回應時,會通知此追蹤器,以便進行適當的通道與狀態清理。

OnResponseSent(Object, Boolean)

當收到任何請求回應時,會通知此追蹤器,以便進行適當的通道與狀態清理。

明確介面實作

名稱 Description
IDisposableObservable.IsDisposed

協助 IJsonRpcMessageFormatter 實作支援 JSON-RPC 的編組 IDuplexPipe 。

適用於