Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PasswordPropertyTextAttribute.cs
Go to the documentation of this file.
2
4
5[AttributeUsage(AttributeTargets.All)]
7{
8 public static readonly PasswordPropertyTextAttribute Yes = new PasswordPropertyTextAttribute(password: true);
9
10 public static readonly PasswordPropertyTextAttribute No = new PasswordPropertyTextAttribute(password: false);
11
12 public static readonly PasswordPropertyTextAttribute Default = No;
13
14 public bool Password { get; }
15
17 : this(password: false)
18 {
19 }
20
21 public PasswordPropertyTextAttribute(bool password)
22 {
23 Password = password;
24 }
25
26 public override bool Equals([NotNullWhen(true)] object? o)
27 {
29 {
30 return ((PasswordPropertyTextAttribute)o).Password == Password;
31 }
32 return false;
33 }
34
35 public override int GetHashCode()
36 {
37 return base.GetHashCode();
38 }
39
40 public override bool IsDefaultAttribute()
41 {
42 return Equals(Default);
43 }
44}
static readonly PasswordPropertyTextAttribute Yes
static readonly PasswordPropertyTextAttribute Default
override bool Equals([NotNullWhen(true)] object? o)