Inno.Core.Serialization
Section titled “Inno.Core.Serialization”
- Deterministic current-format values, explicit metadata, converter generations and neutral captures.
This foundation provides one metadata-driven value pipeline for root objects, structured schemas, independent properties and immutable snapshots. It does not own domain identities, filesystem publication, Inspector presentation or old-schema migration.
- Save and restore declared state.
- Restore properties across a reload.
- Capture immutable snapshots.
- Implement a converter.
- Select metadata for deployment.
Operation and generation contract
Section titled “Operation and generation contract”The registry borrows the owning type catalog and explicit metadata provider and owns converter generations. Capture a generation when an operation boundary must survive an asynchronous continuation or reload; dispose the lease after all its work finishes. Metadata, converters, live properties and context services must not outlive their owning generation. A lease does not establish thread safety for those objects.
Readers and writers are borrowed for active synchronous operations; snapshot converter writers expire with the callback. Keep source state stable and supply complete owner reference services. Context lookup uses exact contract types. Core binds its own registry/catalog/provider while preserving other caller services.
Current binary formats are strict. Duplicate member keys, cycles without explicit reference handling, unsupported declarations and equally applicable converters fail. TryRead distinguishes a missing member from malformed present data. Completion begins only after value processing succeeds; callbacks already executed and arbitrary setter side effects are not automatically rolled back on later failure.
CollectFailures reports recoverable independent property failures and removes their queued completion work. It does not provide general transactional rollback or an old-schema reader. Neutral property-data bytes cross reload boundaries; in-memory property snapshots can retain the old Type and must not be retained as unload-safe state.
Immutable serialization snapshots retain neutral values only. Their byte arrays are detached and their stream destination remains caller-owned. Complete capture remains authoritative unless an explicit, generation-qualified key proves all output, context and ordering inputs. Missing proof does not weaken change detection. Capture builders belong only to their current synchronous callback and thread.
Runtime script declarations include selected value, attribute, reader/writer and converter contracts under InnoEngine.Serialization. The registry is Editor-only and excludes host construction, generation management, metadata and snapshot capture. Host CLR availability does not establish that a member is present in a selected script projection.
Design and implementation
Section titled “Design and implementation”Read serialization and generation ownership for converter resolution, metadata composition, completion order and the shared neutral encoding model. Reflection belongs to the explicit DotNet adapter; static access belongs to generated catalogs. Neither is an implicit fallback in Core.
API reference
Section titled “API reference”Browse the exact declarations and member contracts in the selected CLR inventory. Source and script-projection certification remain separate.
Logical script references
Section titled “Logical script references”The compiler-selected script declarations are separate from this project’s host CLR surface. Read the script calling guide and the associated module contracts before using a projected member.
Source project facts
Section titled “Source project facts”Project: Inno.Core.Serialization
Source: src/foundation/core/Inno.Core.Serialization/Inno.Core.Serialization.csproj
| Type | API | Description |
|---|---|---|
| SerializationConverter | engine | Identifies a concrete serialization converter for generation-scoped type discovery. |
| SerializationConverter<T> | engine | Defines the single advanced extension contract for serializing a specific value type. |
| GenerateSerializationConverterAttribute | engine | Requests a compile-time serialization converter for a closed data-transfer type. |
| ISerializable | engine | Marks a reference type whose annotated properties can participate in property-based serialization. |
| ISerializationMetadataSource | engine | Supplies declaration access and construction without choosing a runtime reflection implementation. |
| OnSerializableRestored | engine | Marks one nonvirtual instance method to run after restoration succeeds, optionally receiving its SerializationContext. |
| PropertyVisibility | engine | Defines member participation rules for persistence and runtime access. |
| RequiresSerializationConverterAttribute | engine | Requires a serializable type to use an explicitly discovered converter. |
| SerializablePropertyAttribute | engine | Declares a field or property as participating in T:Inno.Core.Serialization.ISerializable property persistence. |
| SerializationCaptureKeyBuilder | engine | Builds an exact neutral key during one owned synchronous converter capture callback. |
| SerializationCollectionMetadata | engine | Supplies typed collection construction and map enumeration without runtime generic compilation. |
| SerializationContext | engine | Provides immutable, operation-independent context to serialization converters. |
| SerializationGeneration | engine | Pins one immutable converter generation so serialization remains deterministic across asynchronous continuations and extension reloads. |
| SerializationMemberMetadata | engine | Captures one ordered serialization key and its generation-owned accessors. |
| SerializationPropertyRestoreFailure | engine | Describes one property skipped during a compatible property restore. |
| SerializationPropertyRestoreMode | engine | Defines how independently captured serialized properties handle restore failures. |
| SerializationPropertyRestoreResult | engine | Summarizes an independently captured property restore operation. |
| SerializationPropertySnapshot | engine | Stores one independently encoded serializable property and its original declared type. |
| SerializationReader | engine | Reads a structured object during the active deserialization operation. |
| SerializationRegistry | engine | Owns one generation-aware converter registry and provides deterministic root serialization operations. |
| SerializationRevisionAttribute | engine | Declares a sealed identity source’s transient revision member, which covers all serialized state and pure getters. |
| SerializationSnapshot | engine | Holds an immutable, neutral capture of serialized values without retaining the source object or its generation. |
| SerializationTypeMetadata | engine | Freezes member access, construction and restoration callbacks for an exact closed declaration. |
| SerializationWriter | engine | Writes a structured object during the active serialization operation. |
| SerializedIdentityRemapper | engine | Rewrites selected scalar identities in a serialized value and its nested serialized payloads. |
| SerializedProperty | engine | Represents a discoverable property in editor and persistence workflows. |
| StaticSerializationMetadataSource | engine | Resolves exact serialization shapes from explicit generated contributions without reflection fallback. |
| GenerateSerializationConverterAttribute | Runtime | Requests a compile-time serialization converter for a closed data-transfer type. |
| ISerializable | Runtime | Marks a reference type whose annotated properties can participate in property-based serialization. |
| OnSerializableRestored | Runtime | Marks one nonvirtual instance method to run after restoration succeeds, optionally receiving its SerializationContext. |
| PropertyVisibility | Runtime | Defines member participation rules for persistence and runtime access. |
| RequiresSerializationConverterAttribute | Runtime | Requires a serializable type to use an explicitly discovered converter. |
| SerializablePropertyAttribute | Runtime | Declares a field or property as participating in T:InnoEngine.Serialization.ISerializable property persistence. |
| SerializationCaptureKeyBuilder | Runtime | Builds an exact neutral key during one owned synchronous converter capture callback. |
| SerializationContext | Runtime | Provides immutable, operation-independent context to serialization converters. |
| SerializationConverter<T> | Runtime | Defines the single advanced extension contract for serializing a specific value type. |
| SerializationReader | Runtime | Reads a structured object during the active deserialization operation. |
| SerializationRegistry | Editor | Owns one generation-aware converter registry and provides deterministic root serialization operations. |
| SerializationRevisionAttribute | Runtime | Declares a sealed identity source’s transient revision member, which covers all serialized state and pure getters. |
| SerializationWriter | Runtime | Writes a structured object during the active serialization operation. |
| SerializedProperty | Runtime | Represents a discoverable property in editor and persistence workflows. |