4
0
mirror of https://github.com/art-ist/mustache-sharp.git synced 2024-06-16 21:05:32 +00:00
MustacheSharp/mustache-sharp/InlineTagDefinition.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

47 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
namespace mustache
{
/// <summary>
/// Defines a tag that cannot contain inner text.
/// </summary>
public abstract class InlineTagDefinition : TagDefinition
{
/// <summary>
/// Initializes a new instance of an InlineTagDefinition.
/// </summary>
/// <param name="tagName">The name of the tag being defined.</param>
protected InlineTagDefinition(string tagName)
: base(tagName)
{
}
/// <summary>
/// Initializes a new instance of an InlineTagDefinition.
/// </summary>
/// <param name="tagName">The name of the tag being defined.</param>
/// <param name="isBuiltin">Specifies whether the tag is a built-in tag.</param>
internal InlineTagDefinition(string tagName, bool isBuiltin)
: base(tagName, isBuiltin)
{
}
/// <summary>
/// Gets or sets whether the tag can have content.
/// </summary>
/// <returns>True if the tag can have a body; otherwise, false.</returns>
protected override bool GetHasContent()
{
return false;
}
public sealed override string Decorate(IFormatProvider provider, string innerText, Dictionary<string, object> arguments)
{
return Decorate(provider, arguments);
}
public abstract string Decorate(IFormatProvider provider, Dictionary<string, object> arguments);
}
}