Class Leap::Attributes::DisableIfBase¶
- class Leap.Attributes.DisableIfBase : public Leap.Attributes.CombinablePropertyAttribute, public Leap.Attributes.IPropertyDisabler¶
Conditionally disables a property based on the value of another property. The only condition types that are currently supported are bool types, and enum types. The property has two arguments names ‘equalTo’ and ‘notEqualTo’. Exactly one of them must be specified, like so:
[DisableIf(“myBoolProperty”, isEqualTo: true)] [DisableIf(“myEnumProperty”, isNotEqualTo: MyEnum.Value)] [DisableIfAny(“bool1”, “bool2”, isEqualTo: false)] [DisableIfAll(“cond1”, “cond2”, “cond3”, isNotEqualTo: true)]
Subclassed by Leap.Attributes.DisableIf, Leap.Attributes.DisableIfAll, Leap.Attributes.DisableIfAny, Leap.Attributes.DisableIfEqual, Leap.Attributes.DisableIfNotEqual