Files
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

178 lines
7.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using BestHTTP.SignalRCore.Messages;
using Cpp2IlInjected;
namespace BestHTTP.SignalRCore
{
// Token: 0x020019CC RID: 6604
[Token(Token = "0x20019CC")]
public sealed class JsonProtocol : IProtocol
{
// Token: 0x17001881 RID: 6273
// (get) Token: 0x060099DD RID: 39389 RVA: 0x001F6B88 File Offset: 0x001F4D88
[Token(Token = "0x17001881")]
public TransferModes Type
{
[Token(Token = "0x60099DD")]
[Address(RVA = "0x4E8690", Offset = "0x4E7690", VA = "0x1804E8690", Slot = "4")]
get
{
return TransferModes.Text;
}
}
// Token: 0x17001882 RID: 6274
// (get) Token: 0x060099DE RID: 39390 RVA: 0x001F6B98 File Offset: 0x001F4D98
// (set) Token: 0x060099DF RID: 39391 RVA: 0x001F6BAC File Offset: 0x001F4DAC
[Token(Token = "0x17001882")]
public IEncoder Encoder
{
[Token(Token = "0x60099DE")]
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530", Slot = "5")]
get;
[Token(Token = "0x60099DF")]
[Address(RVA = "0x415800", Offset = "0x414800", VA = "0x180415800")]
private set;
}
// Token: 0x17001883 RID: 6275
// (get) Token: 0x060099E0 RID: 39392 RVA: 0x001F6BC0 File Offset: 0x001F4DC0
// (set) Token: 0x060099E1 RID: 39393 RVA: 0x001F6BD4 File Offset: 0x001F4DD4
[Token(Token = "0x17001883")]
public HubConnection Connection
{
[Token(Token = "0x60099E0")]
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0", Slot = "6")]
get;
[Token(Token = "0x60099E1")]
[Address(RVA = "0x4157F0", Offset = "0x4147F0", VA = "0x1804157F0", Slot = "7")]
set;
}
// Token: 0x060099E2 RID: 39394 RVA: 0x001F6BE8 File Offset: 0x001F4DE8
[Token(Token = "0x60099E2")]
[Address(RVA = "0x62B800", Offset = "0x62A800", VA = "0x18062B800")]
public JsonProtocol(IEncoder encoder)
{
/*
An exception occurred when decompiling this method (060099E2)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SignalRCore.JsonProtocol::.ctor(BestHTTP.SignalRCore.IEncoder)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_25:
stloc:ArgumentException(var_1_2F, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Encoder must be a json encoder!")))
}
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: 0x060099E3 RID: 39395 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x60099E3")]
[Address(RVA = "0x62B510", Offset = "0x62A510", VA = "0x18062B510", Slot = "8")]
public void ParseMessages(string data, ref List<Message> messages)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060099E4 RID: 39396 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x60099E4")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "9")]
public void ParseMessages(byte[] data, ref List<Message> messages)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060099E5 RID: 39397 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x60099E5")]
[Address(RVA = "0x62AFE0", Offset = "0x629FE0", VA = "0x18062AFE0", Slot = "10")]
public byte[] EncodeMessage(Message message)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x060099E6 RID: 39398 RVA: 0x001F6C24 File Offset: 0x001F4E24
[Token(Token = "0x60099E6")]
[Address(RVA = "0x62B330", Offset = "0x62A330", VA = "0x18062B330", Slot = "11")]
public object[] GetRealArguments(Type[] argTypes, object[] arguments)
{
if (arguments != 0)
{
int length = arguments.Length;
if (length != 0)
{
object[] array = new object[length];
int num = 0;
int length2 = arguments.Length;
if (num < length2)
{
object obj = arguments[num];
Type type = argTypes[num];
object obj2 = this.ConvertTo(type, obj);
if (obj2 != 0)
{
}
array[0] = obj2;
num++;
}
return array;
}
}
throw new ArrayTypeMismatchException();
}
// Token: 0x060099E7 RID: 39399 RVA: 0x001F6C90 File Offset: 0x001F4E90
[Token(Token = "0x60099E7")]
[Address(RVA = "0x62AE30", Offset = "0x629E30", VA = "0x18062AE30", Slot = "12")]
public object ConvertTo(Type toType, object obj)
{
if (obj != 0)
{
if (!toType.IsPrimitive && !toType.IsSealed)
{
Type typeFromHandle = typeof(string);
int num = 0;
if (!toType.Equals(typeFromHandle))
{
IEncoder encoder = this.<Encoder>k__BackingField;
int num2 = 0;
if (num2 < num)
{
num2 += num2;
num2++;
}
}
int hashCode = obj.GetHashCode();
}
object obj2 = Convert.ChangeType(obj, toType);
}
throw new NullReferenceException();
}
// Token: 0x060099E8 RID: 39400 RVA: 0x001F6CF8 File Offset: 0x001F4EF8
[Token(Token = "0x60099E8")]
[Address(RVA = "0x62B710", Offset = "0x62A710", VA = "0x18062B710")]
public static byte[] WithSeparator(string str)
{
object obj = Encoding.UTF8.Clone();
byte[] array = new byte[str];
byte[] bytes = Encoding.UTF8.GetBytes(str);
return array;
}
// Token: 0x040067FF RID: 26623
[Token(Token = "0x40067FF")]
public const char Separator = '\u001e';
}
}