MustacheSharp/mustache-sharp/MasterTagDefinition.cs

46 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
namespace mustache
{
/// <summary>
/// Defines a pseudo tag that wraps the entire content of a format string.
/// </summary>
internal sealed class MasterTagDefinition : ContentTagDefinition
{
/// <summary>
/// Initializes a new instance of a MasterTagDefinition.
/// </summary>
public MasterTagDefinition()
: base(String.Empty, true)
{
}
/// <summary>
/// Gets whether the tag only exists within the scope of its parent.
/// </summary>
protected override bool GetIsContextSensitive()
{
return true;
}
/// <summary>
/// Gets the name of the tags that indicate that the tag's context is closed.
/// </summary>
/// <returns>The tag names.</returns>
protected override IEnumerable<string> GetClosingTags()
{
return new string[] { };
}
/// <summary>
/// Gets the parameter that is used to create a new child context.
/// </summary>
/// <returns>The parameter that is used to create a new child context.</returns>
public override TagParameter GetChildContextParameter()
{
return null;
}
}
}