MessagePackFormatter Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Serializes JSON-RPC messages using MessagePack (a fast, compact binary format).
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
- Inheritance
-
MessagePackFormatter
- Inheritance
- Implements
Remarks
The MessagePack implementation used here comes from https://github.com/neuecc/MessagePack-CSharp. The README on that project site describes use cases and its performance compared to alternative .NET MessagePack implementations and this one appears to be the best by far.
Constructors
MessagePackFormatter() |
Initializes a new instance of the MessagePackFormatter class. |
Properties
ApplicableMethodAttributeOnDeserializingMethod |
Gets the JsonRpcMethodAttribute that is present on the method that may be invoked to serve the incoming request, when applicable. (Inherited from FormatterBase) |
DefaultUserDataSerializationOptions |
Gets the default MessagePack.MessagePackSerializerOptions used for user data (arguments, return values and errors) in RPC calls prior to any call to SetMessagePackSerializerOptions(MessagePackSerializerOptions). |
DuplexPipeTracker |
Gets the helper for marshaling pipes as RPC method arguments. (Inherited from FormatterBase) |
EnumerableTracker |
Gets the helper for marshaling IAsyncEnumerable<T> in RPC method arguments or return values. (Inherited from FormatterBase) |
FormatterProgressTracker |
Gets the MessageFormatterProgressTracker instance containing useful methods to help on the implementation of message formatters. (Inherited from FormatterBase) |
JsonRpc |
Gets the JsonRpc that is associated with this formatter. (Inherited from FormatterBase) |
MultiplexingStream |
Gets or sets the MultiplexingStream that may be used to establish out of band communication (e.g. marshal IDuplexPipe arguments). |
Methods
Deserialize(ReadOnlySequence<Byte>) |
Deserializes a JsonRpcMessage. |
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Dispose() | (Inherited from FormatterBase) |
Dispose(Boolean) |
Disposes managed and native resources held by this instance. |
Dispose(Boolean) |
Disposes managed and native resources held by this instance. (Inherited from FormatterBase) |
GetJsonText(JsonRpcMessage) |
Gets a JSON representation for a given message for tracing purposes. |
Serialize(IBufferWriter<Byte>, JsonRpcMessage) |
Serializes a JsonRpcMessage. |
SetMessagePackSerializerOptions(MessagePackSerializerOptions) |
Sets the MessagePack.MessagePackSerializerOptions to use for serialization of user data. |
TrackDeserialization(JsonRpcMessage, ReadOnlySpan<ParameterInfo>) |
Sets up state to track deserialization of a message. (Inherited from FormatterBase) |
TrackSerialization(JsonRpcMessage) |
Sets up state to track serialization of a message. (Inherited from FormatterBase) |