2013-04-24 12:58:19 +00:00
|
|
|
|
using System;
|
2013-05-03 12:44:51 +00:00
|
|
|
|
using Mustache.Properties;
|
2013-04-24 12:58:19 +00:00
|
|
|
|
|
2013-05-03 12:44:51 +00:00
|
|
|
|
namespace Mustache
|
2013-04-24 12:58:19 +00:00
|
|
|
|
{
|
|
|
|
|
/// <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>
|
2016-03-21 17:41:46 +00:00
|
|
|
|
/// <param name="isExtension">Indicates whether the placeholder was found within triple curly braces.</param>
|
2013-04-25 01:21:00 +00:00
|
|
|
|
/// <param name="context">The context where the placeholder was found.</param>
|
2016-03-21 17:41:46 +00:00
|
|
|
|
internal PlaceholderFoundEventArgs(string key, string alignment, string formatting, bool isExtension, Context[] context)
|
2013-04-24 12:58:19 +00:00
|
|
|
|
{
|
|
|
|
|
Key = key;
|
|
|
|
|
Alignment = alignment;
|
|
|
|
|
Formatting = formatting;
|
2013-04-25 01:21:00 +00:00
|
|
|
|
Context = context;
|
2013-04-24 12:58:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <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; }
|
2013-04-25 01:21:00 +00:00
|
|
|
|
|
2016-03-21 17:41:46 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets whether the placeholder was found within triple curly braces.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool IsExtension { get; set; }
|
|
|
|
|
|
2013-04-25 01:21:00 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the context where the placeholder was found.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Context[] Context { get; private set; }
|
2013-04-24 12:58:19 +00:00
|
|
|
|
}
|
|
|
|
|
}
|