using System; using Mustache.Properties; namespace Mustache { /// /// Defines a parameter belonging to a custom tag. /// public sealed class TagParameter { /// /// Initializes a new instance of a TagParameter. /// /// The name of the parameter. /// The parameter name is null or an invalid identifier. public TagParameter(string parameterName) { if (!RegexHelper.IsValidIdentifier(parameterName)) { throw new ArgumentException(Resources.BlankParameterName, "parameterName"); } Name = parameterName; } /// /// Gets the name of the parameter. /// public string Name { get; } /// /// Gets or sets whether the field is required. /// public bool IsRequired { get; set; } /// /// Gets or sets the default value to use when an argument is not provided /// for the parameter. /// public object DefaultValue { get; set; } } }