BridgeDataSubscriptionMember class

Namespace Runic.Application.Views.Generated in Runic.Application.Views 0.23.0

public sealed class BridgeDataSubscriptionMember

Describes one observable member of a bridged data graph. Created by generated bridges.

Constructors

BridgeDataSubscriptionMember

public BridgeDataSubscriptionMember(string name, Func<object, object?> read, IReadOnlyList<BridgeDataSubscriptionMember>? children = null, Func<object, IEnumerable?>? enumerateChildren = null, string? propertyName = null, Func<object, IEnumerable<BridgeValidationChild>>? enumerateValidationChildren = null, bool isPathTransparent = false)

Describes a member and, optionally, its observable children.

Parameters

name

The member's wire name.

read

Reads the member value from its owner.

children

Members of the value's own data type.

enumerateChildren

Enumerates collection elements that have generated data metadata.

propertyName

The .NET property name, when it differs from name.

enumerateValidationChildren

Enumerates children whose validation errors are reported.

isPathTransparent

Whether the member adds no segment to validation paths.

Properties

ValidationProperty

public Func<PropertyInfo?>? ValidationProperty { get; init; }

Returns the member's property when it has validation attributes, so the Bridge can give their messages a text reference (RunicValidationOptions.TextFor). Generated code reads it from the declaring type with a constant name and BindingFlags.DeclaredOnly, which keeps the property's metadata in a trimmed application and finds a property that hides an inherited one (new).