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

◆ Equals()

override bool System.Attribute.Equals ( [NotNullWhen(true)] object? obj)
inlineinherited

Definition at line 691 of file Attribute.cs.

692 {
693 if (obj == null)
694 {
695 return false;
696 }
697 if (GetType() != obj.GetType())
698 {
699 return false;
700 }
701 Type type = GetType();
702 while (type != typeof(Attribute))
703 {
704 FieldInfo[] fields = type.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
705 for (int i = 0; i < fields.Length; i++)
706 {
707 object value = fields[i].GetValue(this);
708 object value2 = fields[i].GetValue(obj);
710 {
711 return false;
712 }
713 }
714 type = type.BaseType;
715 }
716 return true;
717 }
static bool AreFieldValuesEqual(object thisValue, object thatValue)
Definition Attribute.cs:748
object? GetValue(object? obj)

References System.Attribute.AreFieldValuesEqual(), System.Reflection.FieldInfo.GetValue(), System.obj, System.type, and System.value.

Referenced by System.ComponentModel.TypeDescriptor.AttributeProvider.AttributeTypeDescriptor.GetAttributes(), System.ComponentModel.DataAnnotations.CompareAttribute.IsValid(), System.Attribute.Match(), and System.ComponentModel.DataAnnotations.CustomValidationAttribute.ValidateMethodParameter().