Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
BrowsableAttribute.cs
Go to the documentation of this file.
2
4
5[AttributeUsage(AttributeTargets.All)]
6public sealed class BrowsableAttribute : Attribute
7{
8 public static readonly BrowsableAttribute Yes = new BrowsableAttribute(browsable: true);
9
10 public static readonly BrowsableAttribute No = new BrowsableAttribute(browsable: false);
11
12 public static readonly BrowsableAttribute Default = Yes;
13
14 public bool Browsable { get; }
15
16 public BrowsableAttribute(bool browsable)
17 {
18 Browsable = browsable;
19 }
20
21 public override bool Equals([NotNullWhen(true)] object? obj)
22 {
23 if (obj is BrowsableAttribute browsableAttribute)
24 {
25 return browsableAttribute.Browsable == Browsable;
26 }
27 return false;
28 }
29
30 public override int GetHashCode()
31 {
32 return Browsable.GetHashCode();
33 }
34
35 public override bool IsDefaultAttribute()
36 {
37 return Equals(Default);
38 }
39}
override bool Equals([NotNullWhen(true)] object? obj)
static readonly BrowsableAttribute Default
static readonly BrowsableAttribute No
static readonly BrowsableAttribute Yes