Editor/Projection/ProjectionResult.cs

Immutable record struct that holds the result of a projection pass in the Razor designer editor. It stores lists of PanelOp operations, generated SCSS lines, Razor attribute strings, and the inner Razor text. It also exposes a static Empty instance with empty lists and a null inner text.

using System.Collections.Generic;

namespace Grains.RazorDesigner.Projection;

public readonly record struct ProjectionResult(
    IReadOnlyList<PanelOp> PanelOps,
    IReadOnlyList<string> ScssLines,
    IReadOnlyList<string> RazorAttributes,
    string RazorInnerText )
{
    public static ProjectionResult Empty { get; } = new(
        System.Array.Empty<PanelOp>(),
        System.Array.Empty<string>(),
        System.Array.Empty<string>(),
        null );
}