|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace NaughtyAttributes
|
|
|
|
|
{
|
|
|
|
|
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
|
|
|
|
|
public class HideIfAttribute : ShowIfAttributeBase
|
|
|
|
|
{
|
|
|
|
|
public HideIfAttribute(string condition)
|
|
|
|
|
: base(condition)
|
|
|
|
|
{
|
|
|
|
|
Inverted = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public HideIfAttribute(EConditionOperator conditionOperator, params string[] conditions)
|
|
|
|
|
: base(conditionOperator, conditions)
|
|
|
|
|
{
|
|
|
|
|
Inverted = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public HideIfAttribute(string enumName, object enumValue)
|
|
|
|
|
: base(enumName, enumValue as Enum)
|
|
|
|
|
{
|
|
|
|
|
Inverted = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|