Table of Contents

Class RecordLinks

Namespace
Chronicler
Assembly
Chronicler.dll

Records stable IDs for links to host-owned values.

public static class RecordLinks
Inheritance
RecordLinks
Inherited Members

Methods

Records a link whose assignment may wait until the graph has loaded.

public static void LookDeferred<T>(IChronicler chronicler, T value, string name, Action<T> assignLoadedValue, string? slot = null)

Parameters

chronicler IChronicler

The active pass supplied to RecordData(IChronicler).

value T

The value to identify on save. The callback applies any loaded value.

name string

The stable field name to use on both save and load.

assignLoadedValue Action<T>

Applies the resolved value, or the default of T for a missing or null entry. The load context retains this callback while the link is queued.

slot string

An optional identity domain. Null or empty selects the default slot.

Type Parameters

T

The declared type used for registry lookup.

On load, the callback runs immediately if the target is available or the entry is missing or null. Otherwise, ResolveDeferredLinks() invokes it when the target resolves.

Exceptions

ArgumentNullException

assignLoadedValue is null.

InvalidOperationException

A non-null value has no stable ID on save.

Records a link that must resolve as soon as it is read.

public static void Look<T>(IChronicler chronicler, ref T value, string name, string? slot = null)

Parameters

chronicler IChronicler

The active pass supplied to RecordData(IChronicler).

value T

The value to identify on save. On load, receives the resolved value or the default for a missing or null entry. An unresolved ID leaves this value unchanged.

name string

The stable field name to use on both save and load.

slot string

An optional identity domain. Null or empty selects the default slot.

Type Parameters

T

The declared type used for registry lookup.

Exceptions

InvalidOperationException

A non-null value has no stable ID on save, or a present link ID cannot resolve on load.