using System; using System.Collections.Generic; namespace mustache { /// /// Generates a static block of text. /// internal sealed class StaticGenerator : IGenerator { /// /// Initializes a new instance of a StaticGenerator. /// public StaticGenerator() { } /// /// Gets or sets the linked list node containing the current generator. /// public LinkedListNode Node { get; set; } /// /// Gets or sets the static text. /// public string Value { get; set; } /// /// Removes the static text from the final output. /// public void Prune() { if (Node != null) { Node.List.Remove(Node); Node = null; } } string IGenerator.GetText(IFormatProvider provider, KeyScope scope) { return Value; } } }