163 lines
8.8 KiB
C#
163 lines
8.8 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SignalRCore.Encoders
|
|
{
|
|
// Token: 0x0200130E RID: 4878
|
|
[Token(Token = "0x200130E")]
|
|
[StructLayout(3)]
|
|
public sealed class LitJsonEncoder : IEncoder
|
|
{
|
|
// Token: 0x170013E2 RID: 5090
|
|
// (get) Token: 0x06007A2F RID: 31279 RVA: 0x001961EC File Offset: 0x001943EC
|
|
[Token(Token = "0x170013E2")]
|
|
public string Name
|
|
{
|
|
[Token(Token = "0x6007A2F")]
|
|
[Address(RVA = "0x6EFCB0", Offset = "0x6EE6B0", VA = "0x1806EFCB0", Slot = "4")]
|
|
get
|
|
{
|
|
return "json";
|
|
}
|
|
}
|
|
|
|
// Token: 0x06007A30 RID: 31280 RVA: 0x00196200 File Offset: 0x00194400
|
|
[Token(Token = "0x6007A30")]
|
|
[Address(RVA = "0x6EF7E0", Offset = "0x6EE1E0", VA = "0x1806EF7E0")]
|
|
public LitJsonEncoder()
|
|
{
|
|
KJBJHOONAKL<int, long> <>9__2_ = LitJsonEncoder.<>c.<>9__2_0;
|
|
if (<>9__2_ == 0)
|
|
{
|
|
LitJsonEncoder.<>c.<>9__2_0 = delegate(int input)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
};
|
|
}
|
|
NOEIKACMNJH.EDOFHMLFIHF<int, long>(<>9__2_);
|
|
KJBJHOONAKL<long, int> kjbjhoonakl;
|
|
if (LitJsonEncoder.<>c.<>9__2_1 == 0)
|
|
{
|
|
kjbjhoonakl = delegate(long input)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
};
|
|
LitJsonEncoder.<>c.<>9__2_1 = kjbjhoonakl;
|
|
}
|
|
NOEIKACMNJH.EDOFHMLFIHF<long, int>(kjbjhoonakl);
|
|
KJBJHOONAKL<double, int> kjbjhoonakl2;
|
|
if (LitJsonEncoder.<>c.<>9__2_2 == 0)
|
|
{
|
|
kjbjhoonakl2 = delegate(double input)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
};
|
|
LitJsonEncoder.<>c.<>9__2_2 = kjbjhoonakl2;
|
|
}
|
|
NOEIKACMNJH.EDOFHMLFIHF<double, int>(kjbjhoonakl2);
|
|
KJBJHOONAKL<string, DateTime> kjbjhoonakl3;
|
|
if (LitJsonEncoder.<>c.<>9__2_3 == 0)
|
|
{
|
|
kjbjhoonakl3 = (string input) => Convert.ToDateTime(input);
|
|
LitJsonEncoder.<>c.<>9__2_3 = kjbjhoonakl3;
|
|
}
|
|
NOEIKACMNJH.EDOFHMLFIHF<string, DateTime>(kjbjhoonakl3);
|
|
KJBJHOONAKL<double, float> kjbjhoonakl4;
|
|
if (LitJsonEncoder.<>c.<>9__2_4 == 0)
|
|
{
|
|
kjbjhoonakl4 = delegate(double input)
|
|
{
|
|
};
|
|
LitJsonEncoder.<>c.<>9__2_4 = kjbjhoonakl4;
|
|
}
|
|
NOEIKACMNJH.EDOFHMLFIHF<double, float>(kjbjhoonakl4);
|
|
KJBJHOONAKL<string, byte[]> kjbjhoonakl5;
|
|
if (LitJsonEncoder.<>c.<>9__2_5 == 0)
|
|
{
|
|
kjbjhoonakl5 = (string input) => Convert.FromBase64String(input);
|
|
LitJsonEncoder.<>c.<>9__2_5 = kjbjhoonakl5;
|
|
}
|
|
NOEIKACMNJH.EDOFHMLFIHF<string, byte[]>(kjbjhoonakl5);
|
|
}
|
|
|
|
// Token: 0x06007A31 RID: 31281 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x6007A31")]
|
|
[Address(RVA = "0x1B5F900", Offset = "0x1B5E300", VA = "0x181B5F900", Slot = "6")]
|
|
public T DecodeAs<T>(string text)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06007A32 RID: 31282 RVA: 0x001962F8 File Offset: 0x001944F8
|
|
[Token(Token = "0x6007A32")]
|
|
[Address(RVA = "0x1B5F9A0", Offset = "0x1B5E3A0", VA = "0x181B5F9A0", Slot = "8")]
|
|
public T DecodeAs<T>(byte[] data)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06007A32)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling T BestHTTP.SignalRCore.Encoders.LitJsonEncoder::DecodeAs<T>(System.Byte[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:NotImplementedException(var_0_05, newobj:NotImplementedException(NotImplementedException::.ctor))
|
|
}
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
--- End of inner exception stack trace ---
|
|
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
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06007A33 RID: 31283 RVA: 0x0019630C File Offset: 0x0019450C
|
|
[Token(Token = "0x6007A33")]
|
|
[Address(RVA = "0x20DD940", Offset = "0x20DC340", VA = "0x1820DD940", Slot = "7")]
|
|
public byte[] EncodeAsBinary<T>(T value)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06007A33)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SignalRCore.Encoders.LitJsonEncoder::EncodeAsBinary<T>(T)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:NotImplementedException(var_0_05, newobj:NotImplementedException(NotImplementedException::.ctor))
|
|
}
|
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
--- End of inner exception stack trace ---
|
|
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
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06007A34 RID: 31284 RVA: 0x00196320 File Offset: 0x00194520
|
|
[Token(Token = "0x6007A34")]
|
|
[Address(RVA = "0x20434A0", Offset = "0x2041EA0", VA = "0x1820434A0", Slot = "5")]
|
|
public string EncodeAsText<T>(T value)
|
|
{
|
|
string text;
|
|
return text;
|
|
}
|
|
|
|
// Token: 0x06007A35 RID: 31285 RVA: 0x00196330 File Offset: 0x00194530
|
|
[Token(Token = "0x6007A35")]
|
|
[Address(RVA = "0x6EF770", Offset = "0x6EE170", VA = "0x1806EF770", Slot = "9")]
|
|
public object ConvertTo(Type toType, object obj)
|
|
{
|
|
string text = NOEIKACMNJH.MFFBDFHINID(obj);
|
|
return NOEIKACMNJH.IGOEEFAAPKD(toType, text);
|
|
}
|
|
}
|
|
}
|