Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
UIHintAttribute.cs
Go to the documentation of this file.
3using System.Linq;
4
6
7[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]
9{
10 internal sealed class UIHintImplementation
11 {
12 private readonly object[] _inputControlParameters;
13
15
16 public string UIHint { get; }
17
18 public string PresentationLayer { get; }
19
21
32
33 public override int GetHashCode()
34 {
35 string text = UIHint ?? string.Empty;
36 string text2 = PresentationLayer ?? string.Empty;
37 return text.GetHashCode() ^ text2.GetHashCode();
38 }
39
40 public override bool Equals([NotNullWhen(true)] object obj)
41 {
43 {
44 return false;
45 }
48 try
49 {
51 controlParameters2 = uIHintImplementation.ControlParameters;
52 }
54 {
55 return false;
56 }
58 {
59 return false;
60 }
61 return controlParameters.OrderBy((KeyValuePair<string, object> p) => p.Key).SequenceEqual(controlParameters2.OrderBy((KeyValuePair<string, object> p) => p.Key));
62 }
63
96 }
97
99
100 public string UIHint => _implementation.UIHint;
101
103
105
106 public UIHintAttribute(string uiHint)
107 : this(uiHint, null, Array.Empty<object>())
108 {
109 }
110
113 {
114 }
115
120
121 public override int GetHashCode()
122 {
124 }
125
126 public override bool Equals([NotNullWhen(true)] object? obj)
127 {
129 {
130 return _implementation.Equals(uIHintAttribute._implementation);
131 }
132 return false;
133 }
134}
static unsafe void Copy(Array sourceArray, Array destinationArray, int length)
Definition Array.cs:624
UIHintImplementation(string uiHint, string presentationLayer, params object[] controlParameters)
override bool Equals([NotNullWhen(true)] object? obj)
UIHintAttribute(string uiHint, string? presentationLayer, params object?[]? controlParameters)
UIHintAttribute(string uiHint, string? presentationLayer)
static string UIHintImplementation_NeedEvenNumberOfControlParameters
Definition SR.cs:100
static string UIHintImplementation_ControlParameterKeyOccursMoreThanOnce
Definition SR.cs:98
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string UIHintImplementation_ControlParameterKeyIsNull
Definition SR.cs:96
static string UIHintImplementation_ControlParameterKeyIsNotAString
Definition SR.cs:94
Definition SR.cs:7