Class SerializedSingleton
- Namespace
- KeenEyes.Serialization
- Assembly
- KeenEyes.Core.dll
Represents a serialized singleton with its type name and data.
public sealed record SerializedSingleton : IEquatable<SerializedSingleton>
- Inheritance
-
SerializedSingleton
- Implements
- Inherited Members
Remarks
Singletons are world-level data not tied to any entity. This record captures singleton state for snapshot persistence.
Properties
Data
Gets or sets the serialized singleton data as a JSON element.
public required JsonElement Data { get; init; }
Property Value
Remarks
Singleton data is pre-serialized to JSON format using IComponentSerializer for Native AOT compatibility. This eliminates the need for reflection during JSON serialization.
TypeName
Gets or sets the fully-qualified type name of the singleton.
public required string TypeName { get; init; }
Property Value
Remarks
This should be the result of AssemblyQualifiedName to ensure proper type resolution during deserialization.