MessagePackFragment Struct
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.
A sequence of bytes serialized using MessagePack.
[MessagePack.MessagePackFormatter(typeof(Microsoft.VisualStudio.RpcContracts.RemoteUI.MessagePackFragment+MessagePackFragmentFormatter))]
[Newtonsoft.Json.JsonConverter(typeof(Microsoft.VisualStudio.RpcContracts.RemoteUI.MessagePackFragment+MessagePackFragmentConverter))]
[System.Runtime.CompilerServices.IsReadOnly]
public readonly struct MessagePackFragment
[<MessagePack.MessagePackFormatter(typeof(Microsoft.VisualStudio.RpcContracts.RemoteUI.MessagePackFragment+MessagePackFragmentFormatter))>]
[<Newtonsoft.Json.JsonConverter(typeof(Microsoft.VisualStudio.RpcContracts.RemoteUI.MessagePackFragment+MessagePackFragmentConverter))>]
[<System.Runtime.CompilerServices.IsReadOnly>]
type MessagePackFragment = struct
Public Structure MessagePackFragment
- Inheritance
-
MessagePackFragment
- Attributes
-
MessagePack.MessagePackFormatterAttribute Newtonsoft.Json.JsonConverterAttribute IsReadOnlyAttribute
Remarks
When a MessagePackFragment is serialized as part of a larger MessagePack payload, it is written as raw data prefixed by its length. This allows the larger payload to be logged as json showing the content of the fragment in a readable format. Upon deserialization the fragment is retrieved as-is allowing it to be deserialized separately from the payload containing it, possibly at a later time.
Constructors
MessagePackFragment(ReadOnlySequence<Byte>) |
Initializes a new instance of the MessagePackFragment struct. |
Properties
Data |
Gets a sequence of bytes in MessagePack format. |
Length |
Gets the length in bytes of the fragment. |