Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
InstallerTypeAttribute.cs
Go to the documentation of this file.
2
4
5[AttributeUsage(AttributeTargets.Class)]
7{
8 [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
9 private readonly string _typeName;
10
11 [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
13
14 public InstallerTypeAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type installerType)
15 {
16 if (installerType == null)
17 {
18 throw new ArgumentNullException("installerType");
19 }
20 _typeName = installerType.AssemblyQualifiedName;
21 }
22
23 public InstallerTypeAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] string? typeName)
24 {
25 _typeName = typeName;
26 }
27
28 public override bool Equals([NotNullWhen(true)] object? obj)
29 {
30 if (obj == this)
31 {
32 return true;
33 }
34 if (obj is InstallerTypeAttribute installerTypeAttribute)
35 {
36 return installerTypeAttribute._typeName == _typeName;
37 }
38 return false;
39 }
40
41 public override int GetHashCode()
42 {
43 return base.GetHashCode();
44 }
45}
InstallerTypeAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type installerType)
override bool Equals([NotNullWhen(true)] object? obj)
InstallerTypeAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] string? typeName)
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Definition Type.cs:408
string? AssemblyQualifiedName
Definition Type.cs:45