Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.ComponentModel.DataAnnotations.CustomValidationAttribute Class Referencesealed

Public Member Functions

 CustomValidationAttribute ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type validatorType, string method)
 
override string FormatErrorMessage (string name)
 
virtual bool IsValid (object? value)
 
ValidationResultGetValidationResult (object? value, ValidationContext validationContext)
 
void Validate (object? value, string name)
 
void Validate (object? value, ValidationContext validationContext)
 
override bool Equals ([NotNullWhen(true)] object? obj)
 
override int GetHashCode ()
 
virtual bool Match (object? obj)
 
virtual bool IsDefaultAttribute ()
 

Static Public Member Functions

static Attribute[] GetCustomAttributes (MemberInfo element, Type attributeType)
 
static Attribute[] GetCustomAttributes (MemberInfo element, Type attributeType, bool inherit)
 
static Attribute[] GetCustomAttributes (MemberInfo element)
 
static Attribute[] GetCustomAttributes (MemberInfo element, bool inherit)
 
static Attribute[] GetCustomAttributes (ParameterInfo element)
 
static Attribute[] GetCustomAttributes (ParameterInfo element, Type attributeType)
 
static Attribute[] GetCustomAttributes (ParameterInfo element, Type attributeType, bool inherit)
 
static Attribute[] GetCustomAttributes (ParameterInfo element, bool inherit)
 
static Attribute[] GetCustomAttributes (Module element, Type attributeType)
 
static Attribute[] GetCustomAttributes (Module element)
 
static Attribute[] GetCustomAttributes (Module element, bool inherit)
 
static Attribute[] GetCustomAttributes (Module element, Type attributeType, bool inherit)
 
static Attribute[] GetCustomAttributes (Assembly element, Type attributeType)
 
static Attribute[] GetCustomAttributes (Assembly element, Type attributeType, bool inherit)
 
static Attribute[] GetCustomAttributes (Assembly element)
 
static Attribute[] GetCustomAttributes (Assembly element, bool inherit)
 
static bool IsDefined (MemberInfo element, Type attributeType)
 
static bool IsDefined (MemberInfo element, Type attributeType, bool inherit)
 
static bool IsDefined (ParameterInfo element, Type attributeType)
 
static bool IsDefined (ParameterInfo element, Type attributeType, bool inherit)
 
static bool IsDefined (Module element, Type attributeType)
 
static bool IsDefined (Module element, Type attributeType, bool inherit)
 
static bool IsDefined (Assembly element, Type attributeType)
 
static bool IsDefined (Assembly element, Type attributeType, bool inherit)
 
static ? Attribute GetCustomAttribute (MemberInfo element, Type attributeType)
 
static ? Attribute GetCustomAttribute (MemberInfo element, Type attributeType, bool inherit)
 
static ? Attribute GetCustomAttribute (ParameterInfo element, Type attributeType)
 
static ? Attribute GetCustomAttribute (ParameterInfo element, Type attributeType, bool inherit)
 
static ? Attribute GetCustomAttribute (Module element, Type attributeType)
 
static ? Attribute GetCustomAttribute (Module element, Type attributeType, bool inherit)
 
static ? Attribute GetCustomAttribute (Assembly element, Type attributeType)
 
static ? Attribute GetCustomAttribute (Assembly element, Type attributeType, bool inherit)
 

Protected Member Functions

override? ValidationResult IsValid (object? value, ValidationContext validationContext)
 

Properties

Type ValidatorType [get]
 
override object TypeId [get]
 
string Method [get]
 
override bool RequiresValidationContext [get]
 
stringDefaultErrorMessage [set]
 
string ErrorMessageString [get]
 
bool CustomErrorMessageSet [get, private set]
 
stringErrorMessage [get, set]
 
stringErrorMessageResourceName [get, set]
 
TypeErrorMessageResourceType [get, set]
 

Private Member Functions

string CheckAttributeWellFormed ()
 
string ValidateValidatorTypeParameter ()
 
string ValidateMethodParameter ()
 
void ThrowIfAttributeNotWellFormed ()
 
bool TryConvertValue (object value, out object convertedValue)
 
void SetupResourceAccessor ()
 
void SetResourceAccessorByPropertyLookup ()
 

Static Private Member Functions

static Attribute[] InternalGetCustomAttributes (PropertyInfo element, Type type, bool inherit)
 
static Attribute[] InternalGetCustomAttributes (EventInfo element, Type type, bool inherit)
 
static bool InternalIsDefined (PropertyInfo element, Type attributeType, bool inherit)
 
static bool InternalIsDefined (EventInfo element, Type attributeType, bool inherit)
 
static PropertyInfo GetParentDefinition (PropertyInfo property, Type[] propertyParameters)
 
static EventInfo GetParentDefinition (EventInfo ev)
 
static ParameterInfo GetParentDefinition (ParameterInfo param)
 
static Attribute[] InternalParamGetCustomAttributes (ParameterInfo param, Type type, bool inherit)
 
static bool InternalParamIsDefined (ParameterInfo param, Type type, bool inherit)
 
static void CopyToAttributeList (List< Attribute > attributeList, Attribute[] attributes, Dictionary< Type, AttributeUsageAttribute > types)
 
static Type[] GetIndexParameterTypes (PropertyInfo element)
 
static void AddAttributesToList (List< Attribute > attributeList, Attribute[] attributes, Dictionary< Type, AttributeUsageAttribute > types)
 
static AttributeUsageAttribute InternalGetAttributeUsage (Type type)
 
static Attribute[] CreateAttributeArrayHelper (Type elementType, int elementCount)
 
static bool AreFieldValuesEqual (object thisValue, object thatValue)
 

Private Attributes

readonly Lazy< string_malformedErrorMessage
 
bool _isSingleArgumentMethod
 
string _lastMessage
 
MethodInfo _methodInfo
 
Type _firstParameterType
 
Tuple< string, Type_typeId
 
string _errorMessage
 
Func< string_errorMessageResourceAccessor
 
string _errorMessageResourceName
 
Type _errorMessageResourceType
 
volatile bool _hasBaseIsValid
 
string _defaultErrorMessage
 

Detailed Description

Definition at line 9 of file CustomValidationAttribute.cs.


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