Synced
SerializationGeneration.Decode
Section titled “SerializationGeneration.Decode”
- Decodes a manually defined structured root using the converter generation captured by this instance.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Core.Serialization
Declaration
Section titled “Declaration”public TResult Inno.Core.Serialization.SerializationGeneration.Decode<TResult>(System.ReadOnlySpan<byte> bytes, System.Func<Inno.Core.Serialization.SerializationReader, TResult> read, Inno.Core.Serialization.SerializationContext? context = null)Type parameters
Section titled “Type parameters”Type parameter TResult: The result produced by the read callback.
Parameters
Section titled “Parameters”Parameter bytes: Deterministic binary data containing the structured root.
Parameter read: The callback that consumes the complete root object.
Parameter context: Optional immutable converter context for this operation.
Returns
Section titled “Returns”The callback result after all restoration callbacks complete.
Exceptions
Section titled “Exceptions”Exception T:System.ArgumentNullException: Thrown when read is null.
Exception T:System.ObjectDisposedException: Thrown when this generation has already been disposed.