terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
ToggleGroup.cs
Go to the documentation of this file.
1using System;
3using System.Linq;
7
8namespace UnityEngine.UI
9{
10 // Token: 0x02000076 RID: 118
12 [AddComponentMenu("UI/Toggle Group", 31)]
13 public class ToggleGroup : UIBehaviour
14 {
15 // Token: 0x17000150 RID: 336
16 // (get) Token: 0x060004E2 RID: 1250 RVA: 0x0000F5E0 File Offset: 0x0000D7E0
17 // (set) Token: 0x060004E3 RID: 1251 RVA: 0x0000F5F4 File Offset: 0x0000D7F4
18 public bool allowSwitchOff
19 {
20 get
21 {
22 return this.m_AllowSwitchOff;
23 }
24 set
25 {
26 }
27 }
28
29 // Token: 0x060004E4 RID: 1252 RVA: 0x0000F604 File Offset: 0x0000D804
30 protected ToggleGroup()
31 {
32 }
33
34 // Token: 0x060004E5 RID: 1253 RVA: 0x0000F618 File Offset: 0x0000D818
35 protected override void Start()
36 {
37 this.EnsureValidState();
38 base.Start();
39 }
40
41 // Token: 0x060004E6 RID: 1254 RVA: 0x0000F634 File Offset: 0x0000D834
42 protected override void OnEnable()
43 {
44 this.EnsureValidState();
45 base.OnEnable();
46 }
47
48 // Token: 0x060004E7 RID: 1255 RVA: 0x0000F650 File Offset: 0x0000D850
49 private void ValidateToggleIsInGroup(Toggle toggle)
50 {
51 if (!true)
52 {
53 }
55 }
56
57 // Token: 0x060004E8 RID: 1256 RVA: 0x0000F674 File Offset: 0x0000D874
58 public void NotifyToggleOn(Toggle toggle, bool sendCallback = true)
59 {
60 this.ValidateToggleIsInGroup(toggle);
61 int size = this.m_Toggles._size;
63 int size2 = this.m_Toggles._size;
64 }
65
66 // Token: 0x060004E9 RID: 1257 RVA: 0x0000F6B0 File Offset: 0x0000D8B0
67 public void UnregisterToggle(Toggle toggle)
68 {
71 }
72
73 // Token: 0x060004EA RID: 1258 RVA: 0x00002207 File Offset: 0x00000407
74 public void RegisterToggle(Toggle toggle)
75 {
76 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
77 }
78
79 // Token: 0x060004EB RID: 1259 RVA: 0x0000F6CC File Offset: 0x0000D8CC
80 public void EnsureValidState()
81 {
82 if (!this.m_AllowSwitchOff)
83 {
84 bool flag = this.AnyTogglesOn();
85 if (this.m_Toggles._size != 0)
86 {
88 }
89 }
90 IEnumerable<Toggle> enumerable = this.ActiveToggles();
91 int num = Enumerable.Count(enumerable);
93 }
94
95 // Token: 0x060004EC RID: 1260 RVA: 0x0000F758 File Offset: 0x0000D958
96 public bool AnyTogglesOn()
97 {
99 if (!true)
100 {
101 }
102 if (!true)
103 {
104 }
105 bool flag;
106 return flag;
107 }
108
109 // Token: 0x060004ED RID: 1261 RVA: 0x0000F774 File Offset: 0x0000D974
111 {
112 /*
113An exception occurred when decompiling this method (060004ED)
114
115ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.IEnumerable`1<UnityEngine.UI.Toggle> UnityEngine.UI.ToggleGroup::ActiveToggles()
116
117 ---> System.Exception: Basic block has to end with unconditional control flow.
118{
119 IL_000A:
120 brtrue(IL_0000, ldc.i4:bool(1))
121}
122
123 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
124 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
125 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
126 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
127 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
128 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
129 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
130 --- End of inner exception stack trace ---
131 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
132 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
133*/;
134 }
135
136 // Token: 0x060004EE RID: 1262 RVA: 0x0000F790 File Offset: 0x0000D990
138 {
139 IEnumerable<Toggle> enumerable = this.ActiveToggles();
140 int num = Enumerable.Count(enumerable);
141 return Enumerable.First<Toggle>(enumerable);
142 }
143
144 // Token: 0x060004EF RID: 1263 RVA: 0x0000F7B4 File Offset: 0x0000D9B4
145 public void SetAllTogglesOff(bool sendCallback = true)
146 {
148 int num = 1;
150 this.m_AllowSwitchOff = num != 0;
151 int size = toggles._size;
152 int size2 = this.m_Toggles._size;
153 }
154
155 // Token: 0x04000252 RID: 594
157 private bool m_AllowSwitchOff;
158
159 // Token: 0x04000253 RID: 595
161
162 // Token: 0x02000077 RID: 119
164 [Serializable]
165 private sealed class <>c
166 {
167 // Token: 0x060004F0 RID: 1264 RVA: 0x0000F814 File Offset: 0x0000DA14
168 // Note: this type is marked as 'beforefieldinit'.
169 static <>c()
170 {
171 }
172
173 // Token: 0x060004F1 RID: 1265 RVA: 0x0000F824 File Offset: 0x0000DA24
174 public <>c()
175 {
176 }
177
178 // Token: 0x060004F2 RID: 1266 RVA: 0x0000F838 File Offset: 0x0000DA38
180 {
181 return x.m_IsOn;
182 }
183
184 // Token: 0x060004F3 RID: 1267 RVA: 0x0000F84C File Offset: 0x0000DA4C
185 internal bool <ActiveToggles>b__14_0(Toggle x)
186 {
187 return x.m_IsOn;
188 }
189
190 // Token: 0x04000254 RID: 596
191 public static readonly ToggleGroup.<>c <>9;
192
193 // Token: 0x04000255 RID: 597
194 public static Predicate<Toggle> <>9__13_0;
195
196 // Token: 0x04000256 RID: 598
197 public static Func<Toggle, bool> <>9__14_0;
198 }
199 }
200}
class f__AnonymousType0<< Count > j__TPar
void RegisterToggle(Toggle toggle)
void NotifyToggleOn(Toggle toggle, bool sendCallback=true)
IEnumerable< Toggle > ActiveToggles()
void ValidateToggleIsInGroup(Toggle toggle)
void UnregisterToggle(Toggle toggle)
override void OnEnable()
void SetAllTogglesOff(bool sendCallback=true)