2013-04-25 01:21:00 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace mustache
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents a context within a template.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public sealed class Context
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of a Context.
|
|
|
|
|
/// </summary>
|
2013-04-25 12:46:03 +00:00
|
|
|
|
/// <param name="tagName">The name of the tag that created the context.</param>
|
2013-04-25 01:21:00 +00:00
|
|
|
|
/// <param name="argument">The argument used to create the context.</param>
|
2013-04-25 12:46:03 +00:00
|
|
|
|
internal Context(string tagName, ContextParameter[] parameters)
|
2013-04-25 01:21:00 +00:00
|
|
|
|
{
|
2013-04-25 12:46:03 +00:00
|
|
|
|
TagName = tagName;
|
|
|
|
|
Parameters = parameters;
|
2013-04-25 01:21:00 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the tag that created the context.
|
|
|
|
|
/// </summary>
|
2013-04-25 12:46:03 +00:00
|
|
|
|
public string TagName { get; private set; }
|
2013-04-25 01:21:00 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the argument used to create the context.
|
|
|
|
|
/// </summary>
|
2013-04-25 12:46:03 +00:00
|
|
|
|
public ContextParameter[] Parameters { get; private set; }
|
2013-04-25 01:21:00 +00:00
|
|
|
|
}
|
|
|
|
|
}
|