Version 2.1.0.0

AttributeValidator<TAttribute> class

Namespace: Sirenix.OdinInspector.Editor.Validation
Assembly: Sirenix.OdinInspector.Editor
public abstract class AttributeValidator<TAttribute> : Validator, IAttributeValidator where TAttribute : Attribute
Inheritance
  • System.Object
  • Validator
  • AttributeValidator<TAttribute>

Type Parameters

TAttribute

Constructors

AttributeValidator()
protected AttributeValidator()

Properties

Attribute
public TAttribute Attribute { get; }

Methods

CanValidateMembers()
public override sealed bool CanValidateMembers()
Returns
System.Boolean

CanValidateValue(Type)
public override sealed bool CanValidateValue(Type type)
Parameters
System.Type type

Returns
System.Boolean

CanValidateValues()
public override sealed bool CanValidateValues()
Returns
System.Boolean

Initialize(Type)
public override sealed void Initialize(Type type)
Parameters
System.Type type

RunMemberValidation(Object, MemberInfo, Object, Object, ref ValidationResult)
public override sealed void RunMemberValidation(object parentInstance, MemberInfo member, object memberValue, Object root, ref ValidationResult result)
Parameters
System.Object parentInstance

System.Reflection.MemberInfo member

System.Object memberValue

UnityEngine.Object root

ValidationResult result

RunValueValidation(Object, Object, ref ValidationResult)
public override sealed void RunValueValidation(object value, Object root, ref ValidationResult result)
Parameters
System.Object value

UnityEngine.Object root

ValidationResult result

Validate(Object, Object, MemberInfo, ValidationResult)
protected abstract void Validate(object parentInstance, object memberValue, MemberInfo member, ValidationResult result)
Parameters
System.Object parentInstance

System.Object memberValue

System.Reflection.MemberInfo member

ValidationResult result