You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
732 B
C#
27 lines
732 B
C#
using System;
|
|
|
|
namespace NaughtyAttributes
|
|
{
|
|
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
|
|
public class DisableIfAttribute : EnableIfAttributeBase
|
|
{
|
|
public DisableIfAttribute(string condition)
|
|
: base(condition)
|
|
{
|
|
Inverted = true;
|
|
}
|
|
|
|
public DisableIfAttribute(EConditionOperator conditionOperator, params string[] conditions)
|
|
: base(conditionOperator, conditions)
|
|
{
|
|
Inverted = true;
|
|
}
|
|
|
|
public DisableIfAttribute(string enumName, object enumValue)
|
|
: base(enumName, enumValue as Enum)
|
|
{
|
|
Inverted = true;
|
|
}
|
|
}
|
|
}
|