BridgeCollectionDescriptor<T> record

Namespace Runic.Application.Views · Runic.Application 0.7.0-preview.5

public sealed record BridgeCollectionDescriptor<T> : IEquatable<BridgeCollectionDescriptor<T>>

Inherits or implements IEquatable.

Generated, reflection-free metadata for a keyed collection.

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<T, object?> Get, Action<Utf8JsonWriter, object?> WriteItem, Func<object?, string> Key, bool PublishesChanges = true)

Generated, reflection-free metadata for a keyed collection.

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

Get

public Func<T, object?> Get { get; init; }

No documentation.

Key

public Func<object?, string> Key { get; init; }

No documentation.

Name

public string Name { get; init; }

No documentation.

PublishesChanges

public bool PublishesChanges { get; init; }

No documentation.

WriteItem

public Action<Utf8JsonWriter, object?> WriteItem { get; init; }

No documentation.