public sealed class BridgeCollectionDescriptor Generated, reflection-free metadata for a keyed collection.
Parameters
nameThe collection's wire name.
getReads the collection from the ViewModel.
writeItemWrites one row.
keyReads the wire key of a row.
publishesChangesWhether the collection publishes indexed changes rather than only full states.
Remarks
The bridge checks the keys of every state and frame it writes. With a null row or a null, empty or duplicate key it withholds the route's state and reports the field and key instead of publishing it; explicit snapshot reads and replies fail. When publishesChanges is false (a ViewModel with validation), the collection only publishes full states, whose keys are still checked.
Constructors
BridgeCollectionDescriptor
public BridgeCollectionDescriptor(string name, Func<object, object?> get, Action<Utf8JsonWriter, object?> writeItem, Func<object?, string> key, bool publishesChanges = true) Generated, reflection-free metadata for a keyed collection.
Parameters
nameThe collection's wire name.
getReads the collection from the ViewModel.
writeItemWrites one row.
keyReads the wire key of a row.
publishesChangesWhether the collection publishes indexed changes rather than only full states.
Remarks
The bridge checks the keys of every state and frame it writes. With a null row or a null, empty or duplicate key it withholds the route's state and reports the field and key instead of publishing it; explicit snapshot reads and replies fail. When publishesChanges is false (a ViewModel with validation), the collection only publishes full states, whose keys are still checked.
Properties
FieldPaths
public IReadOnlyList<BridgeFieldPath>? FieldPaths { get; init; } The paths in a row that accept checked writes with field-paths/1 (its cells), with the generated copy of a row with one cell changed; null when the rows are not editable.
Name
public string Name { get; } The collection's wire name.
PublishesChanges
public bool PublishesChanges { get; } Whether the collection publishes indexed changes rather than only full states.
RowConflicts
public RunicRowConflicts RowConflicts { get; init; } When a cell write is a conflict: per cell (the default) or per row.
UpdateRow
public Action<object, object?, RunicRowEdit>? UpdateRow { get; init; } Applies an updated row: calls the ViewModel's RunicRowEditorAttribute method with the row's key, the row and the edit. It throws to reject the update.