mirror of
https://github.com/art-ist/mustache-sharp.git
synced 2024-06-16 21:05:32 +00:00

It could be useful to track which placeholders were found when parsing the template. This event will allow keys to be mapped to different keys, and support changing alignment and formatting.
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using System;
|
|
using mustache.Properties;
|
|
|
|
namespace mustache
|
|
{
|
|
/// <summary>
|
|
/// Holds the information descibing a key that is found in a template.
|
|
/// </summary>
|
|
public class PlaceholderFoundEventArgs : EventArgs
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of a PlaceholderFoundEventArgs.
|
|
/// </summary>
|
|
/// <param name="key">The key that was found.</param>
|
|
/// <param name="alignment">The alignment that will be applied to the substitute value.</param>
|
|
/// <param name="formatting">The formatting that will be applied to the substitute value.</param>
|
|
internal PlaceholderFoundEventArgs(string key, string alignment, string formatting)
|
|
{
|
|
Key = key;
|
|
Alignment = alignment;
|
|
Formatting = formatting;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the key that was found.
|
|
/// </summary>
|
|
public string Key { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the alignment that will be applied to the substitute value.
|
|
/// </summary>
|
|
public string Alignment { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the formatting that will be applied to the substitute value.
|
|
/// </summary>
|
|
public string Formatting { get; set; }
|
|
}
|
|
}
|