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 k__BackingField = selectedSample.k__BackingField; int num = 0; if (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 k__BackingField2 = selectedSample2.k__BackingField; int num2 = 0; if (!(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()); GUILayout.FlexibleSpace(); GUILayoutOption[] array2 = Array.Empty(); 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()); GUILayout.FlexibleSpace(); GUILayoutOption[] array3 = Array.Empty(); 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 k__BackingField = selectedSample.k__BackingField; int num = 0; if (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()); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(Array.Empty()); 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.k__BackingField) { string k__BackingField = sample.k__BackingField; GUILayoutOption[] array = Array.Empty(); if (GUILayout.Button(k__BackingField, array)) { sample.k__BackingField = true; SampleDescriptor selectedSample = SampleSelector.SelectedSample; if (selectedSample != 0) { selectedSample.k__BackingField = false; } SampleSelector.SelectedSample = sample; } return; } GUILayout.Space(15f); GUIHelper.DrawCenteredText(sample.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()); GUIHelper.DrawCenteredText(sample.k__BackingField); GUILayout.Space(5f); string k__BackingField = sample.k__BackingField; GUILayoutOption[] array = Array.Empty(); GUILayout.Label(k__BackingField, array); GUILayout.FlexibleSpace(); GUILayoutOption[] array2 = Array.Empty(); 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 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 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; } }