using System; 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(string value, bool removeNewLines) { if (removeNewLines) { Value = value.Replace(Environment.NewLine, String.Empty); } else { Value = value; } } /// /// Gets or sets the static text. /// public string Value { get; } void IGenerator.GetText(TextWriter writer, Scope scope, Scope context, Action postProcessor) { writer.Write(Value); } } }