Editor/Wiring/Actions/IfAction.cs

A simple immutable data record representing an if action in the editor wiring system. It stores a Condition expression and two readonly lists of child Actions for Then and Else branches.

using System.Collections.Generic;

namespace Grains.RazorDesigner.Wiring;

public sealed record IfAction : Action
{
    public Expression Condition { get; init; }
    public IReadOnlyList<Action> Then { get; init; } = System.Array.Empty<Action>();
    public IReadOnlyList<Action> Else { get; init; } = System.Array.Empty<Action>();
}