Decompiled source of BepisModSettings v1.1.1
plugins/BepisModSettings/BepisModSettings.dll
Decompiled 4 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Threading.Tasks.Sources; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.NET.Common; using BepInExResoniteShim; using BepisLocaleLoader; using BepisModSettings.ConfigAttributes; using BepisModSettings.DataFeeds; using BepisResoniteWrapper; using Elements.Assets; using Elements.Core; using FrooxEngine; using FrooxEngine.UIX; using HarmonyLib; using ProtoFlux.Runtimes.Execution.Nodes.FrooxEngine.Variables; using Renderite.Shared; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(/*Could not decode attribute arguments.*/)] [assembly: TargetFramework(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] [assembly: AssemblyCompany("ResoniteModding")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.1.1.0")] [assembly: AssemblyInformationalVersion("1.1.1+1f17c81b188c22e49bfd4cf006653da752b688be")] [assembly: AssemblyProduct("Bepis Mod Settings")] [assembly: AssemblyTitle("BepisModSettings")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/ResoniteModding/BepisModSettings")] [assembly: AssemblyVersion("1.1.1.0")] [module: RefSafetyRules(11)] namespace BepisModSettings { [ResonitePlugin("ResoniteModding.BepisModSettings", "Bepis Mod Settings", "1.1.1", "ResoniteModding", "https://github.com/ResoniteModding/BepisModSettings")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BasePlugin { [HarmonyPatch(typeof(SettingsDataFeed), "Enumerate", new global::System.Type[] { typeof(global::System.Collections.Generic.IReadOnlyList<string>), typeof(global::System.Collections.Generic.IReadOnlyList<string>), typeof(string), typeof(object) })] private static class EnumeratorPostfix { private static global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> Postfix(global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> __result, SettingsDataFeed __instance, global::System.Collections.Generic.IReadOnlyList<string> path) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown try { if (!Enumerable.Contains<string>((global::System.Collections.Generic.IEnumerable<string>)path, "BepInEx")) { return __result; } return WorldExtensions.IsUserspace(((Worker)__instance).World) ? DataFeedInjector.ReplaceEnumerable(__result, path) : DataFeedInjector.NotUserspaceEnumerator(path); } catch (global::System.Exception ex) { ManualLogSource log = Log; bool flag = default(bool); BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(61, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Failed to generate replacement for "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("SettingsDataFeed"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("."); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("Enumerate"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" - using original result."); } log.LogError(val); Log.LogError((object)ex.Message); return __result; } } } [HarmonyPatch(typeof(SettingsDataFeed), "PathSegmentName")] private static class PathSegmentNamePatch { private static bool Prefix(string pathSegment, int depth, ref LocaleString __result) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) LocaleString val = ((depth != 1) ? LocaleHelper.AsLocaleKey("Settings." + pathSegment + ".Breadcrumb", (string)null, true, (Dictionary<string, object>)null) : LocaleHelper.AsLocaleKey("Settings.Category." + pathSegment, (string)null, true, (Dictionary<string, object>)null)); __result = val; return false; } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Action <>9__7_0; public static Action<PluginInfo> <>9__7_3; public static Action <>9__7_2; public static Action <>9__7_1; public static Action<IField<string>> <>9__10_0; public static Action<IField<string>> <>9__10_1; public static Action<IField<string>> <>9__10_2; public static Action<IField<string>> <>9__10_3; internal void <Load>b__7_0() { Log.LogError((object)"OneOfThem"); } internal void <Load>b__7_1() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown FieldInfo val = AccessTools.Field(typeof(Settings), "_categoryInfos"); if (val != (FieldInfo)null && val.GetValue((object)null) is Dictionary<string, SettingCategoryInfo> val2) { SettingCategoryInfo val3 = new SettingCategoryInfo(new Uri("https://avatars.githubusercontent.com/u/39589027?s=200&v=4.png"), 99L); val3.InitKey("BepInEx"); val2.Add(val3.Key, val3); } else { Log.LogError((object)"Failed to find _categoryInfos field in Settings."); } Engine current = Engine.Current; object obj = <>9__7_2; if (obj == null) { Action val4 = delegate { Log.LogInfo((object)"Running shutdown, saving configs..."); Log.LogDebug((object)"Saving Config for BepInEx.Core"); ConfigFile coreConfig = ConfigFile.CoreConfig; if (coreConfig != null) { coreConfig.Save(); } if (((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Count > 0) { CollectionExtensions.Do<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Values, (Action<PluginInfo>)delegate(PluginInfo x) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object instance = x.Instance; BasePlugin val5 = (BasePlugin)((instance is BasePlugin) ? instance : null); if (val5 != null) { ManualLogSource log = Log; bool flag = default(bool); BepInExDebugLogInterpolatedStringHandler val6 = new BepInExDebugLogInterpolatedStringHandler(18, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val6).AppendLiteral("Saving Config for "); ((BepInExLogInterpolatedStringHandler)val6).AppendFormatted<string>(x.Metadata.GUID); } log.LogDebug(val6); ConfigFile config = val5.Config; if (config != null) { config.Save(); } } }); } }; <>9__7_2 = val4; obj = (object)val4; } current.OnShutdown += (Action)obj; } internal void <Load>b__7_2() { Log.LogInfo((object)"Running shutdown, saving configs..."); Log.LogDebug((object)"Saving Config for BepInEx.Core"); ConfigFile coreConfig = ConfigFile.CoreConfig; if (coreConfig != null) { coreConfig.Save(); } if (((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Count <= 0) { return; } CollectionExtensions.Do<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Values, (Action<PluginInfo>)delegate(PluginInfo x) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object instance = x.Instance; BasePlugin val = (BasePlugin)((instance is BasePlugin) ? instance : null); if (val != null) { ManualLogSource log = Log; bool flag = default(bool); BepInExDebugLogInterpolatedStringHandler val2 = new BepInExDebugLogInterpolatedStringHandler(18, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("Saving Config for "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>(x.Metadata.GUID); } log.LogDebug(val2); ConfigFile config = val.Config; if (config != null) { config.Save(); } } }); } internal void <Load>b__7_3(PluginInfo x) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object instance = x.Instance; BasePlugin val = (BasePlugin)((instance is BasePlugin) ? instance : null); if (val != null) { ManualLogSource log = Log; bool flag = default(bool); BepInExDebugLogInterpolatedStringHandler val2 = new BepInExDebugLogInterpolatedStringHandler(18, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("Saving Config for "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>(x.Metadata.GUID); } log.LogDebug(val2); ConfigFile config = val.Config; if (config != null) { config.Save(); } } } internal void <CustomDateFeedEnumerate>b__10_0(IField<string> field) { ((IValue<string>)(object)field).Value = "Test1"; } internal void <CustomDateFeedEnumerate>b__10_1(IField<string> field) { ((IValue<string>)(object)field).Value = "Test2"; } internal void <CustomDateFeedEnumerate>b__10_2(IField<string> field) { ((IValue<string>)(object)field).Value = "Test3"; } internal void <CustomDateFeedEnumerate>b__10_3(IField<string> field) { ((IValue<string>)(object)field).Value = "Test4"; } } [CompilerGenerated] private sealed class <CustomDateFeedEnumerate>d__10 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine { public int <>1__state; public AsyncIteratorMethodBuilder <>t__builder; public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd; private DataFeedItem <>2__current; private bool <>w__disposeMode; private int <>l__initialThreadId; private global::System.Collections.Generic.IReadOnlyList<string> path; public global::System.Collections.Generic.IReadOnlyList<string> <>3__path; private global::System.Collections.Generic.IReadOnlyList<string> groupingKeys; public global::System.Collections.Generic.IReadOnlyList<string> <>3__groupingKeys; private string[] <groupingKeysArray>5__2; private TaskAwaiter <>u__1; DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CustomDateFeedEnumerate>d__10(int <>1__state) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) <>t__builder = AsyncIteratorMethodBuilder.Create(); this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } private void MoveNext() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; try { TaskAwaiter awaiter; DataFeedGroup val2; switch (num) { default: if (<>w__disposeMode) { break; } num = (<>1__state = -1); <>2__current = null; awaiter = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter(); if (!((TaskAwaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter; <CustomDateFeedEnumerate>d__10 <CustomDateFeedEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <CustomDateFeedEnumerate>d__10>(ref awaiter, ref <CustomDateFeedEnumerate>d__); return; } goto IL_00ab; case 0: awaiter = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); goto IL_00ab; case -4: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } <groupingKeysArray>5__2 = Enumerable.ToArray<string>(Enumerable.Concat<string>((global::System.Collections.Generic.IEnumerable<string>)groupingKeys, (global::System.Collections.Generic.IEnumerable<string>)new <>z__ReadOnlySingleElementList<string>("Test"))); DataFeedIndicator<string> val5 = new DataFeedIndicator<string>(); ((DataFeedItem)val5).InitBase("Test1", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test1"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val5.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = "Test1"; }, (string)null); <>2__current = (DataFeedItem)(object)val5; num = (<>1__state = -5); goto IL_0383; } case -5: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } DataFeedIndicator<string> val3 = new DataFeedIndicator<string>(); ((DataFeedItem)val3).InitBase("Test2", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test2"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val3.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = "Test2"; }, (string)null); <>2__current = (DataFeedItem)(object)val3; num = (<>1__state = -6); goto IL_0383; } case -6: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } DataFeedIndicator<string> val4 = new DataFeedIndicator<string>(); ((DataFeedItem)val4).InitBase("Test3", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test3"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val4.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = "Test3"; }, (string)null); <>2__current = (DataFeedItem)(object)val4; num = (<>1__state = -7); goto IL_0383; } case -7: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } DataFeedIndicator<string> val = new DataFeedIndicator<string>(); ((DataFeedItem)val).InitBase("Test4", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test4"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = "Test4"; }, (string)null); <>2__current = (DataFeedItem)(object)val; num = (<>1__state = -8); goto IL_0383; } case -8: { num = (<>1__state = -1); _ = <>w__disposeMode; break; } IL_00ab: ((TaskAwaiter)(ref awaiter)).GetResult(); val2 = new DataFeedGroup(); ((DataFeedItem)val2).InitBase("Test", path, groupingKeys, LocaleString.op_Implicit("Test"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); <>2__current = (DataFeedItem)(object)val2; num = (<>1__state = -4); goto IL_0383; } } catch (global::System.Exception exception) { <>1__state = -2; <groupingKeysArray>5__2 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetException(exception); return; } <>1__state = -2; <groupingKeysArray>5__2 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetResult(false); return; IL_0383: <>v__promiseOfValueOrEnd.SetResult(true); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { } [DebuggerHidden] global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>.GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken)) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) <CustomDateFeedEnumerate>d__10 <CustomDateFeedEnumerate>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = -3; <>t__builder = AsyncIteratorMethodBuilder.Create(); <>w__disposeMode = false; <CustomDateFeedEnumerate>d__ = this; } else { <CustomDateFeedEnumerate>d__ = new <CustomDateFeedEnumerate>d__10(-3); } <CustomDateFeedEnumerate>d__.path = <>3__path; <CustomDateFeedEnumerate>d__.groupingKeys = <>3__groupingKeys; return <CustomDateFeedEnumerate>d__; } [DebuggerHidden] global::System.Threading.Tasks.ValueTask<bool> global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.MoveNextAsync() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask<bool>); } <>v__promiseOfValueOrEnd.Reset(); <CustomDateFeedEnumerate>d__10 <CustomDateFeedEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<CustomDateFeedEnumerate>d__10>(ref <CustomDateFeedEnumerate>d__); short version = <>v__promiseOfValueOrEnd.Version; if ((int)<>v__promiseOfValueOrEnd.GetStatus(version) == 1) { return new global::System.Threading.Tasks.ValueTask<bool>(<>v__promiseOfValueOrEnd.GetResult(version)); } return new global::System.Threading.Tasks.ValueTask<bool>((IValueTaskSource<bool>)this, version); } [DebuggerHidden] bool IValueTaskSource<bool>.GetResult(short token) { return <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] void IValueTaskSource.GetResult(short token) { <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] global::System.Threading.Tasks.ValueTask global::System.IAsyncDisposable.DisposeAsync() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (<>1__state >= -1) { throw new NotSupportedException(); } if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask); } <>w__disposeMode = true; <>v__promiseOfValueOrEnd.Reset(); <CustomDateFeedEnumerate>d__10 <CustomDateFeedEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<CustomDateFeedEnumerate>d__10>(ref <CustomDateFeedEnumerate>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } internal static ManualLogSource Log; internal static ConfigEntry<bool> ShowHidden; internal static ConfigEntry<bool> ShowProtected; internal static ConfigEntry<dummy> TestAction; internal static ConfigEntry<string> TestProtected; internal static ConfigEntry<string> TestHidden; internal static ConfigEntry<dummy> TestCustomDataFeed; public override void Load() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Expected O, but got Unknown //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown Log = ((BasePlugin)this).Log; ShowHidden = ((BasePlugin)this).Config.Bind<bool>("General", "ShowHidden", false, new ConfigDescription("Whether to show hidden Configs", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.ResoniteModding.BepisModSettings.Configs.ShowHidden", "Settings.ResoniteModding.BepisModSettings.Configs.ShowHidden.Description") })); ShowProtected = ((BasePlugin)this).Config.Bind<bool>("General", "ShowProtected", false, "Whether to show protected Configs"); ConfigFile config = ((BasePlugin)this).Config; object[] array = new object[1]; object obj = <>c.<>9__7_0; if (obj == null) { Action val = delegate { Log.LogError((object)"OneOfThem"); }; <>c.<>9__7_0 = val; obj = (object)val; } array[0] = new ActionConfig((global::System.Delegate)obj); TestAction = config.Bind<dummy>("Tests", "TestAction", default(dummy), new ConfigDescription("TestAction", (AcceptableValueBase)null, array)); TestProtected = ((BasePlugin)this).Config.Bind<string>("Tests", "TestProtected", "AWAWAWAWA THIS IS A TEST MESSAGE", new ConfigDescription("TestProtected", (AcceptableValueBase)null, new object[1] { new ProtectedConfig() })); TestHidden = ((BasePlugin)this).Config.Bind<string>("Tests", "TestHidden", "AWAWAWAWA THIS IS A TEST MESSAGE", new ConfigDescription("TestHidden", (AcceptableValueBase)null, new object[1] { new HiddenConfig() })); TestCustomDataFeed = ((BasePlugin)this).Config.Bind<dummy>("Tests", "TestCustomDataFeed", default(dummy), new ConfigDescription("TestCustomDataFeed", (AcceptableValueBase)null, new object[1] { new CustomDataFeed(CustomDateFeedEnumerate) })); ((BasePlugin)this).HarmonyInstance.PatchAll(); object obj2 = <>c.<>9__7_1; if (obj2 == null) { Action val2 = delegate { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown FieldInfo val4 = AccessTools.Field(typeof(Settings), "_categoryInfos"); if (val4 != (FieldInfo)null && val4.GetValue((object)null) is Dictionary<string, SettingCategoryInfo> val5) { SettingCategoryInfo val6 = new SettingCategoryInfo(new Uri("https://avatars.githubusercontent.com/u/39589027?s=200&v=4.png"), 99L); val6.InitKey("BepInEx"); val5.Add(val6.Key, val6); } else { Log.LogError((object)"Failed to find _categoryInfos field in Settings."); } Engine current = Engine.Current; object obj3 = <>c.<>9__7_2; if (obj3 == null) { Action val7 = delegate { Log.LogInfo((object)"Running shutdown, saving configs..."); Log.LogDebug((object)"Saving Config for BepInEx.Core"); ConfigFile coreConfig = ConfigFile.CoreConfig; if (coreConfig != null) { coreConfig.Save(); } if (((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Count > 0) { CollectionExtensions.Do<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Values, (Action<PluginInfo>)delegate(PluginInfo x) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object instance = x.Instance; BasePlugin val8 = (BasePlugin)((instance is BasePlugin) ? instance : null); if (val8 != null) { ManualLogSource log2 = Log; bool flag2 = default(bool); BepInExDebugLogInterpolatedStringHandler val9 = new BepInExDebugLogInterpolatedStringHandler(18, 1, ref flag2); if (flag2) { ((BepInExLogInterpolatedStringHandler)val9).AppendLiteral("Saving Config for "); ((BepInExLogInterpolatedStringHandler)val9).AppendFormatted<string>(x.Metadata.GUID); } log2.LogDebug(val9); ConfigFile config2 = val8.Config; if (config2 != null) { config2.Save(); } } }); } }; <>c.<>9__7_2 = val7; obj3 = (object)val7; } current.OnShutdown += (Action)obj3; }; <>c.<>9__7_1 = val2; obj2 = (object)val2; } ResoniteHooks.OnEngineReady += (Action)obj2; ManualLogSource log = Log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val3 = new BepInExInfoLogInterpolatedStringHandler(18, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val3).AppendLiteral("Plugin "); ((BepInExLogInterpolatedStringHandler)val3).AppendFormatted<string>("ResoniteModding.BepisModSettings"); ((BepInExLogInterpolatedStringHandler)val3).AppendLiteral(" is loaded!"); } log.LogInfo(val3); } [AsyncIteratorStateMachine(typeof(<CustomDateFeedEnumerate>d__10))] private static global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> CustomDateFeedEnumerate(global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupingKeys) { return new <CustomDateFeedEnumerate>d__10(-2) { <>3__path = path, <>3__groupingKeys = groupingKeys }; } } public static class PluginMetadata { public const string GUID = "ResoniteModding.BepisModSettings"; public const string NAME = "Bepis Mod Settings"; public const string VERSION = "1.1.1"; public const string AUTHORS = "ResoniteModding"; public const string REPOSITORY_URL = "https://github.com/ResoniteModding/BepisModSettings"; } } namespace BepisModSettings.DataFeeds { public static class BepisNestedCategoryPage { [CompilerGenerated] private sealed class <Enumerate>d__0 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine { public int <>1__state; public AsyncIteratorMethodBuilder <>t__builder; public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd; private DataFeedItem <>2__current; private bool <>w__disposeMode; private int <>l__initialThreadId; private global::System.Collections.Generic.IReadOnlyList<string> path; public global::System.Collections.Generic.IReadOnlyList<string> <>3__path; private TaskAwaiter <>u__1; private global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> <>7__wrap1; private object <>7__wrap2; private int <>7__wrap3; private ValueTaskAwaiter<bool> <>u__2; private ValueTaskAwaiter <>u__3; DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Enumerate>d__0(int <>1__state) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) <>t__builder = AsyncIteratorMethodBuilder.Create(); this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } private void MoveNext() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; try { TaskAwaiter awaiter2; ValueTaskAwaiter awaiter; Dictionary<string, Func<global::System.Collections.Generic.IReadOnlyList<string>, global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>>> categoryHandlers; global::System.Collections.Generic.IReadOnlyList<string> readOnlyList; Func<global::System.Collections.Generic.IReadOnlyList<string>, global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>> val = default(Func<global::System.Collections.Generic.IReadOnlyList<string>, global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>>); DataFeedLabel val2; object obj2; switch (num) { default: if (<>w__disposeMode) { break; } num = (<>1__state = -1); <>2__current = null; awaiter2 = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter(); if (!((TaskAwaiter)(ref awaiter2)).IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter2; <Enumerate>d__0 <Enumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <Enumerate>d__0>(ref awaiter2, ref <Enumerate>d__); return; } goto IL_00a3; case 0: awaiter2 = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); goto IL_00a3; case -4: case 1: try { ValueTaskAwaiter<bool> awaiter3; if (num != -4) { if (num != 1) { goto IL_0146; } awaiter3 = <>u__2; <>u__2 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_01b0; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_0146; } goto end_IL_00fe; IL_0146: <>2__current = null; awaiter3 = <>7__wrap1.MoveNextAsync().GetAwaiter(); if (!awaiter3.IsCompleted) { num = (<>1__state = 1); <>u__2 = awaiter3; <Enumerate>d__0 <Enumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <Enumerate>d__0>(ref awaiter3, ref <Enumerate>d__); return; } goto IL_01b0; IL_01b0: if (awaiter3.GetResult()) { DataFeedItem current = <>7__wrap1.Current; <>2__current = current; num = (<>1__state = -4); goto IL_034d; } end_IL_00fe:; } catch (object obj) { <>7__wrap2 = obj; } if (<>7__wrap1 != null) { <>2__current = null; awaiter = ((global::System.IAsyncDisposable)<>7__wrap1).DisposeAsync().GetAwaiter(); if (!((ValueTaskAwaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 2); <>u__3 = awaiter; <Enumerate>d__0 <Enumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <Enumerate>d__0>(ref awaiter, ref <Enumerate>d__); return; } goto IL_023c; } goto IL_0243; case 2: awaiter = <>u__3; <>u__3 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_023c; case -5: { num = (<>1__state = -1); _ = <>w__disposeMode; break; } IL_023c: ((ValueTaskAwaiter)(ref awaiter)).GetResult(); goto IL_0243; IL_00a3: ((TaskAwaiter)(ref awaiter2)).GetResult(); categoryHandlers = BepisPluginPage.CategoryHandlers; readOnlyList = path; if (categoryHandlers.TryGetValue(readOnlyList[((global::System.Collections.Generic.IReadOnlyCollection<string>)readOnlyList).Count - 1], ref val)) { <>7__wrap1 = val.Invoke(path).GetAsyncEnumerator(default(CancellationToken)); <>7__wrap2 = null; <>7__wrap3 = 0; goto case -4; } val2 = new DataFeedLabel(); ((DataFeedItem)val2).InitBase("InvalidCategory", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Error", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); <>2__current = (DataFeedItem)(object)val2; num = (<>1__state = -5); goto IL_034d; IL_0243: obj2 = <>7__wrap2; if (obj2 != null) { ExceptionDispatchInfo.Capture((obj2 as global::System.Exception) ?? throw obj2).Throw(); } _ = <>7__wrap3; if (!<>w__disposeMode) { <>7__wrap2 = null; <>7__wrap1 = null; } break; } } catch (global::System.Exception exception) { <>1__state = -2; <>7__wrap1 = null; <>7__wrap2 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetException(exception); return; } <>1__state = -2; <>7__wrap1 = null; <>7__wrap2 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetResult(false); return; IL_034d: <>v__promiseOfValueOrEnd.SetResult(true); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { } [DebuggerHidden] global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>.GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken)) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) <Enumerate>d__0 <Enumerate>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = -3; <>t__builder = AsyncIteratorMethodBuilder.Create(); <>w__disposeMode = false; <Enumerate>d__ = this; } else { <Enumerate>d__ = new <Enumerate>d__0(-3); } <Enumerate>d__.path = <>3__path; return <Enumerate>d__; } [DebuggerHidden] global::System.Threading.Tasks.ValueTask<bool> global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.MoveNextAsync() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask<bool>); } <>v__promiseOfValueOrEnd.Reset(); <Enumerate>d__0 <Enumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<Enumerate>d__0>(ref <Enumerate>d__); short version = <>v__promiseOfValueOrEnd.Version; if ((int)<>v__promiseOfValueOrEnd.GetStatus(version) == 1) { return new global::System.Threading.Tasks.ValueTask<bool>(<>v__promiseOfValueOrEnd.GetResult(version)); } return new global::System.Threading.Tasks.ValueTask<bool>((IValueTaskSource<bool>)this, version); } [DebuggerHidden] bool IValueTaskSource<bool>.GetResult(short token) { return <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] void IValueTaskSource.GetResult(short token) { <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] global::System.Threading.Tasks.ValueTask global::System.IAsyncDisposable.DisposeAsync() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (<>1__state >= -1) { throw new NotSupportedException(); } if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask); } <>w__disposeMode = true; <>v__promiseOfValueOrEnd.Reset(); <Enumerate>d__0 <Enumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<Enumerate>d__0>(ref <Enumerate>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } [AsyncIteratorStateMachine(typeof(<Enumerate>d__0))] internal static global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> Enumerate(global::System.Collections.Generic.IReadOnlyList<string> path) { return new <Enumerate>d__0(-2) { <>3__path = path }; } } public static class BepisPluginPage { [CompilerGenerated] private sealed class <>c__DisplayClass1_0 { public string pluginId; public ModMeta metadata; public Uri uri; internal bool <Enumerate>b__2(PluginInfo x) { return x.Metadata.GUID == pluginId; } internal void <Enumerate>b__0(IField<string> field) { ((IValue<string>)(object)field).Value = metadata.ID; } internal void <Enumerate>b__3(IField<string> field) { ((IValue<string>)(object)field).Value = metadata.Author; } internal void <Enumerate>b__1(IField<string> field) { ((IValue<string>)(object)field).Value = metadata.Version; } internal void <Enumerate>b__4(SyncDelegate<Action> syncDelegate) { Slot val = ((syncDelegate != null) ? ((SyncElement)syncDelegate).Slot : null); if (val != null) { ((SyncField<Uri>)(object)((ContainerWorker<Component>)(object)val).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null).URL).Value = uri; } } } [CompilerGenerated] private sealed class <>c__DisplayClass2_0 { public ModMeta metaData; public Func<PluginInfo, bool> <>9__4; public ButtonEventHandler <>9__14; public ButtonEventHandler <>9__15; internal bool <EnumerateConfigs>b__4(PluginInfo x) { return x.Metadata.GUID == metaData.ID; } internal void <EnumerateConfigs>b__0(SyncDelegate<Action> syncDelegate) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0031: Expected O, but got Unknown Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false); if (component == null) { return; } ButtonEventHandler obj = <>9__14; if (obj == null) { ButtonEventHandler val = delegate { LoadConfigs(metaData.ID); }; ButtonEventHandler val2 = val; <>9__14 = val; obj = val2; } component.LocalPressed += obj; } internal void <EnumerateConfigs>b__14(IButton _, ButtonEventData _) { LoadConfigs(metaData.ID); } internal void <EnumerateConfigs>b__1(SyncDelegate<Action> syncDelegate) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0031: Expected O, but got Unknown Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false); if (component == null) { return; } ButtonEventHandler obj = <>9__15; if (obj == null) { ButtonEventHandler val = delegate { SaveConfigs(metaData.ID); }; ButtonEventHandler val2 = val; <>9__15 = val; obj = val2; } component.LocalPressed += obj; } internal void <EnumerateConfigs>b__15(IButton _, ButtonEventData _) { SaveConfigs(metaData.ID); } internal void <EnumerateConfigs>b__2(SyncDelegate<Action> syncDelegate) { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass2_3 CS$<>8__locals0 = new <>c__DisplayClass2_3 { CS$<>8__locals2 = this, btn = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot)?.GetComponent<Button>((Predicate<Button>)null, false) }; if (CS$<>8__locals0.btn != null) { CS$<>8__locals0.valueDriver = ((ContainerWorker<Component>)(object)((Component)CS$<>8__locals0.btn).Slot).GetComponent<ValueMultiDriver<bool>>((Predicate<ValueMultiDriver<bool>>)null, false); if (CS$<>8__locals0.valueDriver != null && ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals0.valueDriver.Drives).Count > 0) { SetColor(0, new colorX(0.36f, 0.2f, 0.23f, 1f, (ColorProfile)1)); SetColor(1, new colorX(1f, 0.46f, 0.46f, 1f, (ColorProfile)1)); SetColor(3, new colorX(0.88f, 0.88f, 0.88f, 1f, (ColorProfile)1)); } CS$<>8__locals0.btn.LocalPressed += (ButtonEventHandler)delegate(IButton b, ButtonEventData _) { ResetConfigs(b, CS$<>8__locals0.CS$<>8__locals2.metaData.ID, CS$<>8__locals0.valueDriver); }; } void SetColor(int index, colorX color) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass2_4 CS$<>8__locals1 = new <>c__DisplayClass2_4(); if (index < ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals0.valueDriver.Drives).Count) { CS$<>8__locals1.drive = ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals0.valueDriver.Drives)[index]; BooleanValueDriver<colorX> component = ((ContainerWorker<Component>)(object)((Component)CS$<>8__locals0.btn).Slot).GetComponent<BooleanValueDriver<colorX>>((Predicate<BooleanValueDriver<colorX>>)((BooleanValueDriver<colorX> x) => x.State == ((SyncRef<IField<bool>>)(object)CS$<>8__locals1.drive).Target), false); if (component != null) { ((SyncField<colorX>)(object)component.TrueValue).Value = color; } } } } } [CompilerGenerated] private sealed class <>c__DisplayClass2_1 { public ConfigEntryBase config; public string section; public global::System.Type valueType; public <>c__DisplayClass2_0 CS$<>8__locals1; public ButtonEventHandler <>9__6; internal void <EnumerateConfigs>b__5(SyncDelegate<Action> a) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0032: Expected O, but got Unknown Button componentInChildren = ((SyncElement)a).Slot.GetComponentInChildren<Button>((Predicate<Button>)null, false, false); if (componentInChildren == null) { return; } ButtonEventHandler obj = <>9__6; if (obj == null) { ButtonEventHandler val = delegate(IButton b, ButtonEventData _) { Slot obj2 = ((IComponent)b).Slot.FindParent((Predicate<Slot>)((Slot x) => x.Name == "Reset Button"), -1); Store<bool> val3 = ((obj2 != null) ? obj2.GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false) : null); if (val3 != null && ((SyncField<bool>)(object)val3.Value).Value) { ResetConfigSection(CS$<>8__locals1.metaData.ID, section); } }; ButtonEventHandler val2 = val; <>9__6 = val; obj = val2; } componentInChildren.LocalPressed += obj; } internal void <EnumerateConfigs>b__6(IButton b, ButtonEventData _) { Slot obj = ((IComponent)b).Slot.FindParent((Predicate<Slot>)((Slot x) => x.Name == "Reset Button"), -1); Store<bool> val = ((obj != null) ? obj.GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false) : null); if (val != null && ((SyncField<bool>)(object)val.Value).Value) { ResetConfigSection(CS$<>8__locals1.metaData.ID, section); } } internal global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> <EnumerateConfigs>b__13(global::System.Collections.Generic.IReadOnlyList<string> path2) { return (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)DataFeedHelpers.HandleFlagsEnumCategory.MakeGenericMethod(new global::System.Type[1] { valueType })).Invoke((object)null, new object[2] { path2, config }); } } [CompilerGenerated] private sealed class <>c__DisplayClass2_2 { public ActionConfig action; public ButtonEventHandler <>9__11; internal void <EnumerateConfigs>b__10(SyncDelegate<Action> syncDelegate) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0031: Expected O, but got Unknown Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false); if (component == null) { return; } ButtonEventHandler obj = <>9__11; if (obj == null) { ButtonEventHandler val = delegate { action.Invoke(); }; ButtonEventHandler val2 = val; <>9__11 = val; obj = val2; } component.LocalPressed += obj; } internal void <EnumerateConfigs>b__11(IButton _, ButtonEventData _) { action.Invoke(); } } [CompilerGenerated] private sealed class <>c__DisplayClass2_3 { public ValueMultiDriver<bool> valueDriver; public Button btn; public <>c__DisplayClass2_0 CS$<>8__locals2; internal void <EnumerateConfigs>b__16(IButton b, ButtonEventData _) { ResetConfigs(b, CS$<>8__locals2.metaData.ID, valueDriver); } } [CompilerGenerated] private sealed class <>c__DisplayClass2_4 { public FieldDrive<bool> drive; internal bool <EnumerateConfigs>b__18(BooleanValueDriver<colorX> x) { return x.State == ((SyncRef<IField<bool>>)(object)drive).Target; } } [CompilerGenerated] private sealed class <>c__DisplayClass8_0 { public IButton btn; public ValueMultiDriver<bool> vmd; public string pluginId; public Action <>9__1; internal void <ResetConfigs>b__1() { LocaleHelper.SetLocalized(btn.LabelTextField, "Settings.BepInEx.Plugins.ResetConfig", (string)null, (Dictionary<string, object>)null); } internal bool <ResetConfigs>b__2(PluginInfo x) { return x.Metadata.GUID == pluginId; } } [CompilerGenerated] private sealed class <>c__DisplayClass8_1 { [StructLayout(3)] private struct <<ResetConfigs>b__0>d : IAsyncStateMachine { public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; public <>c__DisplayClass8_1 <>4__this; private TaskAwaiter <>u__1; private void MoveNext() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00ba: Expected O, but got Unknown int num = <>1__state; <>c__DisplayClass8_1 <>c__DisplayClass8_ = <>4__this; try { TaskAwaiter awaiter; if (num != 0) { awaiter = global::System.Threading.Tasks.Task.Delay(2000, <>c__DisplayClass8_.token).GetAwaiter(); if (!((TaskAwaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter; ((AsyncTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <<ResetConfigs>b__0>d>(ref awaiter, ref this); return; } } else { awaiter = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); } ((TaskAwaiter)(ref awaiter)).GetResult(); if (_resetPressed) { IButton btn = <>c__DisplayClass8_.CS$<>8__locals1.btn; Action obj = <>c__DisplayClass8_.CS$<>8__locals1.<>9__1; if (obj == null) { <>c__DisplayClass8_0 cS$<>8__locals = <>c__DisplayClass8_.CS$<>8__locals1; Action val = delegate { LocaleHelper.SetLocalized(<>c__DisplayClass8_.CS$<>8__locals1.btn.LabelTextField, "Settings.BepInEx.Plugins.ResetConfig", (string)null, (Dictionary<string, object>)null); }; Action val2 = val; cS$<>8__locals.<>9__1 = val; obj = val2; } ((IComponentBase)btn).RunSynchronously(obj, false); _resetPressed = false; if (<>c__DisplayClass8_.CS$<>8__locals1.vmd != null) { ((SyncField<bool>)(object)<>c__DisplayClass8_.CS$<>8__locals1.vmd.Value).Value = _resetPressed; } } } catch (global::System.Exception exception) { <>1__state = -2; ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetException(exception); return; } <>1__state = -2; ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetResult(); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { ((AsyncTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine); } } public CancellationToken token; public <>c__DisplayClass8_0 CS$<>8__locals1; [AsyncStateMachine(typeof(<<ResetConfigs>b__0>d))] internal global::System.Threading.Tasks.Task? <ResetConfigs>b__0() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) <<ResetConfigs>b__0>d <<ResetConfigs>b__0>d = default(<<ResetConfigs>b__0>d); <<ResetConfigs>b__0>d.<>t__builder = AsyncTaskMethodBuilder.Create(); <<ResetConfigs>b__0>d.<>4__this = this; <<ResetConfigs>b__0>d.<>1__state = -1; ((AsyncTaskMethodBuilder)(ref <<ResetConfigs>b__0>d.<>t__builder)).Start<<<ResetConfigs>b__0>d>(ref <<ResetConfigs>b__0>d); return ((AsyncTaskMethodBuilder)(ref <<ResetConfigs>b__0>d.<>t__builder)).Task; } } [CompilerGenerated] private sealed class <Enumerate>d__1 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine { public int <>1__state; public AsyncIteratorMethodBuilder <>t__builder; public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd; private DataFeedItem <>2__current; private bool <>w__disposeMode; private int <>l__initialThreadId; private <>c__DisplayClass1_0 <>8__1; private global::System.Collections.Generic.IReadOnlyList<string> path; public global::System.Collections.Generic.IReadOnlyList<string> <>3__path; private string[] <metadataGroup>5__2; private TaskAwaiter <>u__1; private global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> <>7__wrap2; private object <>7__wrap3; private int <>7__wrap4; private ValueTaskAwaiter<bool> <>u__2; private ValueTaskAwaiter <>u__3; DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Enumerate>d__1(int <>1__state) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) <>t__builder = AsyncIteratorMethodBuilder.Create(); this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } private void MoveNext() { //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Expected O, but got Unknown //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_06aa: Unknown result type (might be due to invalid IL or missing references) //IL_06b1: Expected O, but got Unknown //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Expected O, but got Unknown //IL_0281: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; try { TaskAwaiter awaiter; ValueTaskAwaiter awaiter3; ConfigFile val3; global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable; DataFeedGroup val7; DataFeedIndicator<string> val8; object obj4; switch (num) { default: if (<>w__disposeMode) { break; } num = (<>1__state = -1); <>8__1 = new <>c__DisplayClass1_0(); <>2__current = null; awaiter = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter(); if (!((TaskAwaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter; <Enumerate>d__1 <Enumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <Enumerate>d__1>(ref awaiter, ref <Enumerate>d__); return; } goto IL_00c6; case 0: awaiter = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); goto IL_00c6; case -4: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto IL_048b; case -5: case 1: try { ValueTaskAwaiter<bool> awaiter2; if (num != -5) { if (num != 1) { goto IL_0347; } awaiter2 = <>u__2; <>u__2 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_03b2; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_0347; } goto end_IL_02ff; IL_0347: <>2__current = null; awaiter2 = <>7__wrap2.MoveNextAsync().GetAwaiter(); if (!awaiter2.IsCompleted) { num = (<>1__state = 1); <>u__2 = awaiter2; <Enumerate>d__1 <Enumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <Enumerate>d__1>(ref awaiter2, ref <Enumerate>d__); return; } goto IL_03b2; IL_03b2: if (awaiter2.GetResult()) { DataFeedItem current = <>7__wrap2.Current; <>2__current = current; num = (<>1__state = -5); goto IL_07a6; } end_IL_02ff:; } catch (object obj) { <>7__wrap3 = obj; } if (<>7__wrap2 != null) { <>2__current = null; awaiter3 = ((global::System.IAsyncDisposable)<>7__wrap2).DisposeAsync().GetAwaiter(); if (!((ValueTaskAwaiter)(ref awaiter3)).IsCompleted) { num = (<>1__state = 2); <>u__3 = awaiter3; <Enumerate>d__1 <Enumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <Enumerate>d__1>(ref awaiter3, ref <Enumerate>d__); return; } goto IL_043f; } goto IL_0446; case 2: awaiter3 = <>u__3; <>u__3 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_043f; case -6: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } <metadataGroup>5__2 = new string[1] { "Metadata" }; DataFeedIndicator<string> val9 = new DataFeedIndicator<string>(); ((DataFeedItem)val9).InitBase("Id", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Guid", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val9.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = <>8__1.metadata.ID; }, (string)null); <>2__current = (DataFeedItem)(object)val9; num = (<>1__state = -7); goto IL_07a6; } case -7: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } if (string.IsNullOrWhiteSpace(<>8__1.metadata.Author)) { goto IL_05f6; } DataFeedIndicator<string> val2 = new DataFeedIndicator<string>(); ((DataFeedItem)val2).InitBase("Author", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Author", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val2.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = <>8__1.metadata.Author; }, (string)null); <>2__current = (DataFeedItem)(object)val2; num = (<>1__state = -8); goto IL_07a6; } case -8: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto IL_05f6; case -9: { num = (<>1__state = -1); if (<>w__disposeMode || string.IsNullOrWhiteSpace(<>8__1.metadata.Link) || !Uri.TryCreate(<>8__1.metadata.Link, (UriKind)1, ref <>8__1.uri)) { break; } DataFeedAction val = new DataFeedAction(); ((DataFeedItem)val).InitBase("Link", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.ModPage", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val.InitAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> syncDelegate) { Slot val10 = ((syncDelegate != null) ? ((SyncElement)syncDelegate).Slot : null); if (val10 != null) { ((SyncField<Uri>)(object)((ContainerWorker<Component>)(object)val10).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null).URL).Value = <>8__1.uri; } }); <>2__current = (DataFeedItem)(object)val; num = (<>1__state = -10); goto IL_07a6; } case -10: { num = (<>1__state = -1); _ = <>w__disposeMode; break; } IL_043f: ((ValueTaskAwaiter)(ref awaiter3)).GetResult(); goto IL_0446; IL_00c6: ((TaskAwaiter)(ref awaiter)).GetResult(); <>8__1.pluginId = path[1]; if (<>8__1.pluginId == "BepInEx.Core.Config") { val3 = ConfigFile.CoreConfig; <>8__1.metadata = new ModMeta("BepInEx Core Config", ((object)Utility.BepInExVersion).ToString(), "BepInEx.Core", null, null); } else { PluginInfo obj2 = Enumerable.FirstOrDefault<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Values, (Func<PluginInfo, bool>)((PluginInfo x) => x.Metadata.GUID == <>8__1.pluginId)); object obj3 = ((obj2 != null) ? obj2.Instance : null); BasePlugin val4 = (BasePlugin)((obj3 is BasePlugin) ? obj3 : null); if (val4 == null) { <>w__disposeMode = true; break; } BepInPlugin metadata = MetadataHelper.GetMetadata((object)val4); ResonitePlugin val5 = (ResonitePlugin)(object)((metadata is ResonitePlugin) ? metadata : null); val3 = val4.Config; <>8__1.metadata = new ModMeta(metadata.Name, ((object)metadata.Version).ToString(), <>8__1.pluginId, (val5 != null) ? val5.Author : null, (val5 != null) ? val5.Link : null); } if (string.IsNullOrWhiteSpace(<>8__1.metadata.Name)) { <>8__1.metadata.Name = "<i>Unknown</i>"; } if (string.IsNullOrWhiteSpace(<>8__1.metadata.Version)) { <>8__1.metadata.Version = "<i>Unknown</i>"; } if (string.IsNullOrWhiteSpace(<>8__1.metadata.ID)) { <>8__1.metadata.ID = "<i>Unknown</i>"; } if (val3.Count == 0) { DataFeedLabel val6 = new DataFeedLabel(); ((DataFeedItem)val6).InitBase("NoConfigs", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.NoConfigs", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); <>2__current = (DataFeedItem)(object)val6; num = (<>1__state = -4); goto IL_07a6; } asyncEnumerable = EnumerateConfigs(val3, <>8__1.metadata, path); <>7__wrap2 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken)); <>7__wrap3 = null; <>7__wrap4 = 0; goto case -5; IL_048b: val7 = new DataFeedGroup(); ((DataFeedItem)val7).InitBase("Metadata", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Metadata", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); <>2__current = (DataFeedItem)(object)val7; num = (<>1__state = -6); goto IL_07a6; IL_05f6: val8 = new DataFeedIndicator<string>(); ((DataFeedItem)val8).InitBase("Version", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Version", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val8.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = <>8__1.metadata.Version; }, (string)null); <>2__current = (DataFeedItem)(object)val8; num = (<>1__state = -9); goto IL_07a6; IL_0446: obj4 = <>7__wrap3; if (obj4 != null) { ExceptionDispatchInfo.Capture((obj4 as global::System.Exception) ?? throw obj4).Throw(); } _ = <>7__wrap4; if (<>w__disposeMode) { break; } <>7__wrap3 = null; <>7__wrap2 = null; goto IL_048b; } } catch (global::System.Exception exception) { <>1__state = -2; <>8__1 = null; <metadataGroup>5__2 = null; <>7__wrap2 = null; <>7__wrap3 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetException(exception); return; } <>1__state = -2; <>8__1 = null; <metadataGroup>5__2 = null; <>7__wrap2 = null; <>7__wrap3 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetResult(false); return; IL_07a6: <>v__promiseOfValueOrEnd.SetResult(true); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { } [DebuggerHidden] global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>.GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken)) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) <Enumerate>d__1 <Enumerate>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = -3; <>t__builder = AsyncIteratorMethodBuilder.Create(); <>w__disposeMode = false; <Enumerate>d__ = this; } else { <Enumerate>d__ = new <Enumerate>d__1(-3); } <Enumerate>d__.path = <>3__path; return <Enumerate>d__; } [DebuggerHidden] global::System.Threading.Tasks.ValueTask<bool> global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.MoveNextAsync() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask<bool>); } <>v__promiseOfValueOrEnd.Reset(); <Enumerate>d__1 <Enumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<Enumerate>d__1>(ref <Enumerate>d__); short version = <>v__promiseOfValueOrEnd.Version; if ((int)<>v__promiseOfValueOrEnd.GetStatus(version) == 1) { return new global::System.Threading.Tasks.ValueTask<bool>(<>v__promiseOfValueOrEnd.GetResult(version)); } return new global::System.Threading.Tasks.ValueTask<bool>((IValueTaskSource<bool>)this, version); } [DebuggerHidden] bool IValueTaskSource<bool>.GetResult(short token) { return <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] void IValueTaskSource.GetResult(short token) { <>v__promiseOfValueOrEnd.GetResult(token); } [DebuggerHidden] ValueTaskSourceStatus IValueTaskSource.GetStatus(short token) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return <>v__promiseOfValueOrEnd.GetStatus(token); } [DebuggerHidden] void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) <>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags); } [DebuggerHidden] global::System.Threading.Tasks.ValueTask global::System.IAsyncDisposable.DisposeAsync() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (<>1__state >= -1) { throw new NotSupportedException(); } if (<>1__state == -2) { return default(global::System.Threading.Tasks.ValueTask); } <>w__disposeMode = true; <>v__promiseOfValueOrEnd.Reset(); <Enumerate>d__1 <Enumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<Enumerate>d__1>(ref <Enumerate>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } [CompilerGenerated] private sealed class <EnumerateConfigs>d__2 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine { public int <>1__state; public AsyncIteratorMethodBuilder <>t__builder; public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd; private DataFeedItem <>2__current; private bool <>w__disposeMode; private int <>l__initialThreadId; private ModMeta metaData; public ModMeta <>3__metaData; private ConfigFile configFile; public ConfigFile <>3__configFile; private <>c__DisplayClass2_0 <>8__1; private global::System.Collections.Generic.IReadOnlyList<string> path; public global::System.Collections.Generic.IReadOnlyList<string> <>3__path; private <>c__DisplayClass2_1 <>8__2; private string[] <groupKeys>5__2; private HashSet<string> <sections>5__3; private List<string> <added>5__4; private global::System.Collections.Generic.IEnumerator<ConfigEntryBase> <>7__wrap4; private string <key>5__6; private LocaleString <nameKey>5__7; private LocaleString <descKey>5__8; private string[] <groupingKeys>5__9; private DataFeedItem <dummyField>5__10; private bool <customUi>5__11; private global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> <>7__wrap11; private object <>7__wrap12; private int <>7__wrap13; private ValueTaskAwaiter<bool> <>u__1; private ValueTaskAwaiter <>u__2; DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <EnumerateConfigs>d__2(int <>1__state) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) <>t__builder = AsyncIteratorMethodBuilder.Create(); this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } private void MoveNext() { //IL_0a32: Unknown result type (might be due to invalid IL or missing references) //IL_0a35: Unknown result type (might be due to invalid IL or missing references) //IL_0b29: Unknown result type (might be due to invalid IL or missing references) //IL_0b2c: Unknown result type (might be due to invalid IL or missing references) //IL_0dda: Unknown result type (might be due to invalid IL or missing references) //IL_0ddd: Unknown result type (might be due to invalid IL or missing references) //IL_10ba: Unknown result type (might be due to invalid IL or missing references) //IL_10c6: Unknown result type (might be due to invalid IL or missing references) //IL_0b49: Unknown result type (might be due to invalid IL or missing references) //IL_0b4f: Unknown result type (might be due to invalid IL or missing references) //IL_0776: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_0c55: Unknown result type (might be due to invalid IL or missing references) //IL_0c5a: Unknown result type (might be due to invalid IL or missing references) //IL_114b: Unknown result type (might be due to invalid IL or missing references) //IL_1157: Unknown result type (might be due to invalid IL or missing references) //IL_0ff7: Unknown result type (might be due to invalid IL or missing references) //IL_0ffe: Expected O, but got Unknown //IL_1019: Unknown result type (might be due to invalid IL or missing references) //IL_1026: Unknown result type (might be due to invalid IL or missing references) //IL_0f78: Unknown result type (might be due to invalid IL or missing references) //IL_0f7e: Expected O, but got Unknown //IL_0f98: Unknown result type (might be due to invalid IL or missing references) //IL_0fa5: Unknown result type (might be due to invalid IL or missing references) //IL_0ef9: Unknown result type (might be due to invalid IL or missing references) //IL_0eff: Expected O, but got Unknown //IL_0f19: Unknown result type (might be due to invalid IL or missing references) //IL_0f26: Unknown result type (might be due to invalid IL or missing references) //IL_0790: Unknown result type (might be due to invalid IL or missing references) //IL_0792: Unknown result type (might be due to invalid IL or missing references) //IL_0c6f: Unknown result type (might be due to invalid IL or missing references) //IL_0c71: Unknown result type (might be due to invalid IL or missing references) //IL_07af: Unknown result type (might be due to invalid IL or missing references) //IL_07b4: Unknown result type (might be due to invalid IL or missing references) //IL_07bc: Unknown result type (might be due to invalid IL or missing references) //IL_0c8e: Unknown result type (might be due to invalid IL or missing references) //IL_0c93: Unknown result type (might be due to invalid IL or missing references) //IL_0c9b: Unknown result type (might be due to invalid IL or missing references) //IL_0e8f: Unknown result type (might be due to invalid IL or missing references) //IL_0e95: Expected O, but got Unknown //IL_0eaa: Unknown result type (might be due to invalid IL or missing references) //IL_0e23: Unknown result type (might be due to invalid IL or missing references) //IL_0e2f: Unknown result type (might be due to invalid IL or missing references) //IL_0bc8: Unknown result type (might be due to invalid IL or missing references) //IL_0bcd: Unknown result type (might be due to invalid IL or missing references) //IL_0c01: Unknown result type (might be due to invalid IL or missing references) //IL_0c06: Unknown result type (might be due to invalid IL or missing references) //IL_0c0e: Unknown result type (might be due to invalid IL or missing references) //IL_0be2: Unknown result type (might be due to invalid IL or missing references) //IL_0be4: Unknown result type (might be due to invalid IL or missing references) //IL_06e9: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Expected O, but got Unknown //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0849: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05b6: Expected O, but got Unknown //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_0a00: Unknown result type (might be due to invalid IL or missing references) //IL_0a07: Expected O, but got Unknown //IL_0979: Unknown result type (might be due to invalid IL or missing references) //IL_0980: Expected O, but got Unknown //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_0997: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_0da8: Unknown result type (might be due to invalid IL or missing references) //IL_0daf: Expected O, but got Unknown int num = <>1__state; try { DataFeedGroup val11; switch (num) { default: if (<>w__disposeMode) { break; } num = (<>1__state = -1); <>8__1 = new <>c__DisplayClass2_0(); <>8__1.metaData = metaData; CategoryHandlers.Clear(); if (configFile.Count > 0) { <sections>5__3 = new HashSet<string>(); <added>5__4 = new List<string>(); <>7__wrap4 = ((global::System.Collections.Generic.IEnumerable<ConfigEntryBase>)configFile.Values).GetEnumerator(); goto case -10; } goto IL_0e8f; case -10: case -9: case -8: case -7: case -6: case -5: case -4: case 0: case 1: case 2: case 3: try { ValueTaskAwaiter awaiter; string text; LocaleString val3; LocaleString val4; InternalLocale internalLocale; object obj; switch (num) { case -4: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto IL_025f; case -5: case 0: try { ValueTaskAwaiter<bool> awaiter2; if (num != -5) { if (num != 0) { goto IL_06d3; } awaiter2 = <>u__1; <>u__1 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_073e; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_06d3; } goto end_IL_068c; IL_06d3: <>2__current = null; awaiter2 = <>7__wrap11.MoveNextAsync().GetAwaiter(); if (!awaiter2.IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter2; <EnumerateConfigs>d__2 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <EnumerateConfigs>d__2>(ref awaiter2, ref <EnumerateConfigs>d__); return; } goto IL_073e; IL_073e: if (awaiter2.GetResult()) { DataFeedItem current2 = <>7__wrap11.Current; <>2__current = current2; num = (<>1__state = -5); goto IL_1198; } end_IL_068c:; } catch (object obj3) { <>7__wrap12 = obj3; } if (<>7__wrap11 != null) { <>2__current = null; awaiter = ((global::System.IAsyncDisposable)<>7__wrap11).DisposeAsync().GetAwaiter(); if (!((ValueTaskAwaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 1); <>u__2 = awaiter; <EnumerateConfigs>d__2 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <EnumerateConfigs>d__2>(ref awaiter, ref <EnumerateConfigs>d__); return; } goto IL_07cb; } goto IL_07d2; case 1: awaiter = <>u__2; <>u__2 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_07cb; case -6: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto IL_0895; case -7: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto IL_0e16; case -8: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto IL_0e16; case -9: case 2: try { ValueTaskAwaiter<bool> awaiter2; if (num != -9) { if (num != 2) { goto IL_0bb2; } awaiter2 = <>u__1; <>u__1 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_0c1d; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_0bb2; } goto end_IL_0b6a; IL_0bb2: <>2__current = null; awaiter2 = <>7__wrap11.MoveNextAsync().GetAwaiter(); if (!awaiter2.IsCompleted) { num = (<>1__state = 2); <>u__1 = awaiter2; <EnumerateConfigs>d__2 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <EnumerateConfigs>d__2>(ref awaiter2, ref <EnumerateConfigs>d__); return; } goto IL_0c1d; IL_0c1d: if (awaiter2.GetResult()) { DataFeedItem current = <>7__wrap11.Current; <>2__current = current; num = (<>1__state = -9); goto IL_1198; } end_IL_0b6a:; } catch (object obj3) { <>7__wrap12 = obj3; } if (<>7__wrap11 != null) { <>2__current = null; awaiter = ((global::System.IAsyncDisposable)<>7__wrap11).DisposeAsync().GetAwaiter(); if (!((ValueTaskAwaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 3); <>u__2 = awaiter; <EnumerateConfigs>d__2 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <EnumerateConfigs>d__2>(ref awaiter, ref <EnumerateConfigs>d__); return; } goto IL_0caa; } goto IL_0cb1; case 3: awaiter = <>u__2; <>u__2 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_0caa; case -10: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto IL_0e16; default: { while (((global::System.Collections.IEnumerator)<>7__wrap4).MoveNext()) { <>8__2 = new <>c__DisplayClass2_1(); <>8__2.CS$<>8__locals1 = <>8__1; <>8__2.config = <>7__wrap4.Current; if (!Plugin.ShowHidden.Value && Enumerable.Any<object>((global::System.Collections.Generic.IEnumerable<object>)<>8__2.config.Description.Tags, (Func<object, bool>)((object x) => x is HiddenConfig))) { continue; } <>8__2.valueType = <>8__2.config.SettingType; <>8__2.section = <>8__2.config.Definition.Section; if (!<sections>5__3.Add(<>8__2.section)) { goto IL_025f; } DataFeedResettableGroup val9 = new DataFeedResettableGroup(); ((DataFeedItem)val9).InitBase(<>8__2.section, path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleString.op_Implicit(<>8__2.section), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val9.InitResetAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> a) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0032: Expected O, but got Unknown Button componentInChildren = ((SyncElement)a).Slot.GetComponentInChildren<Button>((Predicate<Button>)null, false, false); if (componentInChildren != null) { ButtonEventHandler obj5 = <>8__2.<>9__6; if (obj5 == null) { ButtonEventHandler val14 = delegate(IButton b, ButtonEventData _) { Slot obj6 = ((IComponent)b).Slot.FindParent((Predicate<Slot>)((Slot x) => x.Name == "Reset Button"), -1); Store<bool> val16 = ((obj6 != null) ? obj6.GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false) : null); if (val16 != null && ((SyncField<bool>)(object)val16.Value).Value) { ResetConfigSection(<>8__2.CS$<>8__locals1.metaData.ID, <>8__2.section); } }; ButtonEventHandler val15 = val14; <>8__2.<>9__6 = val14; obj5 = val15; } componentInChildren.LocalPressed += obj5; } }); <>2__current = (DataFeedItem)(object)val9; num = (<>1__state = -4); goto IL_1198; } break; } IL_025f: text = <>8__2.section + "." + <>8__2.config.Definition.Key; <key>5__6 = (<added>5__4.Contains(text) ? (text + <added>5__4.Count) : text); <nameKey>5__7 = LocaleString.op_Implicit(<>8__2.config.Definition.Key); <descKey>5__8 = LocaleString.op_Implicit(<>8__2.config.Description.Description); val3 = LocaleString.op_Implicit($"{<>8__2.config.Definition.Key} : {<>8__2.valueType}"); val4 = LocaleString.op_Implicit($"{<>8__2.config.Definition.Key} : {<>8__2.config.BoxedValue}"); if (Enumerable.Any<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)LocaleLoader.PluginsWithLocales, (Func<PluginInfo, bool>)((PluginInfo x) => x.Metadata.GUID == <>8__2.CS$<>8__locals1.metaData.ID)) && Enumerable.FirstOrDefault<object>((global::System.Collections.Generic.IEnumerable<object>)<>8__2.config.Description.Tags, (Func<object, bool>)((object x) => x is ConfigLocale)) is ConfigLocale val5) { <nameKey>5__7 = val5.Name; <descKey>5__8 = val5.Description; string formattedLocaleString = LocaleLoader.GetFormattedLocaleString(val5.Name.content); val3 = LocaleString.op_Implicit($"{formattedLocaleString} : {<>8__2.valueType}"); val4 = LocaleString.op_Implicit($"{formattedLocaleString} : {<>8__2.config.BoxedValue}"); } internalLocale = new InternalLocale(<nameKey>5__7, <descKey>5__8); <added>5__4.Add(<key>5__6); <groupingKeys>5__9 = new string[1] { <>8__2.section }; if (<>8__2.valueType == typeof(dummy)) { <>c__DisplayClass2_2 CS$<>8__locals0 = new <>c__DisplayClass2_2(); <dummyField>5__10 = null; obj = Enumerable.FirstOrDefault<object>((global::System.Collections.Generic.IEnumerable<object>)<>8__2.config.Description.Tags, (Func<object, bool>)((object x) => x is ActionConfig)); CS$<>8__locals0.action = obj as ActionConfig; if (CS$<>8__locals0.action != null) { DataFeedAction val6 = new DataFeedAction(); ((DataFeedItem)val6).InitBase(<key>5__6, path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeys>5__9, <nameKey>5__7, <descKey>5__8, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val6.InitAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> syncDelegate) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0031: Expected O, but got Unknown Button component2 = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false); if (component2 != null) { ButtonEventHandler obj7 = CS$<>8__locals0.<>9__11; if (obj7 == null) { ButtonEventHandler val17 = delegate { CS$<>8__locals0.action.Invoke(); }; ButtonEventHandler val18 = val17; CS$<>8__locals0.<>9__11 = val17; obj7 = val18; } component2.LocalPressed += obj7; } }); <dummyField>5__10 = (DataFeedItem)(object)val6; } <customUi>5__11 = false; if (Enumerable.FirstOrDefault<object>((global::System.Collections.Generic.IEnumerable<object>)<>8__2.config.Description.Tags, (Func<object, bool>)((object x) => x is CustomDataFeed)) is CustomDataFeed customDataFeed) { <customUi>5__11 = true; global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable = customDataFeed.Build(path, <groupingKeys>5__9); <>7__wrap11 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken)); <>7__wrap12 = null; <>7__wrap13 = 0; goto case -5; } goto IL_0815; } if (<>8__2.valueType == typeof(bool)) { <>2__current = (DataFeedItem)(object)DataFeedHelpers.GenerateToggle(<key>5__6, path, <groupingKeys>5__9, internalLocale, <>8__2.config); num = (<>1__state = -7); } else if (<>8__2.valueType.IsEnum) { DataFeedItem val7; try { if (CustomAttributeExtensions.GetCustomAttribute<Fla