MessagePackFormatter 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用 MessagePack(一種快速且緊湊的二進位格式)序列化 JSON-RPC 訊息。
public class MessagePackFormatter : IDisposable, StreamJsonRpc.IJsonRpcInstanceContainer, StreamJsonRpc.IJsonRpcMessageFactory, StreamJsonRpc.IJsonRpcMessageFormatter, StreamJsonRpc.Reflection.IJsonRpcFormatterState, StreamJsonRpc.Reflection.IJsonRpcFormatterTracingCallbacks
public class MessagePackFormatter : StreamJsonRpc.FormatterBase, StreamJsonRpc.IJsonRpcMessageFactory, StreamJsonRpc.IJsonRpcMessageFormatter, StreamJsonRpc.Reflection.IJsonRpcFormatterTracingCallbacks
public class MessagePackFormatter : IDisposable, StreamJsonRpc.IJsonRpcInstanceContainer, StreamJsonRpc.IJsonRpcMessageFormatter, StreamJsonRpc.Reflection.IJsonRpcFormatterState, StreamJsonRpc.Reflection.IJsonRpcFormatterTracingCallbacks
type MessagePackFormatter = class
interface IJsonRpcMessageFormatter
interface IJsonRpcInstanceContainer
interface IJsonRpcFormatterState
interface IJsonRpcFormatterTracingCallbacks
interface IJsonRpcMessageFactory
interface IDisposable
type MessagePackFormatter = class
inherit FormatterBase
interface IJsonRpcMessageFormatter
interface IJsonRpcFormatterTracingCallbacks
interface IJsonRpcMessageFactory
type MessagePackFormatter = class
interface IJsonRpcMessageFormatter
interface IJsonRpcInstanceContainer
interface IJsonRpcFormatterState
interface IJsonRpcFormatterTracingCallbacks
interface IDisposable
Public Class MessagePackFormatter
Implements IDisposable, IJsonRpcFormatterState, IJsonRpcFormatterTracingCallbacks, IJsonRpcInstanceContainer, IJsonRpcMessageFactory, IJsonRpcMessageFormatter
Public Class MessagePackFormatter
Inherits FormatterBase
Implements IJsonRpcFormatterTracingCallbacks, IJsonRpcMessageFactory, IJsonRpcMessageFormatter
Public Class MessagePackFormatter
Implements IDisposable, IJsonRpcFormatterState, IJsonRpcFormatterTracingCallbacks, IJsonRpcInstanceContainer, IJsonRpcMessageFormatter
- 繼承
-
MessagePackFormatter
- 繼承
- 實作
備註
這裡使用的 MessagePack 實作來自 https://github.com/neuecc/MessagePack-CSharp. 該專案網站上的 README 描述了使用案例及其與其他 .NET MessagePack 實作的效能比較,而這個版本似乎是迄今為止最好的。
建構函式
| 名稱 | Description |
|---|---|
| MessagePackFormatter() |
初始化 MessagePackFormatter 類別的新執行個體。 |
屬性
| 名稱 | Description |
|---|---|
| ApplicableMethodAttributeOnDeserializingMethod |
取得 JsonRpcMethodAttribute 可用於服務來處理來請求的方法中存在的 。 (繼承來源 FormatterBase) |
| DefaultUserDataSerializationOptions |
在呼叫 SetMessagePackSerializerOptions(MessagePackSerializerOptions)之前,取得 RPC 呼叫中使用者資料(參數、回傳值與錯誤)的預設MessagePack.MessagePackSerializerOptions值。 |
| DuplexPipeTracker |
獲得 RPC 方法參數來 marshaling pipes 的助手。 (繼承來源 FormatterBase) |
| EnumerableTracker |
取得 RPC 方法參數或回傳值的編組 IAsyncEnumerable<T> 輔助工具。 (繼承來源 FormatterBase) |
| FormatterProgressTracker |
取得 MessageFormatterProgressTracker 包含有用方法的實例,以協助實作訊息格式化器。 (繼承來源 FormatterBase) |
| JsonRpc |
了解 JsonRpc 這個格式化器所關聯的部分。 (繼承來源 FormatterBase) |
| MultiplexingStream |
Gets 或 集合 可用 MultiplexingStream 來建立帶外通訊(例如 marshal IDuplexPipe 論證)。 |
方法
| 名稱 | Description |
|---|---|
| Deserialize(ReadOnlySequence<Byte>) |
解序化 JsonRpcMessage. |
| Dispose() |
使用 MessagePack(一種快速且緊湊的二進位格式)序列化 JSON-RPC 訊息。 |
| Dispose() |
使用 MessagePack(一種快速且緊湊的二進位格式)序列化 JSON-RPC 訊息。 (繼承來源 FormatterBase) |
| Dispose(Boolean) |
處理此實例持有的管理及本地資源。 |
| Dispose(Boolean) |
處理此實例持有的管理及本地資源。 (繼承來源 FormatterBase) |
| GetJsonText(JsonRpcMessage) |
它會為特定訊息取得 JSON 表示以供追蹤。 |
| Serialize(IBufferWriter<Byte>, JsonRpcMessage) |
序列化為 JsonRpcMessage. |
| SetMessagePackSerializerOptions(MessagePackSerializerOptions) |
設定 使用 來 MessagePack.MessagePackSerializerOptions 序列化使用者資料。 |
| TrackDeserialization(JsonRpcMessage, ReadOnlySpan<ParameterInfo>) |
設定狀態以追蹤訊息的反序列化。 (繼承來源 FormatterBase) |
| TrackSerialization(JsonRpcMessage) |
設定狀態以追蹤訊息的序列化。 (繼承來源 FormatterBase) |