Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SetupResourceAccessor()

void System.ComponentModel.DataAnnotations.ValidationAttribute.SetupResourceAccessor ( )
inlineprivate

Definition at line 108 of file ValidationAttribute.cs.

109 {
111 {
112 return;
113 }
114 string localErrorMessage = ErrorMessage;
115 bool flag = !string.IsNullOrEmpty(_errorMessageResourceName);
116 bool flag2 = !string.IsNullOrEmpty(_errorMessage);
117 bool flag3 = _errorMessageResourceType != null;
118 bool flag4 = !string.IsNullOrEmpty(_defaultErrorMessage);
119 if ((flag && flag2) || !(flag || flag2 || flag4))
120 {
122 }
123 if (flag3 != flag)
124 {
126 }
127 if (flag)
128 {
130 return;
131 }
132 _errorMessageResourceAccessor = () => localErrorMessage;
133 }
static string ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource
Definition SR.cs:104
static string ValidationAttribute_NeedBothResourceTypeAndResourceName
Definition SR.cs:108
Definition SR.cs:7

References System.ComponentModel.DataAnnotations.ValidationAttribute._defaultErrorMessage, System.ComponentModel.DataAnnotations.ValidationAttribute._errorMessage, System.ComponentModel.DataAnnotations.ValidationAttribute._errorMessageResourceAccessor, System.ComponentModel.DataAnnotations.ValidationAttribute._errorMessageResourceName, System.ComponentModel.DataAnnotations.ValidationAttribute._errorMessageResourceType, System.ComponentModel.DataAnnotations.ValidationAttribute.ErrorMessage, System.ComponentModel.DataAnnotations.ValidationAttribute.SetResourceAccessorByPropertyLookup(), System.SR.ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource, and System.SR.ValidationAttribute_NeedBothResourceTypeAndResourceName.