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