T5.TextTemplating by Atif Aziz,Mikayla Hutchinson

<PackageReference Include="T5.TextTemplating" Version="1.1.0" />

 Directive

public class Directive : ISegment
using System; using System.Collections.Generic; namespace T5.TextTemplating { public class Directive : ISegment { public string Name { get; set; } public Dictionary<string, string> Attributes { get; set; } public Location TagStartLocation { get; set; } public Location StartLocation { get; set; } public Location EndLocation { get; set; } public Directive(string name, Location start) { Name = name; Attributes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); StartLocation = start; } public string Extract(string key) { if (!Attributes.TryGetValue(key, out string value)) return null; Attributes.Remove(key); return value; } } }