Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros
NotifyParentPropertyAttribute.cs
Go to the documentation of this file.
2
4
5[AttributeUsage(AttributeTargets.Property)]
7{
8 public static readonly NotifyParentPropertyAttribute Yes = new NotifyParentPropertyAttribute(notifyParent: true);
9
10 public static readonly NotifyParentPropertyAttribute No = new NotifyParentPropertyAttribute(notifyParent: false);
11
12 public static readonly NotifyParentPropertyAttribute Default = No;
13
14 public bool NotifyParent { get; }
15
16 public NotifyParentPropertyAttribute(bool notifyParent)
17 {
18 NotifyParent = notifyParent;
19 }
20
21 public override bool Equals([NotNullWhen(true)] object? obj)
22 {
23 if (obj is NotifyParentPropertyAttribute notifyParentPropertyAttribute)
24 {
25 return notifyParentPropertyAttribute.NotifyParent == NotifyParent;
26 }
27 return false;
28 }
29
30 public override int GetHashCode()
31 {
32 return base.GetHashCode();
33 }
34
35 public override bool IsDefaultAttribute()
36 {
37 return Equals(Default);
38 }
39}
override bool Equals([NotNullWhen(true)] object? obj)
static readonly NotifyParentPropertyAttribute Default
static readonly NotifyParentPropertyAttribute Yes