4
0
mirror of https://github.com/art-ist/mustache-sharp.git synced 2024-06-16 21:05:32 +00:00
MustacheSharp/mustache-sharp/MasterTagDefinition.cs
Travis Parks 7d75c7a2e4 Implemented better custom tag handling.
I needed to make it easier to handle scopes and define custom tags,
including context-sensitive tags.
2013-01-12 14:53:12 -05:00

37 lines
1.0 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[] { };
}
}
}