Tanoda
Leap.Unity.Attributes.DisableIfBase Class Reference

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: More...

Inheritance diagram for Leap.Unity.Attributes.DisableIfBase:
Leap.Unity.Attributes.CombinablePropertyAttribute Leap.Unity.Attributes.IPropertyDisabler Leap.Unity.Attributes.DisableIf Leap.Unity.Attributes.DisableIfAll Leap.Unity.Attributes.DisableIfAny Leap.Unity.Attributes.DisableIfEqual Leap.Unity.Attributes.DisableIfNotEqual

Public Member Functions

 DisableIfBase (object isEqualTo, object isNotEqualTo, bool isAndOperation, bool nullIsValid, bool equalToComparison, params string[] propertyNames)
 

Public Attributes

readonly string[] propertyNames
 
readonly object testValue
 
readonly bool disableResult
 
readonly bool isAndOperation
 
readonly bool nullIsValid
 
readonly bool equalToComparison
 

Additional Inherited Members

- Properties inherited from Leap.Unity.Attributes.CombinablePropertyAttribute
FieldInfo? fieldInfo [get, protected set]
 
UnityObject[]? targets [get, protected set]
 

Detailed Description

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)]

Definition at line 27 of file DisableIf.cs.

Constructor & Destructor Documentation

◆ DisableIfBase()

Leap.Unity.Attributes.DisableIfBase.DisableIfBase ( object  isEqualTo,
object  isNotEqualTo,
bool  isAndOperation,
bool  nullIsValid,
bool  equalToComparison,
params string[]  propertyNames 
)

Definition at line 35 of file DisableIf.cs.

Member Data Documentation

◆ disableResult

readonly bool Leap.Unity.Attributes.DisableIfBase.disableResult

Definition at line 30 of file DisableIf.cs.

◆ equalToComparison

readonly bool Leap.Unity.Attributes.DisableIfBase.equalToComparison

Definition at line 33 of file DisableIf.cs.

◆ isAndOperation

readonly bool Leap.Unity.Attributes.DisableIfBase.isAndOperation

Definition at line 31 of file DisableIf.cs.

◆ nullIsValid

readonly bool Leap.Unity.Attributes.DisableIfBase.nullIsValid

Definition at line 32 of file DisableIf.cs.

◆ propertyNames

readonly string [] Leap.Unity.Attributes.DisableIfBase.propertyNames

Definition at line 28 of file DisableIf.cs.

◆ testValue

readonly object Leap.Unity.Attributes.DisableIfBase.testValue

Definition at line 29 of file DisableIf.cs.


The documentation for this class was generated from the following file: