RTI Connext C# API
7.0.0
|
Provides additional operations for ISerializer<T> More...
Static Public Member Functions | |
static Span< byte > | Serialize< T > (this ISerializer< T > self, T sample, Span< byte > buffer) |
Serializes a data sample into a byte span More... | |
static T | Deserialize< T > (this ISerializer< T > self, Span< byte > buffer) |
Deserializes a data sample from a byte span More... | |
Provides additional operations for ISerializer<T>
Rti.ConnextDds.Extra
. This package requires .NET Standard 2.1 (while Rti.ConnextDds
only requires .NET Standard 2.0).
|
static |
Deserializes a data sample from a byte span
self | This ISerializer object (this is an extension method) |
buffer | A byte span containing the serialized data |
T | The type of the data sample |
|
static |
Serializes a data sample into a byte span
self | This ISerializer object (this is an extension method) |
sample | A data sample |
buffer | A byte span with enough space to contain the serialized data. This operation throws DdsException if the data doesn't fit. You can obtain the exact size required for this sample with ISerializer<T>.GetSerializedSampleSize or a size that is guaranteed to suffice for any sample of this type with ISerializer<T>.GetSerializedSampleMaxSize. |
T | The type of the data sample |