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
AttributeUtilities.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x02000B00 RID: 2816
8 public static class AttributeUtilities
9 {
10 // Token: 0x06005270 RID: 21104 RVA: 0x00282EE8 File Offset: 0x002810E8
11 public static T GetAttribute<T>(this MethodBase method) where T : Attribute
12 {
13 object obj;
14 while (obj != null)
15 {
16 if (obj == null)
17 {
18 throw new InvalidCastException();
19 }
20 }
21 }
22
23 // Token: 0x06005271 RID: 21105 RVA: 0x00282F04 File Offset: 0x00281104
24 public static T GetAttribute<T>(this Enum value) where T : Attribute
25 {
26 /*
27An exception occurred when decompiling this method (06005271)
28
29ICSharpCode.Decompiler.DecompilerException: Error decompiling T ReLogic.Utilities.AttributeUtilities::GetAttribute<T>(System.Enum)
30
31 ---> System.Exception: Basic block has to end with unconditional control flow.
32{
33 Block_0:
34 stloc:int64(var_0_01, ldc.i4:int64(0))
35 stloc:string(var_2_09, call:string(Enum::GetName, ldloc:Type(var_1), ldloc:int64[exp:object](var_0_01)))
36 stloc:FieldInfo(var_3_11, call:FieldInfo(Type::GetField, ldloc:Type(var_1), ldloc:string(var_2_09)))
37}
38
39 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
40 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
41 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
42 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
43 --- End of inner exception stack trace ---
44 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
45 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
46*/;
47 }
48
49 // Token: 0x06005272 RID: 21106 RVA: 0x000021DB File Offset: 0x000003DB
51 {
52 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
53 }
54
55 // Token: 0x06005273 RID: 21107 RVA: 0x000021DB File Offset: 0x000003DB
56 public static T GetAttribute<T>(this Type type) where T : Attribute
57 {
58 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
59 }
60
61 // Token: 0x02000B01 RID: 2817
62 private static class TypeAttributeCache<T, A> where A : Attribute
63 {
64 // Token: 0x06005274 RID: 21108 RVA: 0x00282F24 File Offset: 0x00281124
65 // Note: this type is marked as 'beforefieldinit'.
67 {
68 }
69
70 // Token: 0x04008AC1 RID: 35521
71 public static readonly A Value;
72 }
73 }
74}
class f__AnonymousType0<< Count > j__TPar
static T GetAttribute< T >(this MethodBase method)