using System; using System.Collections.Generic; using System.IO; 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; } } void IGenerator.GetText(KeyScope scope, TextWriter writer) { writer.Write(Value); } } }