Editor/Projection/Razor/RazorEmit.cs

A tiny utility class in the RazorDesigner projection that emits an HTML attribute string. It defines a single static method Attr that returns name="escapedValue" using Escape.Html to sanitize the value.

namespace Grains.RazorDesigner.Projection.Razor;

public static class RazorEmit
{
    public static string Attr( string name, string value ) => $"{name}=\"{Escape.Html( value )}\"";
}