JD2022-TU1/main/tools/framework/JD.TeaBoxAddinSystem/Addins/Attributes/ConditionalTargetAttribute.cs

42 lines
1.2 KiB
C#

using System;
namespace JD.TeaBoxAddinSystem.Addins.Attributes
{
/// <summary>
/// Attribute used to bind addin conditions to boolean properties of extension nodes.
/// </summary>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class ConditionalTargetAttribute : StringPropertyConverterAttribute
{
#region Constructor
/// <summary>
/// Constructor.
/// </summary>
public ConditionalTargetAttribute()
: this(string.Empty, string.Empty)
{
}
/// <summary>
/// Constructor.
/// </summary>
/// <param name="name">Name of the attribute.</param>
public ConditionalTargetAttribute(string name)
: this(name, string.Empty)
{
}
/// <summary>
/// Constructor.
/// </summary>
/// <param name="name">Name of the attribute.</param>
/// <param name="description">Optional description of the attribute.</param>
public ConditionalTargetAttribute(string name, string description)
: base(name, false, description)
{
}
#endregion
}
}