Version 2.1.0.0

ValidationRunner class

Namespace: Sirenix.OdinInspector.Editor.Validation
Assembly: Sirenix.OdinInspector.Editor
public class ValidationRunner
Inheritance
  • System.Object
  • ValidationRunner

Constructors

ValidationRunner()
public ValidationRunner()

Fields

MaxScanDepth
public int MaxScanDepth
RecurseThroughUnityObjectReferences
public bool RecurseThroughUnityObjectReferences
ValidatorLocator
public IValidatorLocator ValidatorLocator
WarnOnScanDepthReached
public bool WarnOnScanDepthReached

Methods

TryValidateMemberRecursivelyAsCollection(Object, MemberInfo, IMemberSelector, Object, List<ValidationPathStep>, HashSet<Object>, HashSet<MemberInfo>, List<ValidationResult>, Int32)
protected virtual bool TryValidateMemberRecursivelyAsCollection(object collection, MemberInfo collectionMember, IMemberSelector selector, Object root, List<ValidationPathStep> pathSoFar, HashSet<object> seenReferences, HashSet<MemberInfo> seenMembers, List<ValidationResult> results, int scanDepth)
Parameters
System.Object collection

System.Reflection.MemberInfo collectionMember

Sirenix.OdinInspector.Editor.Validation.IMemberSelector selector

UnityEngine.Object root

System.Collections.Generic.List<ValidationPathStep> pathSoFar

System.Collections.Generic.HashSet<System.Object> seenReferences

System.Collections.Generic.HashSet<System.Reflection.MemberInfo> seenMembers

System.Collections.Generic.List<ValidationResult> results

System.Int32 scanDepth

Returns
System.Boolean

ValidateMember(Object, MemberInfo, Object, Type, Object, Boolean, ref List<ValidationResult>)
public virtual void ValidateMember(object parentInstance, MemberInfo member, object memberValue, Type memberValueType, Object root, bool isCollectionElement, ref List<ValidationResult> results)
Parameters
System.Object parentInstance

System.Reflection.MemberInfo member

System.Object memberValue

System.Type memberValueType

UnityEngine.Object root

System.Boolean isCollectionElement

System.Collections.Generic.List<ValidationResult> results

ValidateMemberRecursive(Object, MemberInfo, Object, Type, IMemberSelector, Object, List<ValidationPathStep>, HashSet<Object>, HashSet<MemberInfo>, List<ValidationResult>, Int32, Boolean)
protected virtual void ValidateMemberRecursive(object parentValue, MemberInfo member, object memberValue, Type memberValueType, IMemberSelector selector, Object root, List<ValidationPathStep> pathSoFar, HashSet<object> seenReferences, HashSet<MemberInfo> seenMembers, List<ValidationResult> results, int scanDepth, bool isInCollection = false)
Parameters
System.Object parentValue

System.Reflection.MemberInfo member

System.Object memberValue

System.Type memberValueType

Sirenix.OdinInspector.Editor.Validation.IMemberSelector selector

UnityEngine.Object root

System.Collections.Generic.List<ValidationPathStep> pathSoFar

System.Collections.Generic.HashSet<System.Object> seenReferences

System.Collections.Generic.HashSet<System.Reflection.MemberInfo> seenMembers

System.Collections.Generic.List<ValidationResult> results

System.Int32 scanDepth

System.Boolean isInCollection

ValidateMemberRecursive(Object, MemberInfo, Type, IMemberSelector, Object, ref List<ValidationResult>)
public virtual void ValidateMemberRecursive(object parentInstance, MemberInfo member, Type memberValueType, IMemberSelector selector, Object root, ref List<ValidationResult> results)
Parameters
System.Object parentInstance

System.Reflection.MemberInfo member

System.Type memberValueType

Sirenix.OdinInspector.Editor.Validation.IMemberSelector selector

UnityEngine.Object root

System.Collections.Generic.List<ValidationResult> results

ValidateMembers(Object, IMemberSelector, Object, Boolean, ref List<ValidationResult>)
public virtual void ValidateMembers(object value, IMemberSelector selector, Object root, bool isCollectionElement, ref List<ValidationResult> results)
Parameters
System.Object value

Sirenix.OdinInspector.Editor.Validation.IMemberSelector selector

UnityEngine.Object root

System.Boolean isCollectionElement

System.Collections.Generic.List<ValidationResult> results

ValidateMembersRecursively(Object, IMemberSelector, Object, ref List<ValidationResult>)
public virtual void ValidateMembersRecursively(object value, IMemberSelector selector, Object root, ref List<ValidationResult> results)
Parameters
System.Object value

Sirenix.OdinInspector.Editor.Validation.IMemberSelector selector

UnityEngine.Object root

System.Collections.Generic.List<ValidationResult> results

ValidateUnityObjectRecursively(Object)
public List<ValidationResult> ValidateUnityObjectRecursively(Object value)
Parameters
UnityEngine.Object value

Returns
System.Collections.Generic.List<ValidationResult>

ValidateUnityObjectRecursively(Object, ref List<ValidationResult>)
public virtual void ValidateUnityObjectRecursively(Object value, ref List<ValidationResult> results)
Parameters
UnityEngine.Object value

System.Collections.Generic.List<ValidationResult> results

ValidateValue(Object, Object, ref List<ValidationResult>)
public virtual void ValidateValue(object value, Object root, ref List<ValidationResult> results)
Parameters
System.Object value

UnityEngine.Object root

System.Collections.Generic.List<ValidationResult> results