This commit is contained in:
niko
2026-04-08 23:40:05 +02:00
parent d6894bcbc7
commit 18dc73f922
7750 changed files with 1795369 additions and 0 deletions
@@ -0,0 +1,171 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012BC RID: 4796
[Token(Token = "0x20012BC")]
[StructLayout(3)]
public sealed class AssetBundleSample : MonoBehaviour
{
// Token: 0x0600781D RID: 30749 RVA: 0x0018E7CC File Offset: 0x0018C9CC
[Token(Token = "0x600781D")]
[Address(RVA = "0x1E61EB0", Offset = "0x1E608B0", VA = "0x181E61EB0")]
private void OnGUI()
{
Rect clientArea = GUIHelper.ClientArea;
Action action = delegate
{
string text = this.status;
string text2 = "Status: " + text;
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
GUILayout.Label(text2, array);
Texture2D texture2D = this.texture;
int num = 0;
if (texture2D != num)
{
Texture2D texture2D2 = this.texture;
GUILayoutOption[] array2 = new GUILayoutOption[1];
GUILayoutOption guilayoutOption = GUILayout.MaxHeight(256f);
if (guilayoutOption != 0)
{
}
array2[0] = guilayoutOption;
GUILayout.Box(texture2D2, array2);
}
if (!this.downloading)
{
GUILayoutOption[] array3 = Array.Empty<GUILayoutOption>();
if (GUILayout.Button("Start Download", array3))
{
this.UnloadBundle();
AssetBundleSample.<DownloadAssetBundle>d__7 <DownloadAssetBundle>d__;
<DownloadAssetBundle>d__.System.IDisposable.Dispose();
<DownloadAssetBundle>d__.<>1__state = (int)((ulong)0L);
<DownloadAssetBundle>d__.<>4__this = this;
Coroutine coroutine = base.StartCoroutine(<DownloadAssetBundle>d__);
}
}
};
GUIHelper.DrawArea(clientArea, true, action);
}
// Token: 0x0600781E RID: 30750 RVA: 0x0018E7F4 File Offset: 0x0018C9F4
[Token(Token = "0x600781E")]
[Address(RVA = "0x1E61EA0", Offset = "0x1E608A0", VA = "0x181E61EA0")]
private void OnDestroy()
{
this.UnloadBundle();
}
// Token: 0x0600781F RID: 30751 RVA: 0x0018E808 File Offset: 0x0018CA08
[Token(Token = "0x600781F")]
[Address(RVA = "0x1E61E40", Offset = "0x1E60840", VA = "0x181E61E40")]
private IEnumerator DownloadAssetBundle()
{
/*
An exception occurred when decompiling this method (0600781F)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator BestHTTP.Examples.AssetBundleSample::DownloadAssetBundle()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
call:void('<DownloadAssetBundle>d__7'::System.IDisposable.Dispose, ldloc:'<DownloadAssetBundle>d__7'(var_0))
stfld:int32('<DownloadAssetBundle>d__7'::<>1__state, ldloc:'<DownloadAssetBundle>d__7'(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
stfld:AssetBundleSample('<DownloadAssetBundle>d__7'::<>4__this, ldloc:'<DownloadAssetBundle>d__7'(var_0), ldloc:AssetBundleSample(this))
}
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: 0x06007820 RID: 30752 RVA: 0x0018E82C File Offset: 0x0018CA2C
[Token(Token = "0x6007820")]
[Address(RVA = "0x1E61F60", Offset = "0x1E60960", VA = "0x181E61F60")]
private IEnumerator ProcessAssetBundle(AssetBundle bundle)
{
/*
An exception occurred when decompiling this method (06007820)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator BestHTTP.Examples.AssetBundleSample::ProcessAssetBundle(UnityEngine.AssetBundle)
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
call:void('<ProcessAssetBundle>d__8'::System.IDisposable.Dispose, ldloc:'<ProcessAssetBundle>d__8'(var_0))
stfld:AssetBundleSample('<ProcessAssetBundle>d__8'::<>4__this, ldloc:'<ProcessAssetBundle>d__8'(var_0), ldloc:AssetBundleSample(this))
stfld:int32('<ProcessAssetBundle>d__8'::<>1__state, ldloc:'<ProcessAssetBundle>d__8'(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
stfld:AssetBundle('<ProcessAssetBundle>d__8'::bundle, ldloc:'<ProcessAssetBundle>d__8'(var_0), ldloc:AssetBundle(bundle))
}
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: 0x06007821 RID: 30753 RVA: 0x0018E858 File Offset: 0x0018CA58
[Token(Token = "0x6007821")]
[Address(RVA = "0x1E62190", Offset = "0x1E60B90", VA = "0x181E62190")]
private void UnloadBundle()
{
AssetBundle assetBundle = this.cachedBundle;
int num = 0;
if (assetBundle != num)
{
this.cachedBundle.Unload(true);
this.cachedBundle = (ulong)0L;
}
}
// Token: 0x06007822 RID: 30754 RVA: 0x0018E894 File Offset: 0x0018CA94
[Token(Token = "0x6007822")]
[Address(RVA = "0x1E62220", Offset = "0x1E60C20", VA = "0x181E62220")]
public AssetBundleSample()
{
Uri uri = new Uri(GUIHelper.BaseURL + "/AssetBundles/WebGL/demobundle.assetbundle");
this.URI = uri;
this.status = "Waiting for user interaction";
base..ctor();
}
// Token: 0x040056B2 RID: 22194
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40056B2")]
private Uri URI;
// Token: 0x040056B3 RID: 22195
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x40056B3")]
private string status;
// Token: 0x040056B4 RID: 22196
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x40056B4")]
private AssetBundle cachedBundle;
// Token: 0x040056B5 RID: 22197
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x40056B5")]
private Texture2D texture;
// Token: 0x040056B6 RID: 22198
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x40056B6")]
private bool downloading;
}
}
@@ -0,0 +1,154 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.Caching;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012C5 RID: 4805
[Token(Token = "0x20012C5")]
[StructLayout(3)]
public sealed class CacheMaintenanceSample : MonoBehaviour
{
// Token: 0x0600785D RID: 30813 RVA: 0x0018FDD0 File Offset: 0x0018DFD0
[Token(Token = "0x600785D")]
[Address(RVA = "0x1E63DF0", Offset = "0x1E627F0", VA = "0x181E63DF0")]
private void OnGUI()
{
Rect clientArea = GUIHelper.ClientArea;
Action action = delegate
{
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
GUILayout.Label("Delete cached entities older then", array);
GUILayoutOption[] array2 = new GUILayoutOption[1];
GUILayoutOption guilayoutOption = GUILayout.MinWidth(50f);
if (guilayoutOption != 0)
{
}
array2[0] = guilayoutOption;
GUILayoutOption[] array3 = new GUILayoutOption[1];
GUILayoutOption guilayoutOption2 = GUILayout.MinWidth(100f);
if (guilayoutOption2 != 0)
{
}
array3[0] = guilayoutOption2;
float num = GUILayout.HorizontalSlider(100f, 1f, 60f, array3);
this.value = guilayoutOption2;
GUILayout.Space(10f);
CacheMaintenanceSample.DeleteOlderTypes deleteOlderTypes = this.deleteOlderType;
string[] array4 = new string[4];
if ("Days" != 0)
{
}
array4[0] = "Days";
if ("Hours" != 0)
{
}
array4[1] = "Hours";
if ("Mins" != 0)
{
}
array4[2] = "Mins";
if ("Secs" != 0)
{
}
array4[3] = "Secs";
GUILayoutOption[] array5 = Array.Empty<GUILayoutOption>();
uint num3;
int num2 = GUILayout.SelectionGrid((int)deleteOlderTypes, array4, (int)num3, array5);
this.deleteOlderType = (CacheMaintenanceSample.DeleteOlderTypes)num2;
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
GUILayout.Space(10f);
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayoutOption[] array6 = new GUILayoutOption[1];
GUILayoutOption guilayoutOption3 = GUILayout.Width(150f);
if (guilayoutOption3 != 0)
{
}
array6[0] = guilayoutOption3;
GUILayout.Label("Max Cache Size (bytes): ", array6);
GUILayoutOption[] array7 = new GUILayoutOption[1];
GUILayoutOption guilayoutOption4 = GUILayout.Width(70f);
if (guilayoutOption4 != 0)
{
}
array7[0] = guilayoutOption4;
GUILayoutOption[] array8 = Array.Empty<GUILayoutOption>();
float num4 = GUILayout.HorizontalSlider(70f, 1024f, 10485760f, array8);
this.maxCacheSize = array8;
GUILayout.EndHorizontal();
GUILayout.Space((float)524288.0);
GUILayoutOption[] array9 = Array.Empty<GUILayoutOption>();
if (GUILayout.Button("Maintenance", array9))
{
TimeSpan timeSpan = TimeSpan.FromDays(524288.0);
CacheMaintenanceSample.DeleteOlderTypes deleteOlderTypes2 = this.deleteOlderType;
if (deleteOlderTypes2 != CacheMaintenanceSample.DeleteOlderTypes.Days)
{
if (deleteOlderTypes2 != CacheMaintenanceSample.DeleteOlderTypes.Days)
{
if (deleteOlderTypes2 != CacheMaintenanceSample.DeleteOlderTypes.Days)
{
if (deleteOlderTypes2 != CacheMaintenanceSample.DeleteOlderTypes.Hours)
{
goto IL_240;
}
TimeSpan timeSpan2 = TimeSpan.FromSeconds(524288.0);
}
TimeSpan timeSpan3 = TimeSpan.FromMinutes(524288.0);
}
TimeSpan timeSpan4 = TimeSpan.FromHours(524288.0);
}
TimeSpan timeSpan5 = TimeSpan.FromDays(524288.0);
IL_240:
int num5 = this.maxCacheSize;
HTTPCacheService.BeginMaintainence(new HTTPCacheMaintananceParams(timeSpan5, (ulong)num5));
}
};
GUIHelper.DrawArea(clientArea, true, action);
}
// Token: 0x0600785E RID: 30814 RVA: 0x0018FDF8 File Offset: 0x0018DFF8
[Token(Token = "0x600785E")]
[Address(RVA = "0x1E64570", Offset = "0x1E62F70", VA = "0x181E64570")]
public CacheMaintenanceSample()
{
}
// Token: 0x040056E4 RID: 22244
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40056E4")]
private CacheMaintenanceSample.DeleteOlderTypes deleteOlderType = (CacheMaintenanceSample.DeleteOlderTypes)((ulong)3L);
// Token: 0x040056E5 RID: 22245
[global::Cpp2IlInjected.FieldOffset(Offset = "0x1C")]
[Token(Token = "0x40056E5")]
private int value = (int)((ulong)10L);
// Token: 0x040056E6 RID: 22246
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x40056E6")]
private int maxCacheSize = (int)((ulong)5242880L);
// Token: 0x020012C6 RID: 4806
[Token(Token = "0x20012C6")]
private enum DeleteOlderTypes
{
// Token: 0x040056E8 RID: 22248
[Token(Token = "0x40056E8")]
Days,
// Token: 0x040056E9 RID: 22249
[Token(Token = "0x40056E9")]
Hours,
// Token: 0x040056EA RID: 22250
[Token(Token = "0x40056EA")]
Mins,
// Token: 0x040056EB RID: 22251
[Token(Token = "0x40056EB")]
Secs
}
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,90 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012C3 RID: 4803
[Token(Token = "0x20012C3")]
[StructLayout(3)]
public static class GUIHelper
{
// Token: 0x06007853 RID: 30803 RVA: 0x0018FBE8 File Offset: 0x0018DDE8
[Token(Token = "0x6007853")]
[Address(RVA = "0x1E649B0", Offset = "0x1E633B0", VA = "0x181E649B0")]
private static void Setup()
{
GUIHelper.centerAlignedLabel = new GUIStyle(GUI.skin.label);
GUIHelper.centerAlignedLabel.alignment = TextAnchor.MiddleCenter;
GUIHelper.rightAlignedLabel = new GUIStyle(GUI.skin.label);
GUIHelper.rightAlignedLabel.alignment = TextAnchor.MiddleRight;
}
// Token: 0x06007854 RID: 30804 RVA: 0x0018FC40 File Offset: 0x0018DE40
[Token(Token = "0x6007854")]
[Address(RVA = "0x1E646E0", Offset = "0x1E630E0", VA = "0x181E646E0")]
public static void DrawArea(Rect area, bool drawHeader, Action action)
{
GUIHelper.Setup();
if (drawHeader)
{
GUIHelper.DrawCenteredText(SampleSelector.SelectedSample.<DisplayName>k__BackingField);
GUILayout.Space(5f);
}
if (action != 0)
{
action();
}
GUILayout.EndArea();
}
// Token: 0x06007855 RID: 30805 RVA: 0x0018FC88 File Offset: 0x0018DE88
[Token(Token = "0x6007855")]
[Address(RVA = "0x1E64820", Offset = "0x1E63220", VA = "0x181E64820")]
public static void DrawCenteredText(string msg)
{
GUIHelper.Setup();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.FlexibleSpace();
GUIStyle guistyle = GUIHelper.centerAlignedLabel;
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
GUILayout.Label(msg, guistyle, array);
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
}
// Token: 0x06007856 RID: 30806 RVA: 0x0018FCD4 File Offset: 0x0018DED4
[Token(Token = "0x6007856")]
[Address(RVA = "0x1E648E0", Offset = "0x1E632E0", VA = "0x181E648E0")]
public static void DrawRow(string key, string value)
{
GUIHelper.Setup();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
GUILayout.Label(key, array);
GUILayout.FlexibleSpace();
GUIStyle guistyle = GUIHelper.rightAlignedLabel;
GUILayoutOption[] array2 = Array.Empty<GUILayoutOption>();
GUILayout.Label(value, guistyle, array2);
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
}
// Token: 0x040056DE RID: 22238
[Token(Token = "0x40056DE")]
public static string BaseURL = "https://besthttpdemosite.azurewebsites.net";
// Token: 0x040056DF RID: 22239
[Token(Token = "0x40056DF")]
private static GUIStyle centerAlignedLabel;
// Token: 0x040056E0 RID: 22240
[Token(Token = "0x40056E0")]
private static GUIStyle rightAlignedLabel;
// Token: 0x040056E1 RID: 22241
[Token(Token = "0x40056E1")]
public static Rect ClientArea;
}
}
@@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012C4 RID: 4804
[Token(Token = "0x20012C4")]
[StructLayout(3)]
public class GUIMessageList
{
// Token: 0x06007858 RID: 30808 RVA: 0x0018FD44 File Offset: 0x0018DF44
[Token(Token = "0x6007858")]
[Address(RVA = "0x1E64EA0", Offset = "0x1E638A0", VA = "0x181E64EA0")]
public void Draw()
{
int width = Screen.width;
}
// Token: 0x06007859 RID: 30809 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6007859")]
[Address(RVA = "0x1E64C70", Offset = "0x1E63670", VA = "0x181E64C70")]
public void Draw(float minWidth, float minHeight)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0600785A RID: 30810 RVA: 0x0018FD5C File Offset: 0x0018DF5C
[Token(Token = "0x600785A")]
[Address(RVA = "0x1E64B90", Offset = "0x1E63590", VA = "0x181E64B90")]
public void Add(string msg)
{
this.messages.Add(msg);
ulong num;
this.scrollPos = num;
this.scrollPos.y = (float)0;
}
// Token: 0x0600785B RID: 30811 RVA: 0x0018FD90 File Offset: 0x0018DF90
[Token(Token = "0x600785B")]
[Address(RVA = "0x1E64C20", Offset = "0x1E63620", VA = "0x181E64C20")]
public void Clear()
{
this.messages.Clear();
}
// Token: 0x0600785C RID: 30812 RVA: 0x0018FDB0 File Offset: 0x0018DFB0
[Token(Token = "0x600785C")]
[Address(RVA = "0x1E64ED0", Offset = "0x1E638D0", VA = "0x181E64ED0")]
public GUIMessageList()
{
List<string> list = new List();
this.messages = list;
base..ctor();
}
// Token: 0x040056E2 RID: 22242
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x40056E2")]
private List<string> messages;
// Token: 0x040056E3 RID: 22243
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40056E3")]
private Vector2 scrollPos;
}
}
@@ -0,0 +1,155 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.Futures;
using BestHTTP.SignalRCore;
using BestHTTP.SignalRCore.Encoders;
using BestHTTP.SignalRCore.Messages;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012CA RID: 4810
[Token(Token = "0x20012CA")]
[StructLayout(3)]
public sealed class HubWithAuthorizationSample : MonoBehaviour
{
// Token: 0x0600787B RID: 30843 RVA: 0x00190810 File Offset: 0x0018EA10
[Token(Token = "0x600787B")]
[Address(RVA = "0x1E651F0", Offset = "0x1E63BF0", VA = "0x181E651F0")]
private void Start()
{
Uri uri = this.URI;
JsonProtocol jsonProtocol = new JsonProtocol(new LitJsonEncoder());
HubConnection hubConnection = new HubConnection(uri, jsonProtocol);
this.hub = hubConnection;
Action<HubConnection> action = new Action(this.Hub_OnConnected);
hubConnection.OnConnected += action;
HubConnection hubConnection2 = this.hub;
Action<HubConnection, string> action2 = new Action(this.Hub_OnError);
hubConnection2.OnError += action2;
HubConnection hubConnection3 = this.hub;
Action<HubConnection> action3 = new Action(this.Hub_OnClosed);
hubConnection3.OnClosed += action3;
HubConnection hubConnection4 = this.hub;
Func<HubConnection, Message, bool> func = new Func(this.Hub_OnMessage);
hubConnection4.OnMessage += func;
this.hub.StartConnect();
this.uiText = "StartConnect called\n";
}
// Token: 0x0600787C RID: 30844 RVA: 0x001908CC File Offset: 0x0018EACC
[Token(Token = "0x600787C")]
[Address(RVA = "0x1E65120", Offset = "0x1E63B20", VA = "0x181E65120")]
private void OnDestroy()
{
HubConnection hubConnection = this.hub;
if (hubConnection != 0)
{
hubConnection.StartClose();
return;
}
}
// Token: 0x0600787D RID: 30845 RVA: 0x001908EC File Offset: 0x0018EAEC
[Token(Token = "0x600787D")]
[Address(RVA = "0x1E65140", Offset = "0x1E63B40", VA = "0x181E65140")]
private void OnGUI()
{
Rect clientArea = GUIHelper.ClientArea;
Action action = delegate
{
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
Vector2 vector;
this.scrollPos = vector;
this.scrollPos.y = (float)0;
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
string text = this.uiText;
GUILayoutOption[] array2 = Array.Empty<GUILayoutOption>();
GUILayout.Label(text, array2);
GUILayout.EndVertical();
GUILayout.EndScrollView();
};
GUIHelper.DrawArea(clientArea, true, action);
}
// Token: 0x0600787E RID: 30846 RVA: 0x00190914 File Offset: 0x0018EB14
[Token(Token = "0x600787E")]
[Address(RVA = "0x1E64F80", Offset = "0x1E63980", VA = "0x181E64F80")]
private void Hub_OnConnected(HubConnection hub)
{
string text = this.uiText + "Hub Connected\n";
this.uiText = text;
object[] array = new object[1];
if ("Message from the client" != 0)
{
}
array[0] = "Message from the client";
IFuture<string> future = hub.Invoke<string>("Echo", array);
FutureValueCallback<string> futureValueCallback = delegate(string ret)
{
string text2 = this.uiText;
string text3 = string.Format(" 'Echo' returned: '{0}'\n", ret);
string text4 = text2 + text3;
this.uiText = text4;
};
throw new NullReferenceException();
}
// Token: 0x0600787F RID: 30847 RVA: 0x00190974 File Offset: 0x0018EB74
[Token(Token = "0x600787F")]
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0")]
private bool Hub_OnMessage(HubConnection hub, Message message)
{
return true;
}
// Token: 0x06007880 RID: 30848 RVA: 0x00190984 File Offset: 0x0018EB84
[Token(Token = "0x6007880")]
[Address(RVA = "0x1E64F30", Offset = "0x1E63930", VA = "0x181E64F30")]
private void Hub_OnClosed(HubConnection hub)
{
string text = this.uiText + "Hub Closed\n";
this.uiText = text;
}
// Token: 0x06007881 RID: 30849 RVA: 0x001909AC File Offset: 0x0018EBAC
[Token(Token = "0x6007881")]
[Address(RVA = "0x1E650C0", Offset = "0x1E63AC0", VA = "0x181E650C0")]
private void Hub_OnError(HubConnection hub, string error)
{
string text = this.uiText + "Hub Error: " + error + "\n";
this.uiText = text;
}
// Token: 0x06007882 RID: 30850 RVA: 0x001909D8 File Offset: 0x0018EBD8
[Token(Token = "0x6007882")]
[Address(RVA = "0x1E65510", Offset = "0x1E63F10", VA = "0x181E65510")]
public HubWithAuthorizationSample()
{
Uri uri = new Uri(GUIHelper.BaseURL + "/redirect");
this.URI = uri;
base..ctor();
}
// Token: 0x040056F8 RID: 22264
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40056F8")]
private readonly Uri URI;
// Token: 0x040056F9 RID: 22265
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x40056F9")]
private HubConnection hub;
// Token: 0x040056FA RID: 22266
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x40056FA")]
private Vector2 scrollPos;
// Token: 0x040056FB RID: 22267
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x40056FB")]
private string uiText;
}
}
@@ -0,0 +1,262 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012BF RID: 4799
[Token(Token = "0x20012BF")]
[StructLayout(3)]
public sealed class LargeFileDownloadSample : MonoBehaviour
{
// Token: 0x06007830 RID: 30768 RVA: 0x0018ED74 File Offset: 0x0018CF74
[Token(Token = "0x6007830")]
[Address(RVA = "0x1E666B0", Offset = "0x1E650B0", VA = "0x181E666B0")]
private void Awake()
{
if (PlayerPrefs.HasKey("DownloadLength"))
{
int @int = PlayerPrefs.GetInt("DownloadProgress");
int int2 = PlayerPrefs.GetInt("DownloadLength");
}
}
// Token: 0x06007831 RID: 30769 RVA: 0x0018EDA4 File Offset: 0x0018CFA4
[Token(Token = "0x6007831")]
[Address(RVA = "0x1E66730", Offset = "0x1E65130", VA = "0x181E66730")]
private void OnDestroy()
{
HTTPRequest httprequest = this.request;
if (httprequest != 0 && httprequest.<State>k__BackingField < HTTPRequestStates.Finished)
{
int num = 0;
httprequest.OnProgress = num;
this.request.<Callback>k__BackingField = num;
this.request.Abort();
return;
}
}
// Token: 0x06007832 RID: 30770 RVA: 0x0018EDEC File Offset: 0x0018CFEC
[Token(Token = "0x6007832")]
[Address(RVA = "0x1E66780", Offset = "0x1E65180", VA = "0x181E66780")]
private void OnGUI()
{
Rect clientArea = GUIHelper.ClientArea;
Action action = delegate
{
HTTPRequest httprequest;
for (;;)
{
string text = this.status;
string text2 = "Request status: " + text;
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
GUILayout.Label(text2, array);
GUILayout.Space(5f);
float num = this.progress;
int num2 = 0;
int num3 = PlayerPrefs.GetInt("DownloadLength");
num3 += num2;
string text3 = string.Format("Progress: {0:P2} of {1:N0}Mb", array, num3);
GUILayoutOption[] array2 = Array.Empty<GUILayoutOption>();
GUILayout.Label(text3, array2);
GUILayoutOption[] array3 = Array.Empty<GUILayoutOption>();
int num4 = 0;
float num5 = GUILayout.HorizontalSlider(num, (float)num4, 1f, array3);
GUILayout.Space(50f);
httprequest = this.request;
if (httprequest != 0)
{
break;
}
string text4 = string.Format("Desired Fragment Size: {0:N} KBytes", httprequest);
GUILayoutOption[] array4 = Array.Empty<GUILayoutOption>();
GUILayout.Label(text4, array4);
GUILayoutOption[] array5 = Array.Empty<GUILayoutOption>();
float num7;
float num6 = GUILayout.HorizontalSlider(num7, 4096f, 10485760f, array5);
this.fragmentSize = array5;
GUILayout.Space(5f);
bool flag = PlayerPrefs.HasKey("DownloadProgress");
string text5 = "Start Download";
if (flag)
{
text5 = "Continue Download";
}
GUILayoutOption[] array6 = Array.Empty<GUILayoutOption>();
if (GUILayout.Button(text5, array6))
{
goto Block_4;
}
}
if (httprequest.<State>k__BackingField == HTTPRequestStates.Processing)
{
GUILayoutOption[] array7 = Array.Empty<GUILayoutOption>();
if (GUILayout.Button("Abort Download", array7))
{
this.request.Abort();
}
}
return;
Block_4:
Uri uri = new Uri("https://uk3.testmy.net/dl-102400");
OnRequestFinishedDelegate onRequestFinishedDelegate = delegate(HTTPRequest req, HTTPResponse resp)
{
if (req.<State>k__BackingField <= HTTPRequestStates.Aborted)
{
if (!PlayerPrefs.HasKey("DownloadLength"))
{
string firstHeaderValue = resp.GetFirstHeaderValue("content-length");
if (firstHeaderValue == 0)
{
int num12 = int.Parse(firstHeaderValue);
PlayerPrefs.SetInt("DownloadLength", num12);
}
}
List<byte[]> streamedFragments = resp.GetStreamedFragments();
this.ProcessFragments(streamedFragments);
this.status = "Processing";
if (!resp.IsSuccess)
{
int <StatusCode>k__BackingField = resp.<StatusCode>k__BackingField;
string <Message>k__BackingField = resp.<Message>k__BackingField;
string dataAsText = resp.DataAsText;
string text6 = string.Format("Request finished Successfully, but the server sent an error. Status Code: {0}-{1} Message: {2}", <StatusCode>k__BackingField, <Message>k__BackingField, dataAsText);
this.status = text6;
Debug.LogWarning(text6);
}
List<byte[]> list;
this.ProcessFragments(list);
this.status = "Streaming finished!";
PlayerPrefs.DeleteKey("DownloadProgress");
PlayerPrefs.Save();
int num13 = 0;
this.request = num13;
}
};
HTTPRequest httprequest2 = new HTTPRequest(uri, onRequestFinishedDelegate);
this.request = httprequest2;
if (!PlayerPrefs.HasKey("DownloadProgress"))
{
int num8 = 0;
PlayerPrefs.SetInt("DownloadProgress", num8);
}
HTTPRequest httprequest3 = this.request;
int @int = PlayerPrefs.GetInt("DownloadProgress");
httprequest3.SetRangeHeader(@int);
ulong num9;
this.request.DisableCache = num9 != 0UL;
ulong num10;
this.request.UseStreaming = num10 != 0UL;
HTTPRequest httprequest4 = this.request;
int num11 = this.fragmentSize;
httprequest4.StreamFragmentSize = num11;
HTTPRequest httprequest5 = this.request.Send();
};
GUIHelper.DrawArea(clientArea, true, action);
}
// Token: 0x06007833 RID: 30771 RVA: 0x0018EE14 File Offset: 0x0018D014
[Token(Token = "0x6007833")]
[Address(RVA = "0x1E66940", Offset = "0x1E65340", VA = "0x181E66940")]
private void StreamLargeFileTest()
{
Uri uri = new Uri("https://uk3.testmy.net/dl-102400");
OnRequestFinishedDelegate onRequestFinishedDelegate = delegate(HTTPRequest req, HTTPResponse resp)
{
if (req.<State>k__BackingField <= HTTPRequestStates.Aborted)
{
if (!PlayerPrefs.HasKey("DownloadLength"))
{
string firstHeaderValue = resp.GetFirstHeaderValue("content-length");
if (firstHeaderValue == 0)
{
int num3 = int.Parse(firstHeaderValue);
PlayerPrefs.SetInt("DownloadLength", num3);
}
}
List<byte[]> streamedFragments = resp.GetStreamedFragments();
this.ProcessFragments(streamedFragments);
this.status = "Processing";
if (!resp.IsSuccess)
{
int <StatusCode>k__BackingField = resp.<StatusCode>k__BackingField;
string <Message>k__BackingField = resp.<Message>k__BackingField;
string dataAsText = resp.DataAsText;
string text = string.Format("Request finished Successfully, but the server sent an error. Status Code: {0}-{1} Message: {2}", <StatusCode>k__BackingField, <Message>k__BackingField, dataAsText);
this.status = text;
Debug.LogWarning(text);
}
List<byte[]> list;
this.ProcessFragments(list);
this.status = "Streaming finished!";
PlayerPrefs.DeleteKey("DownloadProgress");
PlayerPrefs.Save();
int num4 = 0;
this.request = num4;
}
};
HTTPRequest httprequest = new HTTPRequest(uri, onRequestFinishedDelegate);
this.request = httprequest;
if (!PlayerPrefs.HasKey("DownloadProgress"))
{
int num = 0;
PlayerPrefs.SetInt("DownloadProgress", num);
}
HTTPRequest httprequest2 = this.request;
int @int = PlayerPrefs.GetInt("DownloadProgress");
httprequest2.SetRangeHeader(@int);
this.request.DisableCache = true;
this.request.UseStreaming = true;
HTTPRequest httprequest3 = this.request;
int num2 = this.fragmentSize;
httprequest3.StreamFragmentSize = num2;
HTTPRequest httprequest4 = this.request.Send();
}
// Token: 0x06007834 RID: 30772 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6007834")]
[Address(RVA = "0x1E66830", Offset = "0x1E65230", VA = "0x181E66830")]
private void ProcessFragments(List<byte[]> fragments)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06007835 RID: 30773 RVA: 0x0018EEC4 File Offset: 0x0018D0C4
[Token(Token = "0x6007835")]
[Address(RVA = "0x1E67140", Offset = "0x1E65B40", VA = "0x181E67140")]
public LargeFileDownloadSample()
{
string empty = string.Empty;
this.status = empty;
this.fragmentSize = (int)((ulong)4096L);
base..ctor();
}
// Token: 0x040056C1 RID: 22209
[Token(Token = "0x40056C1")]
private const string URL = "https://uk3.testmy.net/dl-102400";
// Token: 0x040056C2 RID: 22210
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40056C2")]
private HTTPRequest request;
// Token: 0x040056C3 RID: 22211
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x40056C3")]
private string status;
// Token: 0x040056C4 RID: 22212
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x40056C4")]
private float progress;
// Token: 0x040056C5 RID: 22213
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
[Token(Token = "0x40056C5")]
private int fragmentSize;
}
}
@@ -0,0 +1,154 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012C7 RID: 4807
[Token(Token = "0x20012C7")]
[StructLayout(3)]
public sealed class SampleDescriptor
{
// Token: 0x1700139B RID: 5019
// (get) Token: 0x06007860 RID: 30816 RVA: 0x00190098 File Offset: 0x0018E298
// (set) Token: 0x06007861 RID: 30817 RVA: 0x001900AC File Offset: 0x0018E2AC
[Token(Token = "0x1700139B")]
public bool IsLabel
{
[Token(Token = "0x6007860")]
[Address(RVA = "0x559440", Offset = "0x557E40", VA = "0x180559440")]
get;
[Token(Token = "0x6007861")]
[Address(RVA = "0x559450", Offset = "0x557E50", VA = "0x180559450")]
set;
}
// Token: 0x1700139C RID: 5020
// (get) Token: 0x06007862 RID: 30818 RVA: 0x001900C0 File Offset: 0x0018E2C0
// (set) Token: 0x06007863 RID: 30819 RVA: 0x001900D4 File Offset: 0x0018E2D4
[Token(Token = "0x1700139C")]
public Type Type
{
[Token(Token = "0x6007862")]
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
get;
[Token(Token = "0x6007863")]
[Address(RVA = "0x3C1280", Offset = "0x3BFC80", VA = "0x1803C1280")]
set;
}
// Token: 0x1700139D RID: 5021
// (get) Token: 0x06007864 RID: 30820 RVA: 0x001900E8 File Offset: 0x0018E2E8
// (set) Token: 0x06007865 RID: 30821 RVA: 0x001900FC File Offset: 0x0018E2FC
[Token(Token = "0x1700139D")]
public string DisplayName
{
[Token(Token = "0x6007864")]
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
get;
[Token(Token = "0x6007865")]
[Address(RVA = "0x3C1260", Offset = "0x3BFC60", VA = "0x1803C1260")]
set;
}
// Token: 0x1700139E RID: 5022
// (get) Token: 0x06007866 RID: 30822 RVA: 0x00190110 File Offset: 0x0018E310
// (set) Token: 0x06007867 RID: 30823 RVA: 0x00190124 File Offset: 0x0018E324
[Token(Token = "0x1700139E")]
public string Description
{
[Token(Token = "0x6007866")]
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
get;
[Token(Token = "0x6007867")]
[Address(RVA = "0x3C1270", Offset = "0x3BFC70", VA = "0x1803C1270")]
set;
}
// Token: 0x1700139F RID: 5023
// (get) Token: 0x06007868 RID: 30824 RVA: 0x00190138 File Offset: 0x0018E338
// (set) Token: 0x06007869 RID: 30825 RVA: 0x0019014C File Offset: 0x0018E34C
[Token(Token = "0x1700139F")]
public bool IsSelected
{
[Token(Token = "0x6007868")]
[Address(RVA = "0x4CB2D0", Offset = "0x4C9CD0", VA = "0x1804CB2D0")]
get;
[Token(Token = "0x6007869")]
[Address(RVA = "0x4CB340", Offset = "0x4C9D40", VA = "0x1804CB340")]
set;
}
// Token: 0x170013A0 RID: 5024
// (get) Token: 0x0600786A RID: 30826 RVA: 0x00190160 File Offset: 0x0018E360
// (set) Token: 0x0600786B RID: 30827 RVA: 0x00190174 File Offset: 0x0018E374
[Token(Token = "0x170013A0")]
public GameObject UnityObject
{
[Token(Token = "0x600786A")]
[Address(RVA = "0x3EE8E0", Offset = "0x3ED2E0", VA = "0x1803EE8E0")]
get;
[Token(Token = "0x600786B")]
[Address(RVA = "0x421E00", Offset = "0x420800", VA = "0x180421E00")]
set;
}
// Token: 0x170013A1 RID: 5025
// (get) Token: 0x0600786C RID: 30828 RVA: 0x00190188 File Offset: 0x0018E388
[Token(Token = "0x170013A1")]
public bool IsRunning
{
[Token(Token = "0x600786C")]
[Address(RVA = "0x1E673A0", Offset = "0x1E65DA0", VA = "0x181E673A0")]
get
{
GameObject gameObject = this.<UnityObject>k__BackingField;
int num = 0;
return gameObject != num;
}
}
// Token: 0x0600786D RID: 30829 RVA: 0x001901A8 File Offset: 0x0018E3A8
[Token(Token = "0x600786D")]
[Address(RVA = "0x1E67350", Offset = "0x1E65D50", VA = "0x181E67350")]
public SampleDescriptor(Type type, string displayName, string description)
{
int num = 0;
base.FieldGetter(num, displayName, description);
this.Type = type;
this.DisplayName = displayName;
this.Description = description;
}
// Token: 0x0600786E RID: 30830 RVA: 0x001901D8 File Offset: 0x0018E3D8
[Token(Token = "0x600786E")]
[Address(RVA = "0x1E67200", Offset = "0x1E65C00", VA = "0x181E67200")]
public void CreateUnityObject()
{
GameObject gameObject = this.<UnityObject>k__BackingField;
int num = 0;
if (!(gameObject != num))
{
GameObject gameObject2 = new GameObject(this.<DisplayName>k__BackingField);
this.<UnityObject>k__BackingField = gameObject2;
Type type = this.<Type>k__BackingField;
Component component = gameObject2.Internal_AddComponentWithType(type);
}
}
// Token: 0x0600786F RID: 30831 RVA: 0x00190224 File Offset: 0x0018E424
[Token(Token = "0x600786F")]
[Address(RVA = "0x1E672B0", Offset = "0x1E65CB0", VA = "0x181E672B0")]
public void DestroyUnityObject()
{
GameObject gameObject = this.<UnityObject>k__BackingField;
int num = 0;
if (gameObject != num)
{
global::UnityEngine.Object.Destroy(this.<UnityObject>k__BackingField);
this.<UnityObject>k__BackingField = (ulong)0L;
}
}
}
}
@@ -0,0 +1,297 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using BestHTTP.Caching;
using BestHTTP.Cookies;
using BestHTTP.Statistics;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012C8 RID: 4808
[Token(Token = "0x20012C8")]
[StructLayout(3)]
public class SampleSelector : MonoBehaviour
{
// Token: 0x06007870 RID: 30832 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6007870")]
[Address(RVA = "0x1E67400", Offset = "0x1E65E00", VA = "0x181E67400")]
private void Awake()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06007871 RID: 30833 RVA: 0x00190258 File Offset: 0x0018E458
[Token(Token = "0x6007871")]
[Address(RVA = "0x1E684C0", Offset = "0x1E66EC0", VA = "0x181E684C0")]
private void Update()
{
int width = Screen.width;
int height = Screen.height;
GUIHelper.ClientArea = 0;
if (Input.GetKeyDownInt(KeyCode.Escape))
{
SampleDescriptor selectedSample = SampleSelector.SelectedSample;
if (selectedSample != 0)
{
GameObject <UnityObject>k__BackingField = selectedSample.<UnityObject>k__BackingField;
int num = 0;
if (<UnityObject>k__BackingField != num)
{
SampleSelector.SelectedSample.DestroyUnityObject();
}
}
Application.Quit();
}
if (Input.GetKeyDownInt((KeyCode)((uint)271)) || Input.GetKeyDownInt(KeyCode.Return))
{
SampleDescriptor selectedSample2 = SampleSelector.SelectedSample;
if (selectedSample2 != 0)
{
GameObject <UnityObject>k__BackingField2 = selectedSample2.<UnityObject>k__BackingField;
int num2 = 0;
if (!(<UnityObject>k__BackingField2 != num2))
{
SampleSelector.SelectedSample.CreateUnityObject();
return;
}
}
}
}
// Token: 0x06007872 RID: 30834 RVA: 0x00190308 File Offset: 0x0018E508
[Token(Token = "0x6007872")]
[Address(RVA = "0x1E67C70", Offset = "0x1E66670", VA = "0x181E67C70")]
private void OnGUI()
{
GeneralStatistics generalStatistics;
int recycledConnections = generalStatistics.RecycledConnections;
GeneralStatistics stats;
stats.RecycledConnections = recycledConnections;
ulong cacheSize = generalStatistics.CacheSize;
stats.CacheSize = cacheSize;
int width = Screen.width;
Action action = delegate
{
GUIHelper.DrawCenteredText("Connections");
GUILayout.Space(5f);
int num4 = 0;
GUIHelper.DrawRow("Sum:", num4);
int num5 = 0;
GUIHelper.DrawRow("Active:", num5);
int num6 = 0;
GUIHelper.DrawRow("Free:", num6);
int num7 = 0;
GUIHelper.DrawRow("Recycled:", num7);
int num8 = 0;
GUIHelper.DrawRow("Requests in queue:", num8);
};
GUIHelper.Setup();
if (action != 0)
{
action();
}
GUILayout.EndArea();
int width2 = Screen.width;
int width3 = Screen.width;
Action action2 = delegate
{
GUIHelper.DrawCenteredText("Cache");
if (HTTPCacheService.IsSupported)
{
GUILayout.Space(5f);
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
GUILayout.FlexibleSpace();
GUILayoutOption[] array2 = Array.Empty<GUILayoutOption>();
if (GUILayout.Button("Clear Cache", array2))
{
HTTPCacheService.BeginClear();
}
GUILayout.EndVertical();
return;
}
Color yellow = Color.yellow;
GUIHelper.DrawCenteredText("Disabled in WebPlayer, WebGL & Samsung Smart TV Builds!");
Color white = Color.white;
};
GUIHelper.Setup();
if (action2 != 0)
{
action2();
}
GUILayout.EndArea();
int width4 = Screen.width;
int width5 = Screen.width;
Action action3 = delegate
{
GUIHelper.DrawCenteredText("Cookies");
if (CookieJar.IsSavingSupported)
{
GUILayout.Space(5f);
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
GUILayout.FlexibleSpace();
GUILayoutOption[] array3 = Array.Empty<GUILayoutOption>();
if (GUILayout.Button("Clear Cookies", array3))
{
CookieJar.Clear();
}
GUILayout.EndVertical();
return;
}
Color yellow2 = Color.yellow;
GUIHelper.DrawCenteredText("Saving and loading from disk is disabled in WebPlayer, WebGL & Samsung Smart TV Builds!");
Color white2 = Color.white;
};
GUIHelper.Setup();
if (action3 != 0)
{
action3();
}
GUILayout.EndArea();
SampleDescriptor selectedSample = SampleSelector.SelectedSample;
if (selectedSample != 0)
{
GameObject <UnityObject>k__BackingField = selectedSample.<UnityObject>k__BackingField;
int num = 0;
if (<UnityObject>k__BackingField != num)
{
SampleDescriptor selectedSample2 = SampleSelector.SelectedSample;
if (selectedSample2 != 0 && selectedSample2.IsRunning)
{
int height = Screen.height;
int width6 = Screen.width;
int num2 = 0;
string empty = string.Empty;
GUILayout.BeginArea(num2, empty);
GUILayout.FlexibleSpace();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.FlexibleSpace();
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
GUILayout.FlexibleSpace();
GUILayoutOption[] array = new GUILayoutOption[1];
GUILayoutOption guilayoutOption = GUILayout.MinWidth(100f);
if (guilayoutOption != 0)
{
}
array[0] = guilayoutOption;
if (GUILayout.Button("Back", array))
{
SampleSelector.SelectedSample.DestroyUnityObject();
}
GUILayout.FlexibleSpace();
GUILayout.EndVertical();
GUILayout.EndHorizontal();
GUILayout.EndArea();
}
return;
}
}
SampleDescriptor selectedSample3 = SampleSelector.SelectedSample;
int width7 = Screen.width;
if (selectedSample3 != 0)
{
}
int num3 = Screen.height;
num3 += -165;
Action action4 = delegate
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
};
GUIHelper.Setup();
if (action4 != 0)
{
action4();
}
GUILayout.EndArea();
SampleDescriptor selectedSample4 = SampleSelector.SelectedSample;
while (selectedSample4 == 0)
{
}
this.DrawSampleDetails(selectedSample4);
throw new NullReferenceException();
}
// Token: 0x06007873 RID: 30835 RVA: 0x00190560 File Offset: 0x0018E760
[Token(Token = "0x6007873")]
[Address(RVA = "0x1E67B80", Offset = "0x1E66580", VA = "0x181E67B80")]
private void DrawSample(SampleDescriptor sample)
{
if (!sample.<IsLabel>k__BackingField)
{
string <DisplayName>k__BackingField = sample.<DisplayName>k__BackingField;
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
if (GUILayout.Button(<DisplayName>k__BackingField, array))
{
sample.<IsSelected>k__BackingField = true;
SampleDescriptor selectedSample = SampleSelector.SelectedSample;
if (selectedSample != 0)
{
selectedSample.<IsSelected>k__BackingField = false;
}
SampleSelector.SelectedSample = sample;
}
return;
}
GUILayout.Space(15f);
GUIHelper.DrawCenteredText(sample.<DisplayName>k__BackingField);
GUILayout.Space(5f);
}
// Token: 0x06007874 RID: 30836 RVA: 0x001905D4 File Offset: 0x0018E7D4
[Token(Token = "0x6007874")]
[Address(RVA = "0x1E679A0", Offset = "0x1E663A0", VA = "0x181E679A0")]
private void DrawSampleDetails(SampleDescriptor sample)
{
int width = Screen.width;
int width2 = Screen.width;
int height = Screen.height;
int num = 0;
string empty = string.Empty;
GUI.Box(num, empty);
GUILayout.BeginArea(num);
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
GUIHelper.DrawCenteredText(sample.<DisplayName>k__BackingField);
GUILayout.Space(5f);
string <Description>k__BackingField = sample.<Description>k__BackingField;
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
GUILayout.Label(<Description>k__BackingField, array);
GUILayout.FlexibleSpace();
GUILayoutOption[] array2 = Array.Empty<GUILayoutOption>();
if (GUILayout.Button("Start Sample", array2))
{
sample.CreateUnityObject();
}
GUILayout.EndVertical();
GUILayout.EndArea();
}
// Token: 0x06007875 RID: 30837 RVA: 0x00190688 File Offset: 0x0018E888
[Token(Token = "0x6007875")]
[Address(RVA = "0x1E686D0", Offset = "0x1E670D0", VA = "0x181E686D0")]
public SampleSelector()
{
List<SampleDescriptor> list = new List();
this.Samples = list;
base..ctor();
}
// Token: 0x040056F2 RID: 22258
[Token(Token = "0x40056F2")]
public const int statisticsHeight = 160;
// Token: 0x040056F3 RID: 22259
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40056F3")]
private List<SampleDescriptor> Samples;
// Token: 0x040056F4 RID: 22260
[Token(Token = "0x40056F4")]
public static SampleDescriptor SelectedSample;
// Token: 0x040056F5 RID: 22261
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x40056F5")]
private Vector2 scrollPos;
}
}
@@ -0,0 +1,449 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.Futures;
using BestHTTP.SignalRCore;
using BestHTTP.SignalRCore.Encoders;
using BestHTTP.SignalRCore.Messages;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012CB RID: 4811
[Token(Token = "0x20012CB")]
[StructLayout(3)]
public class TestHubExample : MonoBehaviour
{
// Token: 0x06007885 RID: 30853 RVA: 0x00190A90 File Offset: 0x0018EC90
[Token(Token = "0x6007885")]
[Address(RVA = "0x1E69A10", Offset = "0x1E68410", VA = "0x181E69A10")]
private void Start()
{
HubOptions hubOptions = new HubOptions();
hubOptions.<SkipNegotiation>k__BackingField = false;
Uri uri = this.URI;
JsonProtocol jsonProtocol = new JsonProtocol(new LitJsonEncoder());
HubConnection hubConnection = new HubConnection(uri, jsonProtocol, hubOptions);
this.hub = hubConnection;
Action<HubConnection> action = new Action(this.Hub_OnConnected);
hubConnection.OnConnected += action;
HubConnection hubConnection2 = this.hub;
Action<HubConnection, string> action2 = new Action(this.Hub_OnError);
hubConnection2.OnError += action2;
HubConnection hubConnection3 = this.hub;
Action<HubConnection> action3 = new Action(this.Hub_OnClosed);
hubConnection3.OnClosed += action3;
HubConnection hubConnection4 = this.hub;
Func<HubConnection, Message, bool> func = new Func(this.Hub_OnMessage);
hubConnection4.OnMessage += func;
HubConnection hubConnection5 = this.hub;
Action<string> action4 = delegate(string arg)
{
string text = this.uiText;
string text2 = string.Format(" On Send: {0}\n", arg);
string text3 = text + text2;
this.uiText = text3;
};
hubConnection5.On<string>("Send", action4);
HubConnection hubConnection6 = this.hub;
Action<TestHubExample.Person> action5 = delegate(TestHubExample.Person person)
{
string text4 = this.uiText;
string text5 = string.Format(" On Person: {0}\n", person);
string text6 = text4 + text5;
this.uiText = text6;
};
hubConnection6.On<TestHubExample.Person>("Person", action5);
HubConnection hubConnection7 = this.hub;
Action<TestHubExample.Person, TestHubExample.Person> action6 = delegate(TestHubExample.Person person1, TestHubExample.Person person2)
{
string text7 = this.uiText;
string text8 = string.Format(" On TwoPersons: {0}, {1}\n", person1, person2);
string text9 = text7 + text8;
this.uiText = text9;
};
hubConnection7.On<TestHubExample.Person, TestHubExample.Person>("TwoPersons", action6);
this.hub.StartConnect();
this.uiText = "StartConnect called\n";
}
// Token: 0x06007886 RID: 30854 RVA: 0x00190BC8 File Offset: 0x0018EDC8
[Token(Token = "0x6007886")]
[Address(RVA = "0x1E65120", Offset = "0x1E63B20", VA = "0x181E65120")]
private void OnDestroy()
{
HubConnection hubConnection = this.hub;
if (hubConnection != 0)
{
hubConnection.StartClose();
return;
}
}
// Token: 0x06007887 RID: 30855 RVA: 0x00190BE8 File Offset: 0x0018EDE8
[Token(Token = "0x6007887")]
[Address(RVA = "0x1E69960", Offset = "0x1E68360", VA = "0x181E69960")]
private void OnGUI()
{
Rect clientArea = GUIHelper.ClientArea;
Action action = delegate
{
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
Vector2 vector;
this.scrollPos = vector;
this.scrollPos.y = (float)0;
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
string text = this.uiText;
GUILayoutOption[] array2 = Array.Empty<GUILayoutOption>();
GUILayout.Label(text, array2);
GUILayout.EndVertical();
GUILayout.EndScrollView();
};
GUIHelper.DrawArea(clientArea, true, action);
}
// Token: 0x06007888 RID: 30856 RVA: 0x00190C10 File Offset: 0x0018EE10
[Token(Token = "0x6007888")]
[Address(RVA = "0x1E68B20", Offset = "0x1E67520", VA = "0x181E68B20")]
private void Hub_OnConnected(HubConnection hub)
{
string text = this.uiText + "Hub Connected\n";
this.uiText = text;
object[] array = new object[1];
if ("my message" != 0)
{
}
array[0] = "my message";
IFuture<bool> future = hub.Send("Send", array);
object[] array2 = Array.Empty<object>();
IFuture future2 = hub.Invoke<string>("NoParam", array2);
FutureValueCallback<string> futureValueCallback = delegate(string ret)
{
string text2 = this.uiText;
string text3 = string.Format(" 'NoParam' returned: {0}\n", ret);
string text4 = text2 + text3;
this.uiText = text4;
};
object[] array3 = new object[2];
int num;
if (num != 0)
{
}
array3[0] = num;
if (num != 0)
{
}
array3[1] = num;
IFuture future3 = hub.Invoke<int>("Add", array3);
FutureValueCallback<int> futureValueCallback2 = delegate(int result)
{
string text5 = this.uiText;
string text6 = string.Format(" 'Add(10, 20)' returned: {0}\n", result);
string text7 = text5 + text6;
this.uiText = text7;
};
FutureErrorCallback futureErrorCallback = delegate(Exception error)
{
string text8 = this.uiText;
string text9 = string.Format(" 'Add(10, 20)' error: {0}\n", error);
string text10 = text8 + text9;
this.uiText = text10;
};
object[] array4 = new object[2];
if ("Mr. Smith" != 0)
{
}
array4[0] = "Mr. Smith";
if ("Mr. Smith" != 0)
{
}
array4[1] = "Mr. Smith";
IFuture future4 = hub.Invoke<TestHubExample.Person>("GetPerson", array4);
FutureValueCallback<TestHubExample.Person> futureValueCallback3 = delegate(TestHubExample.Person result)
{
string text11 = this.uiText;
string text12 = string.Format(" 'GetPerson(\"Mr. Smith\", 26)' returned: {0}\n", result);
string text13 = text11 + text12;
this.uiText = text13;
};
int num2 = 0;
num2 += num2;
num2++;
FutureErrorCallback futureErrorCallback2 = delegate(Exception error)
{
string text14 = this.uiText;
string text15 = string.Format(" 'GetPerson(\"Mr. Smith\", 26)' error: {0}\n", error);
string text16 = text14 + text15;
this.uiText = text16;
};
object[] array5 = new object[2];
int num3;
if (num3 != 0)
{
num3 += 4;
num3 += 19;
}
array5[0] = num3;
if (num3 != 0)
{
}
array5[1] = num3;
IFuture future5 = hub.Invoke<int>("SingleResultFailure", array5);
FutureValueCallback<int> futureValueCallback4 = delegate(int result)
{
string text17 = this.uiText;
string text18 = string.Format(" 'SingleResultFailure(10, 20)' returned: {0}\n", result);
string text19 = text17 + text18;
this.uiText = text19;
};
FutureErrorCallback futureErrorCallback3 = delegate(Exception error)
{
string text20 = this.uiText;
string text21 = string.Format(" 'SingleResultFailure(10, 20)' error: {0}\n", error);
string text22 = text20 + text21;
this.uiText = text22;
};
object[] array6 = new object[1];
int num4;
if (num4 != 0)
{
}
array6[0] = num4;
IFuture future6 = hub.Invoke<int[]>("Batched", array6);
FutureValueCallback<int[]> futureValueCallback5 = delegate(int[] result)
{
string text23 = this.uiText;
int length = result.Length;
string text24 = string.Format(" 'Batched(10)' returned items: {0}\n", length);
string text25 = text23 + text24;
this.uiText = text25;
};
num2 += num2;
num2++;
FutureErrorCallback futureErrorCallback4 = delegate(Exception error)
{
string text26 = this.uiText;
string text27 = string.Format(" 'Batched(10)' error: {0}\n", error);
string text28 = text26 + text27;
this.uiText = text28;
};
object[] array7 = new object[2];
int num5;
if (num5 != 0)
{
num5 += 4;
num5 += 19;
}
array7[0] = num5;
if (num5 != 0)
{
}
array7[1] = num5;
IFuture future7 = hub.Stream<int>("ObservableCounter", array7);
FutureValueCallback<StreamItemContainer<int>> futureValueCallback6 = delegate(StreamItemContainer<int> result)
{
string text29 = this.uiText;
!0 <LastAdded>k__BackingField = result.<LastAdded>k__BackingField;
string text31;
string text30 = text29 + text31;
this.uiText = text30;
};
FutureValueCallback<StreamItemContainer<int>> futureValueCallback7 = delegate(StreamItemContainer<int> result)
{
string text32 = this.uiText;
int size = result.<Items>k__BackingField._size;
string text33 = string.Format(" 'ObservableCounter(10, 1000)' OnSuccess. Final count: {0}\n", size);
string text34 = text32 + text33;
this.uiText = text34;
};
FutureErrorCallback futureErrorCallback5 = delegate(Exception error)
{
string text35 = this.uiText;
string text36 = string.Format(" 'ObservableCounter(10, 1000)' error: {0}\n", error);
string text37 = text35 + text36;
this.uiText = text37;
};
object[] array8 = new object[2];
int num6;
if (num6 != 0)
{
}
array8[0] = num6;
if (num6 != 0)
{
}
array8[1] = num6;
IFuture future8 = hub.Stream<int>("ChannelCounter", array8);
FutureValueCallback<StreamItemContainer<int>> futureValueCallback8 = delegate(StreamItemContainer<int> result)
{
string text38 = this.uiText;
!0 <LastAdded>k__BackingField2 = result.<LastAdded>k__BackingField;
string text40;
string text39 = text38 + text40;
this.uiText = text39;
};
FutureValueCallback<StreamItemContainer<int>> futureValueCallback9 = delegate(StreamItemContainer<int> result)
{
string text41 = this.uiText;
int size2 = result.<Items>k__BackingField._size;
string text42 = string.Format(" 'ChannelCounter(10, 1000)' OnSuccess. Final count: {0}\n", size2);
string text43 = text41 + text42;
this.uiText = text43;
};
FutureErrorCallback futureErrorCallback6 = delegate(Exception error)
{
string text44 = this.uiText;
string text45 = string.Format(" 'ChannelCounter(10, 1000)' error: {0}\n", error);
string text46 = text44 + text45;
this.uiText = text46;
};
if (num2 < typeof(IFuture<StreamItemContainer<int>>).TypeHandle)
{
num2 += num2;
if (num2 == typeof(IFuture<StreamItemContainer<int>>).TypeHandle)
{
goto IL_2CE;
}
num2++;
}
hub.CancelStream<int>(num2);
object[] array9 = new object[2];
int num7;
if (num7 == 0)
{
goto IL_2E2;
}
IL_2CE:
num7 += num7;
num7++;
num7 += 19;
IL_2E2:
array9[0] = num7;
if (num7 != 0)
{
}
array9[1] = num7;
IFuture future9 = hub.Stream<TestHubExample.Person>("GetRandomPersons", array9);
FutureValueCallback<StreamItemContainer<TestHubExample.Person>> futureValueCallback10 = delegate(StreamItemContainer<TestHubExample.Person> result)
{
string text48;
string text47 = this.uiText + text48;
this.uiText = text47;
};
FutureValueCallback<StreamItemContainer<TestHubExample.Person>> futureValueCallback11 = delegate(StreamItemContainer<TestHubExample.Person> result)
{
string text49 = this.uiText;
int size3 = result.<Items>k__BackingField._size;
string text50 = string.Format(" 'GetRandomPersons(20, 1000)' OnSuccess. Final count: {0}\n", size3);
string text51 = text49 + text50;
this.uiText = text51;
};
}
// Token: 0x06007889 RID: 30857 RVA: 0x00190F4C File Offset: 0x0018F14C
[Token(Token = "0x6007889")]
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0")]
private bool Hub_OnMessage(HubConnection hub, Message message)
{
return true;
}
// Token: 0x0600788A RID: 30858 RVA: 0x00190F5C File Offset: 0x0018F15C
[Token(Token = "0x600788A")]
[Address(RVA = "0x1E68AD0", Offset = "0x1E674D0", VA = "0x181E68AD0")]
private void Hub_OnClosed(HubConnection hub)
{
string text = this.uiText + "Hub Closed\n";
this.uiText = text;
}
// Token: 0x0600788B RID: 30859 RVA: 0x00190F84 File Offset: 0x0018F184
[Token(Token = "0x600788B")]
[Address(RVA = "0x1E69900", Offset = "0x1E68300", VA = "0x181E69900")]
private void Hub_OnError(HubConnection hub, string error)
{
string text = this.uiText + "Hub Error: " + error + "\n";
this.uiText = text;
}
// Token: 0x0600788C RID: 30860 RVA: 0x00190FB0 File Offset: 0x0018F1B0
[Token(Token = "0x600788C")]
[Address(RVA = "0x1E6A7D0", Offset = "0x1E691D0", VA = "0x181E6A7D0")]
public TestHubExample()
{
Uri uri = new Uri(GUIHelper.BaseURL + "/TestHub");
this.URI = uri;
base..ctor();
}
// Token: 0x040056FC RID: 22268
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40056FC")]
private readonly Uri URI;
// Token: 0x040056FD RID: 22269
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x40056FD")]
private HubConnection hub;
// Token: 0x040056FE RID: 22270
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x40056FE")]
private Vector2 scrollPos;
// Token: 0x040056FF RID: 22271
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x40056FF")]
private string uiText;
// Token: 0x020012CC RID: 4812
[Token(Token = "0x20012CC")]
private sealed class Person
{
// Token: 0x170013A2 RID: 5026
// (get) Token: 0x060078A2 RID: 30882 RVA: 0x00191438 File Offset: 0x0018F638
// (set) Token: 0x060078A3 RID: 30883 RVA: 0x0019144C File Offset: 0x0018F64C
[Token(Token = "0x170013A2")]
public string Name
{
[Token(Token = "0x60078A2")]
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
get;
[Token(Token = "0x60078A3")]
[Address(RVA = "0x3C39B0", Offset = "0x3C23B0", VA = "0x1803C39B0")]
set;
}
// Token: 0x170013A3 RID: 5027
// (get) Token: 0x060078A4 RID: 30884 RVA: 0x00191460 File Offset: 0x0018F660
// (set) Token: 0x060078A5 RID: 30885 RVA: 0x00191474 File Offset: 0x0018F674
[Token(Token = "0x170013A3")]
public long Age
{
[Token(Token = "0x60078A4")]
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
get;
[Token(Token = "0x60078A5")]
[Address(RVA = "0x3C1280", Offset = "0x3BFC80", VA = "0x1803C1280")]
set;
}
// Token: 0x060078A6 RID: 30886 RVA: 0x00191488 File Offset: 0x0018F688
[Token(Token = "0x60078A6")]
[Address(RVA = "0x1E67190", Offset = "0x1E65B90", VA = "0x181E67190", Slot = "3")]
public override string ToString()
{
long num = this.<Age>k__BackingField;
string text = this.<Name>k__BackingField;
return string.Format("[Person Name: '{0}', Age: {1}]", text, num);
}
// Token: 0x060078A7 RID: 30887 RVA: 0x001914B0 File Offset: 0x0018F6B0
[Token(Token = "0x60078A7")]
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
public Person()
{
}
}
}
}
@@ -0,0 +1,246 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012C0 RID: 4800
[Token(Token = "0x20012C0")]
[StructLayout(3)]
public sealed class TextureDownloadSample : MonoBehaviour
{
// Token: 0x06007838 RID: 30776 RVA: 0x0018F220 File Offset: 0x0018D420
[Token(Token = "0x6007838")]
[Address(RVA = "0x1E6A880", Offset = "0x1E69280", VA = "0x181E6A880")]
private void Awake()
{
string[] images = this.Images;
int num = 0;
if (num < images.Length)
{
Texture2D[] textures = this.Textures;
Texture2D texture2D;
if (texture2D != 0)
{
}
num++;
textures[0] = texture2D;
string[] images2 = this.Images;
}
}
// Token: 0x06007839 RID: 30777 RVA: 0x0018F264 File Offset: 0x0018D464
[Token(Token = "0x6007839")]
[Address(RVA = "0x1E6ADF0", Offset = "0x1E697F0", VA = "0x181E6ADF0")]
private void OnDestroy()
{
}
// Token: 0x0600783A RID: 30778 RVA: 0x0018F274 File Offset: 0x0018D474
[Token(Token = "0x600783A")]
[Address(RVA = "0x1E6AE40", Offset = "0x1E69840", VA = "0x181E6AE40")]
private void OnGUI()
{
Rect clientArea = GUIHelper.ClientArea;
Action action = delegate
{
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
Texture2D[] textures = this.Textures;
Vector2 vector;
this.scrollPos = vector;
this.scrollPos.y = (float)0;
GUILayoutOption[] array2 = Array.Empty<GUILayoutOption>();
int num = GUILayout.SelectionGrid(0, textures, 3, array2);
int length = this.Images.Length;
if (this.finishedCount == length && this.allDownloadedFromLocalCache)
{
GUIHelper.DrawCenteredText("All images loaded from the local cache!");
}
GUILayout.FlexibleSpace();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayoutOption[] array3 = new GUILayoutOption[1];
GUILayoutOption guilayoutOption = GUILayout.Width(150f);
if (guilayoutOption != 0)
{
}
array3[0] = guilayoutOption;
GUILayout.Label("Max Connection/Server: ", array3);
byte maxConnectionPerServer = HTTPManager.maxConnectionPerServer;
GUILayoutOption[] array4 = new GUILayoutOption[1];
GUILayoutOption guilayoutOption2 = GUILayout.Width(20f);
if (guilayoutOption2 != 0)
{
}
array4[0] = guilayoutOption2;
GUILayoutOption[] array5 = Array.Empty<GUILayoutOption>();
float num2 = GUILayout.HorizontalSlider(20f, 1f, 10f, array5);
GUILayout.EndHorizontal();
GUILayoutOption[] array6 = Array.Empty<GUILayoutOption>();
if (GUILayout.Button("Start Download", array6))
{
this.DownloadImages();
}
GUILayout.EndScrollView();
};
GUIHelper.DrawArea(clientArea, true, action);
}
// Token: 0x0600783B RID: 30779 RVA: 0x0018F29C File Offset: 0x0018D49C
[Token(Token = "0x600783B")]
[Address(RVA = "0x1E6A990", Offset = "0x1E69390", VA = "0x181E6A990")]
private void DownloadImages()
{
string[] images = this.Images;
int num = 0;
this.finishedCount = num;
if (num < images.Length)
{
Texture2D[] textures = this.Textures;
Texture2D texture2D;
if (texture2D != 0)
{
}
textures[0] = texture2D;
string text = this.Images[num];
Uri uri = new Uri(this.BaseURL + text);
OnRequestFinishedDelegate onRequestFinishedDelegate = new OnRequestFinishedDelegate(this.ImageDownloaded);
HTTPRequest httprequest = new HTTPRequest(uri, onRequestFinishedDelegate);
Texture2D texture2D2 = this.Textures[num];
httprequest.<Tag>k__BackingField = texture2D2;
HTTPRequest httprequest2 = httprequest.Send();
string[] images2 = this.Images;
num++;
}
}
// Token: 0x0600783C RID: 30780 RVA: 0x0018F344 File Offset: 0x0018D544
[Token(Token = "0x600783C")]
[Address(RVA = "0x1E6AB70", Offset = "0x1E69570", VA = "0x181E6AB70")]
private void ImageDownloaded(HTTPRequest req, HTTPResponse resp)
{
HTTPRequestStates <State>k__BackingField = req.<State>k__BackingField;
if (req != 0)
{
if (req != 0)
{
if (req != 0)
{
if (req != 0)
{
if (<State>k__BackingField != HTTPRequestStates.Queued)
{
return;
}
Debug.LogError("Processing the request Timed Out!");
}
Debug.LogError("Connection Timed Out!");
}
Debug.LogWarning("Request Aborted!");
return;
}
if (req.<Exception>k__BackingField != 0)
{
Exception innerException = req.<Exception>k__BackingField.InnerException;
}
Debug.LogError("Request Finished with Error! " + "No Exception");
}
int num;
if (!resp.IsSuccess)
{
int <StatusCode>k__BackingField = resp.<StatusCode>k__BackingField;
string <Message>k__BackingField = resp.<Message>k__BackingField;
string dataAsText = resp.DataAsText;
string text = string.Format("Request finished Successfully, but the server sent an error. Status Code: {0}-{1} Message: {2}", <StatusCode>k__BackingField, <Message>k__BackingField, dataAsText);
num = 0;
}
if (num != 0)
{
}
byte[] <Data>k__BackingField = resp.<Data>k__BackingField;
bool flag = num.LoadImage(<Data>k__BackingField);
bool flag2 = resp.<IsFromCache>k__BackingField;
throw new NullReferenceException();
}
// Token: 0x0600783D RID: 30781 RVA: 0x0018F418 File Offset: 0x0018D618
[Token(Token = "0x600783D")]
[Address(RVA = "0x1E6B2A0", Offset = "0x1E69CA0", VA = "0x181E6B2A0")]
public TextureDownloadSample()
{
string text = GUIHelper.BaseURL + "/images/Demo/";
this.BaseURL = text;
string[] array = new string[9];
if ("One.png" != 0)
{
}
array[0] = "One.png";
if ("Two.png" != 0)
{
}
array[1] = "Two.png";
if ("Three.png" != 0)
{
}
array[2] = "Three.png";
if ("Four.png" != 0)
{
}
array[3] = "Four.png";
if ("Five.png" != 0)
{
}
array[4] = "Five.png";
if ("Six.png" != 0)
{
}
array[5] = "Six.png";
if ("Seven.png" != 0)
{
}
array[6] = "Seven.png";
if ("Eight.png" != 0)
{
}
array[7] = "Eight.png";
if ("Nine.png" != 0)
{
}
array[8] = "Nine.png";
this.Images = array;
Texture2D[] array2 = new Texture2D[9];
this.Textures = array2;
base..ctor();
}
// Token: 0x040056C6 RID: 22214
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40056C6")]
private string BaseURL;
// Token: 0x040056C7 RID: 22215
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x40056C7")]
private string[] Images;
// Token: 0x040056C8 RID: 22216
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x40056C8")]
private Texture2D[] Textures;
// Token: 0x040056C9 RID: 22217
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x40056C9")]
private bool allDownloadedFromLocalCache;
// Token: 0x040056CA RID: 22218
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
[Token(Token = "0x40056CA")]
private int finishedCount;
// Token: 0x040056CB RID: 22219
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x40056CB")]
private Vector2 scrollPos;
}
}
@@ -0,0 +1,572 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using BestHTTP.Logger;
using Cpp2IlInjected;
namespace BestHTTP.Examples
{
// Token: 0x020012C1 RID: 4801
[Token(Token = "0x20012C1")]
[StructLayout(3)]
public sealed class UploadStream : Stream
{
// Token: 0x17001394 RID: 5012
// (get) Token: 0x0600783F RID: 30783 RVA: 0x0018F644 File Offset: 0x0018D844
// (set) Token: 0x06007840 RID: 30784 RVA: 0x0018F658 File Offset: 0x0018D858
[Token(Token = "0x17001394")]
public string Name
{
[Token(Token = "0x600783F")]
[Address(RVA = "0x462740", Offset = "0x461140", VA = "0x180462740")]
get;
[Token(Token = "0x6007840")]
[Address(RVA = "0x462750", Offset = "0x461150", VA = "0x180462750")]
private set;
}
// Token: 0x17001395 RID: 5013
// (get) Token: 0x06007841 RID: 30785 RVA: 0x0018F66C File Offset: 0x0018D86C
[Token(Token = "0x17001395")]
private bool IsReadBufferEmpty
{
[Token(Token = "0x6007841")]
[Address(RVA = "0x1E6D090", Offset = "0x1E6BA90", VA = "0x181E6D090")]
get
{
int num;
bool canWrite;
do
{
num = 0;
object obj = this.locker;
long length = this.ReadBuffer.Length;
canWrite = this.ReadBuffer.CanWrite;
Monitor.Exit(obj);
if (num != -1)
{
}
}
while (num != 0);
return canWrite;
}
}
// Token: 0x06007842 RID: 30786 RVA: 0x0018F6B8 File Offset: 0x0018D8B8
[Token(Token = "0x6007842")]
[Address(RVA = "0x1E6CD50", Offset = "0x1E6B750", VA = "0x181E6CD50")]
public UploadStream(string name)
{
MemoryStream memoryStream = new MemoryStream();
this.ReadBuffer = memoryStream;
MemoryStream memoryStream2 = new MemoryStream();
this.WriteBuffer = memoryStream2;
int num;
AutoResetEvent autoResetEvent = new AutoResetEvent(num != 0);
num = 0;
this.ARE = autoResetEvent;
object obj = new object();
this.locker = obj;
base..ctor();
MemoryStream memoryStream3 = new MemoryStream();
this.ReadBuffer = memoryStream3;
MemoryStream memoryStream4 = new MemoryStream();
this.WriteBuffer = memoryStream4;
this.Name = name;
}
// Token: 0x06007843 RID: 30787 RVA: 0x0018F72C File Offset: 0x0018D92C
[Token(Token = "0x6007843")]
[Address(RVA = "0x1E6CE70", Offset = "0x1E6B870", VA = "0x181E6CE70")]
public UploadStream()
{
MemoryStream memoryStream = new MemoryStream();
this.ReadBuffer = memoryStream;
MemoryStream memoryStream2 = new MemoryStream();
this.WriteBuffer = memoryStream2;
int num;
AutoResetEvent autoResetEvent = new AutoResetEvent(num != 0);
num = 0;
this.ARE = autoResetEvent;
object obj = new object();
this.locker = obj;
base..ctor();
MemoryStream memoryStream3 = new MemoryStream();
this.ReadBuffer = memoryStream3;
MemoryStream memoryStream4 = new MemoryStream();
this.WriteBuffer = memoryStream4;
string empty = string.Empty;
this.Name = empty;
}
// Token: 0x06007844 RID: 30788 RVA: 0x0018F7A8 File Offset: 0x0018D9A8
[Token(Token = "0x6007844")]
[Address(RVA = "0x1E6C600", Offset = "0x1E6B000", VA = "0x181E6C600", Slot = "27")]
public override int Read(byte[] buffer, int offset, int count)
{
for (;;)
{
int num = 0;
if ((this.noMoreData ? 1 : 0) != num)
{
long length = this.ReadBuffer.Length;
bool canWrite = this.ReadBuffer.CanWrite;
MemoryStream readBuffer = this.ReadBuffer;
bool canWrite2 = this.WriteBuffer.CanWrite;
ILogger logger = HTTPManager.Logger;
string text = this.<Name>k__BackingField;
string text2 = string.Format("{0} - Read - End Of Stream", text);
bool flag = this.SwitchBuffers();
}
if (!this.IsReadBufferEmpty)
{
goto IL_A5;
}
AutoResetEvent are = this.ARE;
object obj = this.locker;
if (this.IsReadBufferEmpty && this.WriteBuffer.CanWrite > false)
{
bool flag2 = this.SwitchBuffers();
}
int num2 = 0;
Monitor.Exit(obj);
if (num != -1)
{
goto IL_A5;
}
IL_C7:
if (num != 0)
{
continue;
}
object obj2;
Monitor.Exit(obj2);
if (num != -1)
{
}
if (num == 0)
{
break;
}
continue;
IL_A5:
obj2 = this.locker;
Monitor.Enter(obj2, num2);
this.ReadBuffer.SetLength((long)num2);
num++;
goto IL_C7;
}
throw new NullReferenceException();
}
// Token: 0x06007845 RID: 30789 RVA: 0x0018F89C File Offset: 0x0018DA9C
[Token(Token = "0x6007845")]
[Address(RVA = "0x1E6CBD0", Offset = "0x1E6B5D0", VA = "0x181E6CBD0", Slot = "29")]
public override void Write(byte[] buffer, int offset, int count)
{
int num;
do
{
num = 0;
if ((this.noMoreData ? 1 : 0) != num)
{
goto IL_41;
}
object obj = this.locker;
int num2 = this.WriteBuffer.ReadByte();
bool flag = this.SwitchBuffers();
Monitor.Exit(obj);
if (num != -1)
{
}
}
while (num != 0);
bool flag2 = this.ARE.Set();
return;
IL_41:
ArgumentException ex = new ArgumentException("noMoreData already set!");
throw new NullReferenceException();
}
// Token: 0x06007846 RID: 30790 RVA: 0x0018F8FC File Offset: 0x0018DAFC
[Token(Token = "0x6007846")]
[Address(RVA = "0x1E6C510", Offset = "0x1E6AF10", VA = "0x181E6C510", Slot = "17")]
public override void Flush()
{
/*
An exception occurred when decompiling this method (06007846)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.Examples.UploadStream::Flush()
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_3D:
stloc:ArgumentException(var_6_47, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("noMoreData already set!")))
}
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.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
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
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
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: 0x06007847 RID: 30791 RVA: 0x0018F954 File Offset: 0x0018DB54
[Token(Token = "0x6007847")]
[Address(RVA = "0x1E6C400", Offset = "0x1E6AE00", VA = "0x181E6C400", Slot = "16")]
protected override void Dispose(bool disposing)
{
if (disposing)
{
ILogger logger = HTTPManager.Logger;
string text = this.<Name>k__BackingField;
string text2 = string.Format("{0} - Dispose", text);
this.ReadBuffer.Dispose();
MemoryStream writeBuffer = this.WriteBuffer;
int num = 0;
this.ReadBuffer = num;
writeBuffer.Dispose();
AutoResetEvent are = this.ARE;
this.WriteBuffer = num;
this.ARE = num;
}
base.Dispose(disposing);
}
// Token: 0x06007848 RID: 30792 RVA: 0x0018F9CC File Offset: 0x0018DBCC
[Token(Token = "0x6007848")]
[Address(RVA = "0x1E6C510", Offset = "0x1E6AF10", VA = "0x181E6C510")]
public void Finish()
{
/*
An exception occurred when decompiling this method (06007848)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.Examples.UploadStream::Finish()
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_3D:
stloc:ArgumentException(var_6_47, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("noMoreData already set!")))
}
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.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
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
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
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: 0x06007849 RID: 30793 RVA: 0x0018FA24 File Offset: 0x0018DC24
[Token(Token = "0x6007849")]
[Address(RVA = "0x1E6CA20", Offset = "0x1E6B420", VA = "0x181E6CA20")]
private bool SwitchBuffers()
{
for (;;)
{
int num = 0;
object obj = this.locker;
long length = this.ReadBuffer.Length;
bool canWrite = this.ReadBuffer.CanWrite;
if (length != (canWrite ? 1L : 0L))
{
}
MemoryStream writeBuffer = this.WriteBuffer;
MemoryStream readBuffer = this.ReadBuffer;
MemoryStream writeBuffer2 = this.WriteBuffer;
MemoryStream readBuffer2 = this.ReadBuffer;
this.WriteBuffer = readBuffer2;
this.ReadBuffer = writeBuffer2;
int num2 = 0;
Monitor.Exit(obj);
if (num != -1)
{
if (num2 == 113)
{
break;
}
if (num2 == 111)
{
goto IL_74;
}
}
if (num == 0)
{
goto IL_74;
}
}
return true;
IL_74:
throw new NullReferenceException();
}
// Token: 0x17001396 RID: 5014
// (get) Token: 0x0600784A RID: 30794 RVA: 0x0018FAC0 File Offset: 0x0018DCC0
[Token(Token = "0x17001396")]
public override bool CanRead
{
[Token(Token = "0x600784A")]
[Address(RVA = "0x1E6CFA0", Offset = "0x1E6B9A0", VA = "0x181E6CFA0", Slot = "7")]
get
{
/*
An exception occurred when decompiling this method (0600784A)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.Examples.UploadStream::get_CanRead()
---> 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: 0x17001397 RID: 5015
// (get) Token: 0x0600784B RID: 30795 RVA: 0x0018FAD4 File Offset: 0x0018DCD4
[Token(Token = "0x17001397")]
public override bool CanSeek
{
[Token(Token = "0x600784B")]
[Address(RVA = "0x1E6CFF0", Offset = "0x1E6B9F0", VA = "0x181E6CFF0", Slot = "8")]
get
{
/*
An exception occurred when decompiling this method (0600784B)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.Examples.UploadStream::get_CanSeek()
---> 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: 0x17001398 RID: 5016
// (get) Token: 0x0600784C RID: 30796 RVA: 0x0018FAE8 File Offset: 0x0018DCE8
[Token(Token = "0x17001398")]
public override bool CanWrite
{
[Token(Token = "0x600784C")]
[Address(RVA = "0x1E6D040", Offset = "0x1E6BA40", VA = "0x181E6D040", Slot = "9")]
get
{
/*
An exception occurred when decompiling this method (0600784C)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.Examples.UploadStream::get_CanWrite()
---> 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: 0x17001399 RID: 5017
// (get) Token: 0x0600784D RID: 30797 RVA: 0x0018FAFC File Offset: 0x0018DCFC
[Token(Token = "0x17001399")]
public override long Length
{
[Token(Token = "0x600784D")]
[Address(RVA = "0x1E6D1A0", Offset = "0x1E6BBA0", VA = "0x181E6D1A0", Slot = "10")]
get
{
/*
An exception occurred when decompiling this method (0600784D)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 BestHTTP.Examples.UploadStream::get_Length()
---> 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: 0x1700139A RID: 5018
// (get) Token: 0x0600784E RID: 30798 RVA: 0x0018FB10 File Offset: 0x0018DD10
// (set) Token: 0x0600784F RID: 30799 RVA: 0x0018FB24 File Offset: 0x0018DD24
[Token(Token = "0x1700139A")]
public override long Position
{
[Token(Token = "0x600784E")]
[Address(RVA = "0x1E6D1F0", Offset = "0x1E6BBF0", VA = "0x181E6D1F0", Slot = "11")]
get
{
/*
An exception occurred when decompiling this method (0600784E)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 BestHTTP.Examples.UploadStream::get_Position()
---> 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(Token = "0x600784F")]
[Address(RVA = "0x1E6D240", Offset = "0x1E6BC40", VA = "0x181E6D240", Slot = "12")]
set
{
/*
An exception occurred when decompiling this method (0600784F)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.Examples.UploadStream::set_Position(System.Int64)
---> 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: 0x06007850 RID: 30800 RVA: 0x0018FB38 File Offset: 0x0018DD38
[Token(Token = "0x6007850")]
[Address(RVA = "0x1E6C980", Offset = "0x1E6B380", VA = "0x181E6C980", Slot = "25")]
public override long Seek(long offset, SeekOrigin origin)
{
/*
An exception occurred when decompiling this method (06007850)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 BestHTTP.Examples.UploadStream::Seek(System.Int64,System.IO.SeekOrigin)
---> 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: 0x06007851 RID: 30801 RVA: 0x0018FB4C File Offset: 0x0018DD4C
[Token(Token = "0x6007851")]
[Address(RVA = "0x1E6C9D0", Offset = "0x1E6B3D0", VA = "0x181E6C9D0", Slot = "26")]
public override void SetLength(long value)
{
/*
An exception occurred when decompiling this method (06007851)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.Examples.UploadStream::SetLength(System.Int64)
---> 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: 0x040056CC RID: 22220
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x40056CC")]
private MemoryStream ReadBuffer;
// Token: 0x040056CD RID: 22221
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x40056CD")]
private MemoryStream WriteBuffer;
// Token: 0x040056CE RID: 22222
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x40056CE")]
private bool noMoreData;
// Token: 0x040056CF RID: 22223
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x40056CF")]
private AutoResetEvent ARE;
// Token: 0x040056D0 RID: 22224
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
[Token(Token = "0x40056D0")]
private object locker;
}
}
@@ -0,0 +1,236 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.WebSocket;
using Cpp2IlInjected;
using UnityEngine;
namespace BestHTTP.Examples
{
// Token: 0x020012CD RID: 4813
[Token(Token = "0x20012CD")]
[StructLayout(3)]
public class WebSocketSample : MonoBehaviour
{
// Token: 0x060078A8 RID: 30888 RVA: 0x001914C4 File Offset: 0x0018F6C4
[Token(Token = "0x60078A8")]
[Address(RVA = "0x1E6D330", Offset = "0x1E6BD30", VA = "0x181E6D330")]
private void OnDestroy()
{
WebSocket webSocket = this.webSocket;
if (webSocket != 0)
{
webSocket.Close();
return;
}
}
// Token: 0x060078A9 RID: 30889 RVA: 0x001914E4 File Offset: 0x0018F6E4
[Token(Token = "0x60078A9")]
[Address(RVA = "0x1E6D490", Offset = "0x1E6BE90", VA = "0x181E6D490")]
private void OnGUI()
{
Rect clientArea = GUIHelper.ClientArea;
Action action = delegate
{
WebSocket webSocket5;
Delegate delegate4;
for (;;)
{
GUILayoutOption[] array = Array.Empty<GUILayoutOption>();
string text = this.Text;
Vector2 vector;
this.scrollPos = vector;
this.scrollPos.y = (float)0;
GUILayoutOption[] array2 = Array.Empty<GUILayoutOption>();
GUILayout.Label(text, array2);
GUILayout.EndScrollView();
GUILayout.Space(5f);
GUILayout.FlexibleSpace();
string text2 = this.address;
GUILayoutOption[] array3 = Array.Empty<GUILayoutOption>();
string text3 = GUILayout.TextField(text2, array3);
this.address = text3;
if (this.webSocket != (ulong)0L)
{
goto IL_1F1;
}
GUILayoutOption[] array4 = Array.Empty<GUILayoutOption>();
if (!GUILayout.Button("Open Web Socket", array4))
{
goto IL_1F1;
}
WebSocket webSocket = new WebSocket(new Uri(this.address));
this.webSocket = webSocket;
webSocket.<StartPingThread>k__BackingField = true;
if (webSocket != 0)
{
HTTPProxy httpproxy;
this.webSocket.<InternalRequest>k__BackingField.<Proxy>k__BackingField = httpproxy;
}
WebSocket webSocket2 = this.webSocket;
OnWebSocketOpenDelegate onOpen = webSocket2.OnOpen;
OnWebSocketOpenDelegate onWebSocketOpenDelegate = new OnWebSocketOpenDelegate(this.OnOpen);
Delegate @delegate = Delegate.Combine(onOpen, onWebSocketOpenDelegate);
if (@delegate == 0 || @delegate != 0)
{
webSocket2.OnOpen = @delegate;
WebSocket webSocket3 = this.webSocket;
OnWebSocketMessageDelegate onMessage = webSocket3.OnMessage;
OnWebSocketMessageDelegate onWebSocketMessageDelegate = new OnWebSocketMessageDelegate(this.OnMessageReceived);
Delegate delegate2 = Delegate.Combine(onMessage, onWebSocketMessageDelegate);
if (delegate2 == 0 || delegate2 != 0)
{
webSocket3.OnMessage = delegate2;
WebSocket webSocket4 = this.webSocket;
OnWebSocketClosedDelegate onClosed = webSocket4.OnClosed;
OnWebSocketClosedDelegate onWebSocketClosedDelegate = new OnWebSocketClosedDelegate(this.OnClosed);
Delegate delegate3 = Delegate.Combine(onClosed, onWebSocketClosedDelegate);
if (delegate3 == 0 || delegate3 != 0)
{
webSocket4.OnClosed = delegate3;
webSocket5 = this.webSocket;
OnWebSocketErrorDelegate onError = webSocket5.OnError;
OnWebSocketErrorDelegate onWebSocketErrorDelegate = new OnWebSocketErrorDelegate(this.OnError);
delegate4 = Delegate.Combine(onError, onWebSocketErrorDelegate);
if (delegate4 == 0 || delegate4 != 0)
{
break;
}
}
}
}
}
webSocket5.OnError = delegate4;
this.webSocket.Open();
string text4 = this.Text + "Opening Web Socket...\n";
this.Text = text4;
IL_1F1:
WebSocket webSocket6 = this.webSocket;
if (webSocket6 != 0 && webSocket6.IsOpen)
{
GUILayout.Space(10f);
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
string text5 = this.msgToSend;
GUILayoutOption[] array5 = Array.Empty<GUILayoutOption>();
string text6 = GUILayout.TextField(text5, array5);
this.msgToSend = text6;
GUILayout.EndHorizontal();
GUILayoutOption[] array6 = new GUILayoutOption[1];
GUILayoutOption guilayoutOption = GUILayout.MaxWidth(70f);
if (guilayoutOption != 0)
{
}
array6[0] = guilayoutOption;
if (GUILayout.Button("Send", array6))
{
string text7 = this.Text + "Sending message...\n";
WebSocket webSocket7 = this.webSocket;
this.Text = text7;
string text8 = this.msgToSend;
webSocket7.Send(text8);
}
GUILayout.Space(10f);
GUILayoutOption[] array7 = Array.Empty<GUILayoutOption>();
if (GUILayout.Button("Close", array7))
{
WebSocket webSocket8 = this.webSocket;
}
}
};
GUIHelper.DrawArea(clientArea, true, action);
}
// Token: 0x060078AA RID: 30890 RVA: 0x0019150C File Offset: 0x0018F70C
[Token(Token = "0x60078AA")]
[Address(RVA = "0x1E6D5B0", Offset = "0x1E6BFB0", VA = "0x181E6D5B0")]
private void OnOpen(WebSocket ws)
{
string text = this.Text;
object[] array = Array.Empty<object>();
string text2 = string.Format("-WebSocket Open!\n", array);
string text3 = text + text2;
this.Text = text3;
}
// Token: 0x060078AB RID: 30891 RVA: 0x00191544 File Offset: 0x0018F744
[Token(Token = "0x60078AB")]
[Address(RVA = "0x1E6D540", Offset = "0x1E6BF40", VA = "0x181E6D540")]
private void OnMessageReceived(WebSocket ws, string message)
{
string text = this.Text;
string text2 = string.Format("-Message received: {0}\n", message);
string text3 = text + text2;
this.Text = text3;
}
// Token: 0x060078AC RID: 30892 RVA: 0x00191574 File Offset: 0x0018F774
[Token(Token = "0x60078AC")]
[Address(RVA = "0x1E6D290", Offset = "0x1E6BC90", VA = "0x181E6D290")]
private void OnClosed(WebSocket ws, ushort code, string message)
{
string text = this.Text;
string text2 = string.Format("-WebSocket closed! Code: {0} Message: {1}\n", code, message);
string text3 = text + text2;
this.Text = text3;
this.webSocket = (ulong)0L;
}
// Token: 0x060078AD RID: 30893 RVA: 0x001915B0 File Offset: 0x0018F7B0
[Token(Token = "0x60078AD")]
[Address(RVA = "0x1E6D350", Offset = "0x1E6BD50", VA = "0x181E6D350")]
private void OnError(WebSocket ws, Exception ex)
{
HTTPResponse <Response>k__BackingField = ws.<InternalRequest>k__BackingField.<Response>k__BackingField;
if (<Response>k__BackingField != 0)
{
int <StatusCode>k__BackingField = <Response>k__BackingField.<StatusCode>k__BackingField;
string <Message>k__BackingField = ws.<InternalRequest>k__BackingField.<Response>k__BackingField.<Message>k__BackingField;
string text = string.Format("Status Code from Server: {0} and Message: {1}", <StatusCode>k__BackingField, <Message>k__BackingField);
}
string text2 = this.Text;
if (ex != 0)
{
}
string text4;
string text3 = string.Format("-An error occured: {0}\n", text4);
string text5 = text2 + text3;
this.Text = text5;
this.webSocket = (ulong)0L;
}
// Token: 0x060078AE RID: 30894 RVA: 0x00191630 File Offset: 0x0018F830
[Token(Token = "0x60078AE")]
[Address(RVA = "0x1E6DBD0", Offset = "0x1E6C5D0", VA = "0x181E6DBD0")]
public WebSocketSample()
{
string empty = string.Empty;
this.Text = empty;
base..ctor();
}
// Token: 0x04005702 RID: 22274
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4005702")]
private string address = "wss://echo.websocket.org";
// Token: 0x04005703 RID: 22275
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4005703")]
private string msgToSend = "Hello World!";
// Token: 0x04005704 RID: 22276
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4005704")]
private string Text;
// Token: 0x04005705 RID: 22277
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4005705")]
private WebSocket webSocket;
// Token: 0x04005706 RID: 22278
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4005706")]
private Vector2 scrollPos;
}
}