2013-01-09 02:33:53 +00:00
|
|
|
|
using System;
|
2013-01-10 02:17:45 +00:00
|
|
|
|
using System.Collections.Generic;
|
2013-01-09 02:33:53 +00:00
|
|
|
|
|
|
|
|
|
namespace mustache
|
|
|
|
|
{
|
2013-01-10 02:17:45 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Generates a static block of text.
|
|
|
|
|
/// </summary>
|
2013-01-09 02:33:53 +00:00
|
|
|
|
internal sealed class StaticGenerator : IGenerator
|
|
|
|
|
{
|
|
|
|
|
private readonly string _value;
|
|
|
|
|
|
2013-01-10 02:17:45 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of a StaticGenerator.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="value">The string to return.</param>
|
2013-01-09 02:33:53 +00:00
|
|
|
|
public StaticGenerator(string value)
|
|
|
|
|
{
|
|
|
|
|
_value = value;
|
|
|
|
|
}
|
|
|
|
|
|
2013-01-10 02:17:45 +00:00
|
|
|
|
string IGenerator.GetText(IFormatProvider provider, KeyScope scope)
|
2013-01-09 02:33:53 +00:00
|
|
|
|
{
|
|
|
|
|
return _value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|