using System; using System.Collections.Generic; namespace mustache { /// /// Generates the text for a tag that only exists on a single line. /// internal sealed class InlineGenerator : IGenerator { private readonly TagDefinition _definition; private readonly ArgumentCollection _arguments; /// /// Initializes a new instance of an InlineGenerator. /// /// The tag to render the text for. /// The arguments passed to the tag. public InlineGenerator(TagDefinition definition, ArgumentCollection arguments) { _definition = definition; _arguments = arguments; } string IGenerator.GetText(IFormatProvider provider, KeyScope scope) { Dictionary arguments = _arguments.GetArguments(scope); return _definition.Decorate(provider, String.Empty, arguments); } } }