Decompiled source of RMLModSettings v1.1.0
plugins/RMLModSettings/RMLModSettings.dll
Decompiled 2 months 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.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; using System.Threading.Tasks.Sources; using BepInEx; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.NET.Common; using BepInExResoniteShim; using BepisLocaleLoader; using BepisModSettings; using BepisModSettings.DataFeeds; using BepisResoniteWrapper; using Elements.Core; using FrooxEngine; using FrooxEngine.UIX; using FrooxEngine.Weaver; using HarmonyLib; using ProtoFlux.Runtimes.Execution.Nodes.FrooxEngine.Variables; using Renderite.Shared; using ResoniteModLoader; [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("NepuShiro")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: AssemblyInformationalVersion("1.1.0+48bd8d84c6d9dc699a9b7b96a79a5ebddda757bd")] [assembly: AssemblyProduct("RML Mod Settings")] [assembly: AssemblyTitle("RMLModSettings")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/NepuShiro/RMLModSettings")] [assembly: AssemblyVersion("1.1.0.0")] [module: RefSafetyRules(11)] namespace RMLModSettings; public static class ConfigHelpers { [CompilerGenerated] private sealed class <>c__DisplayClass6_0<T> where T : unmanaged, global::System.Enum { public InternalLocale internalLocale; public ModConfigurationKey configKey; internal void <GenerateNullableEnumItemsAsyncMethod>b__0(IField<bool> field) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) FeedItemInterface componentInParents = WorldElementExtensions.FindNearestParent<Slot>((IWorldElement)(object)field, (Predicate<Slot>)null).GetComponentInParents<FeedItemInterface>((Predicate<FeedItemInterface>)null, true, false); if (componentInParents != null) { ((SyncField<string>)(object)((ContainerWorker<Component>)(object)((Component)componentInParents).Slot).AttachComponent<Comment>(true, (Action<Comment>)null).Text).Value = internalLocale.Key.content; } ((MethodBase)AccessTools.Method(typeof(ConfigHelpers), "SyncWithNullableConfigKeyHasValue", (global::System.Type[])null, (global::System.Type[])null).MakeGenericMethod(new global::System.Type[1] { configKey.ValueType() })).Invoke((object)null, new object[1] { configKey }); } } [CompilerGenerated] private sealed class <GenerateNullableEnumItemsAsyncMethod>d__6<T> : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine where T : unmanaged, global::System.Enum { 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 InternalLocale internalLocale; public InternalLocale <>3__internalLocale; private ModConfigurationKey configKey; public ModConfigurationKey <>3__configKey; private string key; public string <>3__key; private global::System.Collections.Generic.IReadOnlyList<string> path; public global::System.Collections.Generic.IReadOnlyList<string> <>3__path; private global::System.Collections.Generic.IReadOnlyList<string> groupKeys; public global::System.Collections.Generic.IReadOnlyList<string> <>3__groupKeys; private <>c__DisplayClass6_0<T> <>8__1; private string[] <nullableGroupKeys>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 <GenerateNullableEnumItemsAsyncMethod>d__6(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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; try { TaskAwaiter awaiter3; ValueTaskAwaiter awaiter; DataFeedGroup val2; switch (num) { default: if (!<>w__disposeMode) { num = (<>1__state = -1); <>8__1 = new <>c__DisplayClass6_0<T>(); <>8__1.internalLocale = internalLocale; <>8__1.configKey = configKey; <>2__current = null; awaiter3 = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter(); if (!((TaskAwaiter)(ref awaiter3)).IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter3; <GenerateNullableEnumItemsAsyncMethod>d__6<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <GenerateNullableEnumItemsAsyncMethod>d__6<T>>(ref awaiter3, ref <GenerateNullableEnumItemsAsyncMethod>d__); return; } goto IL_00d8; } goto end_IL_0007; case 0: awaiter3 = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); goto IL_00d8; case -4: num = (<>1__state = -1); if (!<>w__disposeMode) { <nullableGroupKeys>5__2 = Enumerable.ToArray<string>(Enumerable.Concat<string>((global::System.Collections.Generic.IEnumerable<string>)groupKeys, (global::System.Collections.Generic.IEnumerable<string>)new <>z__ReadOnlySingleElementList<string>(key + "..NullableGroup"))); DataFeedToggle val = new DataFeedToggle(); ((DataFeedItem)val).InitBase(key + ".HasValue", path, (global::System.Collections.Generic.IReadOnlyList<string>)<nullableGroupKeys>5__2, LocaleString.op_Implicit("?"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); ((DataFeedValueElement<bool>)(object)val).InitSetupValue((Action<IField<bool>>)delegate(IField<bool> field) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) FeedItemInterface componentInParents = WorldElementExtensions.FindNearestParent<Slot>((IWorldElement)(object)field, (Predicate<Slot>)null).GetComponentInParents<FeedItemInterface>((Predicate<FeedItemInterface>)null, true, false); if (componentInParents != null) { ((SyncField<string>)(object)((ContainerWorker<Component>)(object)((Component)componentInParents).Slot).AttachComponent<Comment>(true, (Action<Comment>)null).Text).Value = <>8__1.internalLocale.Key.content; } ((MethodBase)AccessTools.Method(typeof(ConfigHelpers), "SyncWithNullableConfigKeyHasValue", (global::System.Type[])null, (global::System.Type[])null).MakeGenericMethod(new global::System.Type[1] { <>8__1.configKey.ValueType() })).Invoke((object)null, new object[1] { <>8__1.configKey }); }); <>2__current = (DataFeedItem)(object)val; num = (<>1__state = -5); goto IL_047c; } goto end_IL_0007; case -5: num = (<>1__state = -1); if (!<>w__disposeMode) { global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable = (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)GenerateEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { typeof(T) })).Invoke((object)null, new object[3] { path, <nullableGroupKeys>5__2, <>8__1.configKey }); if (asyncEnumerable != null) { <>7__wrap2 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken)); <>7__wrap3 = null; <>7__wrap4 = 0; goto case -6; } } goto end_IL_0007; case -6: case 1: try { ValueTaskAwaiter<bool> awaiter2; if (num != -6) { if (num != 1) { goto IL_02af; } awaiter2 = <>u__2; <>u__2 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_031a; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_02af; } goto end_IL_0267; IL_02af: <>2__current = null; awaiter2 = <>7__wrap2.MoveNextAsync().GetAwaiter(); if (!awaiter2.IsCompleted) { num = (<>1__state = 1); <>u__2 = awaiter2; <GenerateNullableEnumItemsAsyncMethod>d__6<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <GenerateNullableEnumItemsAsyncMethod>d__6<T>>(ref awaiter2, ref <GenerateNullableEnumItemsAsyncMethod>d__); return; } goto IL_031a; IL_031a: if (awaiter2.GetResult()) { DataFeedItem current = <>7__wrap2.Current; <>2__current = current; num = (<>1__state = -6); goto IL_047c; } end_IL_0267:; } catch (object obj) { <>7__wrap3 = obj; } if (<>7__wrap2 == null) { break; } <>2__current = null; awaiter = ((global::System.IAsyncDisposable)<>7__wrap2).DisposeAsync().GetAwaiter(); if (!((ValueTaskAwaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 2); <>u__3 = awaiter; <GenerateNullableEnumItemsAsyncMethod>d__6<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <GenerateNullableEnumItemsAsyncMethod>d__6<T>>(ref awaiter, ref <GenerateNullableEnumItemsAsyncMethod>d__); return; } goto IL_03a7; case 2: { awaiter = <>u__3; <>u__3 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_03a7; } IL_03a7: ((ValueTaskAwaiter)(ref awaiter)).GetResult(); break; IL_00d8: ((TaskAwaiter)(ref awaiter3)).GetResult(); val2 = new DataFeedGroup(); ((DataFeedItem)val2).InitBase(key + ".NullableGroup", path, groupKeys, <>8__1.internalLocale.Key, (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_047c; } object obj2 = <>7__wrap3; if (obj2 != null) { ExceptionDispatchInfo.Capture((obj2 as global::System.Exception) ?? throw obj2).Throw(); } _ = <>7__wrap4; if (!<>w__disposeMode) { <>7__wrap3 = null; <>7__wrap2 = null; } end_IL_0007:; } catch (global::System.Exception exception) { <>1__state = -2; <>8__1 = null; <nullableGroupKeys>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; <nullableGroupKeys>5__2 = null; <>7__wrap2 = null; <>7__wrap3 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetResult(false); return; IL_047c: <>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) <GenerateNullableEnumItemsAsyncMethod>d__6<T> <GenerateNullableEnumItemsAsyncMethod>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = -3; <>t__builder = AsyncIteratorMethodBuilder.Create(); <>w__disposeMode = false; <GenerateNullableEnumItemsAsyncMethod>d__ = this; } else { <GenerateNullableEnumItemsAsyncMethod>d__ = new <GenerateNullableEnumItemsAsyncMethod>d__6<T>(-3); } <GenerateNullableEnumItemsAsyncMethod>d__.key = <>3__key; <GenerateNullableEnumItemsAsyncMethod>d__.path = <>3__path; <GenerateNullableEnumItemsAsyncMethod>d__.groupKeys = <>3__groupKeys; <GenerateNullableEnumItemsAsyncMethod>d__.internalLocale = <>3__internalLocale; <GenerateNullableEnumItemsAsyncMethod>d__.configKey = <>3__configKey; return <GenerateNullableEnumItemsAsyncMethod>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(); <GenerateNullableEnumItemsAsyncMethod>d__6<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<GenerateNullableEnumItemsAsyncMethod>d__6<T>>(ref <GenerateNullableEnumItemsAsyncMethod>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(); <GenerateNullableEnumItemsAsyncMethod>d__6<T> <GenerateNullableEnumItemsAsyncMethod>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<GenerateNullableEnumItemsAsyncMethod>d__6<T>>(ref <GenerateNullableEnumItemsAsyncMethod>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } internal static readonly MethodInfo GenerateEnumItemsAsync = AccessTools.Method(typeof(ConfigHelpers), "GenerateEnumItemsAsyncMethod", (global::System.Type[])null, (global::System.Type[])null); internal static readonly MethodInfo GenerateNullableEnumItemsAsync = AccessTools.Method(typeof(ConfigHelpers), "GenerateNullableEnumItemsAsyncMethod", (global::System.Type[])null, (global::System.Type[])null); internal static readonly MethodInfo GenerateValueField = AccessTools.Method(typeof(ConfigHelpers), "GenerateValueFieldMethod", (global::System.Type[])null, (global::System.Type[])null); public static string GetModId(this ResoniteModBase mod) { return ("rml." + mod.Author + "." + mod.Name).ToLower().Replace(" ", "."); } internal static DataFeedToggle GenerateToggle(string key, global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupKeys, InternalLocale internalLocale, ModConfiguration config, ModConfigurationKey configKey) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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_0030: 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_0051: Expected O, but got Unknown //IL_0052: Expected O, but got Unknown DataFeedToggle val = new DataFeedToggle(); ((DataFeedItem)val).InitBase(key + ".Toggle", path, groupKeys, internalLocale.Key, internalLocale.Description, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); ((DataFeedValueElement<bool>)val).InitSetupValue((Action<IField<bool>>)delegate(IField<bool> field) { field.SyncWithConfigKey<bool>(config, configKey); }); return val; } internal static DataFeedValueField<T> GenerateValueFieldMethod<T>(string key, global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupKeys, InternalLocale internalLocale, ModConfiguration config, ModConfigurationKey configKey) { //IL_0055: 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) DataFeedValueField<T> obj = new DataFeedValueField<T>(); ((DataFeedItem)obj).InitBase($"{key}.{configKey.ValueType()}", path, groupKeys, internalLocale.Key, internalLocale.Description, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); ((DataFeedValueElement<T>)(object)obj).InitSetupValue((Action<IField<T>>)delegate(IField<T> field) { field.SyncWithConfigKey<T>(config, configKey); }); DataFeedHelpers.TryInjectNewTemplateType(configKey.ValueType()); return obj; } [AsyncIteratorStateMachine(typeof(<GenerateNullableEnumItemsAsyncMethod>d__6<>))] private static global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> GenerateNullableEnumItemsAsyncMethod<T>(string key, global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupKeys, InternalLocale internalLocale, ModConfigurationKey configKey) where T : unmanaged, global::System.Enum { return new <GenerateNullableEnumItemsAsyncMethod>d__6<T>(-2) { <>3__key = key, <>3__path = path, <>3__groupKeys = groupKeys, <>3__internalLocale = internalLocale, <>3__configKey = configKey }; } private static void SyncWithConfigKey<T>(this IField<T> field, ModConfiguration config, ModConfigurationKey configKey) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown object obj; try { obj = config.GetValue(configKey); } catch { obj = default(T); } ((IValue<T>)(object)field).Value = (T)obj; ((IField)(object)field).SetupChangedHandlers(FieldChanged, configKey, new OnChangedHandler(KeyChanged)); void FieldChanged(IChangeable _) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown config.Set(configKey, (object)((IValue<T>)(object)field).Value, (string)null); ((IWorldElement)field).World.RunSynchronously((Action)delegate { object obj3; try { obj3 = config.GetValue(configKey); } catch { obj3 = default(T); } ((IValue<T>)(object)field).Value = (T)obj3; }, false, (IUpdatable)null, false); } void KeyChanged(object newValue) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown if (!object.Equals((object)((IValue<T>)(object)field).Value, newValue)) { ((IWorldElement)field).World.RunSynchronously((Action)delegate { ((IValue<T>)(object)field).Value = (T)(newValue ?? ((object)default(T))); }, false, (IUpdatable)null, false); } } } private static DataFeedEnum<T> GenerateEnumItemsAsyncMethod<T>(string key, global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupKeys, InternalLocale internalLocale, ModConfiguration config, ModConfigurationKey configKey) where T : unmanaged, global::System.Enum { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) DataFeedEnum<T> obj = new DataFeedEnum<T>(); ((DataFeedItem)obj).InitBase(key + ".Enum", path, groupKeys, internalLocale.Key, internalLocale.Description, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); ((DataFeedValueElement<T>)(object)obj).InitSetupValue((Action<IField<T>>)delegate(IField<T> field) { field.SyncWithConfigKey<T>(config, configKey); }); return obj; } private static void SyncWithNullableConfigKeyHasValue<T>(this IField<bool> field, ModConfiguration config, ModConfigurationKey configKey) where T : struct { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown object value = config.GetValue(configKey); ((IValue<bool>)(object)field).Value = ((T?)value).HasValue; ((IField)(object)field).SetupChangedHandlers(FieldChanged, configKey, new OnChangedHandler(KeyChanged)); void FieldChanged(IChangeable _) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown T? val = (((IValue<bool>)(object)field).Value ? new T?(default(T)) : null); if (((IValue<bool>)(object)field).Value == ((T?)value).HasValue) { config.Set(configKey, (object)val, (string)null); } else { ((IWorldElement)field).World.RunSynchronously((Action)delegate { field.SetWithoutChangedHandler(((T?)value).HasValue, FieldChanged); }, false, (IUpdatable)null, false); } } void KeyChanged(object newValue) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown if (((IValue<bool>)(object)field).Value != ((T?)newValue).HasValue) { ((IWorldElement)field).World.RunSynchronously((Action)delegate { field.SetWithoutChangedHandler(((T?)newValue).HasValue, FieldChanged); }, false, (IUpdatable)null, false); } } } private static void SetWithoutChangedHandler<T>(this IField<T> field, T value, Action<IChangeable> changedHandler) { ((IChangeable)field).Changed -= changedHandler; ((IValue<T>)(object)field).Value = value; ((IChangeable)field).Changed += changedHandler; } private static void SetupChangedHandlers(this IField field, Action<IChangeable> fieldChangedHandler, ModConfigurationKey configKey, OnChangedHandler keyChangedHandler) { Component parent = WorldElementExtensions.FindNearestParent<Component>((IWorldElement)(object)field, (Predicate<Component>)null); ((IChangeable)field).Changed += fieldChangedHandler; configKey.OnChanged += keyChangedHandler; ((ComponentBase<Component>)(object)parent).Destroyed += ParentDestroyedHandler; void ParentDestroyedHandler(IDestroyable _) { ((ComponentBase<Component>)(object)parent).Destroyed -= ParentDestroyedHandler; configKey.OnChanged -= keyChangedHandler; ((IChangeable)field).Changed -= fieldChangedHandler; } } public static bool IsEmpty(ModConfiguration config) { if (config != null && ((global::System.Collections.Generic.ICollection<ModConfigurationKey>)config.ConfigurationItemDefinitions).Count != 0) { return Enumerable.All<ModConfigurationKey>((global::System.Collections.Generic.IEnumerable<ModConfigurationKey>)config.ConfigurationItemDefinitions, (Func<ModConfigurationKey, bool>)((ModConfigurationKey configIn) => !Plugin.ShowHidden.Value && configIn.InternalAccessOnly)); } return true; } } [ResonitePlugin("NepuShiro.RMLModSettings", "RML Mod Settings", "1.1.0", "NepuShiro", "https://github.com/NepuShiro/RMLModSettings")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BasePlugin { [HarmonyPatch(typeof(AssemblyPostProcessor))] private class AssemblyPostProcessorPatch { private static MethodBase TargetMethod() { return (MethodBase)(object)AccessTools.Method(typeof(AssemblyPostProcessor), "Process", new global::System.Type[3] { typeof(string), typeof(string).MakeByRefType(), typeof(string) }, (global::System.Type[])null); } private static global::System.Exception Finalizer(global::System.Exception __exception) { IOException val = (IOException)(object)((__exception is IOException) ? __exception : null); if (val != null && ((global::System.Exception)(object)val).Message.Contains("ResoniteModLoader.dll") && ((global::System.Exception)(object)val).Message.Contains("being used by another process")) { Log.LogError((object)("Suppressed IOException: " + ((global::System.Exception)(object)val).Message)); return null; } return __exception; } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Assembly, bool> <>9__1_1; public static Action <>9__1_0; public static Comparison<ResoniteModBase> <>9__3_0; public static Predicate<Slot> <>9__6_4; internal void <Load>b__1_0() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown if (Enumerable.Any<Assembly>((global::System.Collections.Generic.IEnumerable<Assembly>)AppDomain.CurrentDomain.GetAssemblies(), (Func<Assembly, bool>)((Assembly assembly) => assembly.GetName().Name?.Contains("ResoniteModLoader") ?? false))) { BepisPluginsPage.CustomPluginsPages += RmlSettingsEnumerate; BepisConfigsPage.CustomPluginConfigsPages += RmlSettingsConfigsEnumerate; ManualLogSource log = Log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(24, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("NepuShiro.RMLModSettings"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" is fully loaded!"); } log.LogInfo(val); } else { Log.LogFatal((object)"ResoniteModLoader is not loaded! You cannot use this plugin without it."); } } internal bool <Load>b__1_1(Assembly assembly) { return assembly.GetName().Name?.Contains("ResoniteModLoader") ?? false; } internal int <RmlSettingsEnumerate>b__3_0(ResoniteModBase a, ResoniteModBase b) { return string.Compare(a.Name, b.Name, (StringComparison)5); } internal bool <EnumerateConfigs>b__6_4(Slot x) { return x.Name == "Reset Button"; } } [CompilerGenerated] private sealed class <>c__DisplayClass10_0 { public IButton btn; public ValueMultiDriver<bool> vmd; public string modId; public Action <>9__2; internal void <ResetConfigs>b__2() { LocaleHelper.SetLocalized(btn.LabelTextField, "Settings.RML.Mods.ResetConfig", (string)null, (Dictionary<string, object>)null); } internal bool <ResetConfigs>b__0(ResoniteModBase mod) { return mod.GetModId() == modId; } } [CompilerGenerated] private sealed class <>c__DisplayClass10_1 { [StructLayout(3)] private struct <<ResetConfigs>b__1>d : IAsyncStateMachine { public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; public <>c__DisplayClass10_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__DisplayClass10_1 <>c__DisplayClass10_ = <>4__this; try { TaskAwaiter awaiter; if (num != 0) { awaiter = global::System.Threading.Tasks.Task.Delay(2000, <>c__DisplayClass10_.token).GetAwaiter(); if (!((TaskAwaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter; ((AsyncTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <<ResetConfigs>b__1>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__DisplayClass10_.CS$<>8__locals1.btn; Action obj = <>c__DisplayClass10_.CS$<>8__locals1.<>9__2; if (obj == null) { <>c__DisplayClass10_0 cS$<>8__locals = <>c__DisplayClass10_.CS$<>8__locals1; Action val = delegate { LocaleHelper.SetLocalized(<>c__DisplayClass10_.CS$<>8__locals1.btn.LabelTextField, "Settings.RML.Mods.ResetConfig", (string)null, (Dictionary<string, object>)null); }; Action val2 = val; cS$<>8__locals.<>9__2 = val; obj = val2; } ((IComponentBase)btn).RunSynchronously(obj, false); _resetPressed = false; if (<>c__DisplayClass10_.CS$<>8__locals1.vmd != null) { ((SyncField<bool>)(object)<>c__DisplayClass10_.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__DisplayClass10_0 CS$<>8__locals1; [AsyncStateMachine(typeof(<<ResetConfigs>b__1>d))] internal global::System.Threading.Tasks.Task? <ResetConfigs>b__1() { //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__1>d <<ResetConfigs>b__1>d = default(<<ResetConfigs>b__1>d); <<ResetConfigs>b__1>d.<>t__builder = AsyncTaskMethodBuilder.Create(); <<ResetConfigs>b__1>d.<>4__this = this; <<ResetConfigs>b__1>d.<>1__state = -1; ((AsyncTaskMethodBuilder)(ref <<ResetConfigs>b__1>d.<>t__builder)).Start<<<ResetConfigs>b__1>d>(ref <<ResetConfigs>b__1>d); return ((AsyncTaskMethodBuilder)(ref <<ResetConfigs>b__1>d.<>t__builder)).Task; } } [CompilerGenerated] private sealed class <>c__DisplayClass5_0 { public string modId; public ResoniteModBase mod; public Uri uri; internal bool <RmlSettingsConfigsEnumerate>b__0(ResoniteModBase mod) { return mod.GetModId() == modId; } internal void <RmlSettingsConfigsEnumerate>b__1(IField<string> field) { ((IValue<string>)(object)field).Value = modId; } internal void <RmlSettingsConfigsEnumerate>b__3(IField<string> field) { ((IValue<string>)(object)field).Value = mod.Author; } internal void <RmlSettingsConfigsEnumerate>b__2(IField<string> field) { ((IValue<string>)(object)field).Value = mod.Version; } internal void <RmlSettingsConfigsEnumerate>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__DisplayClass6_0 { public string modId; public ButtonEventHandler <>9__3; public ButtonEventHandler <>9__5; internal void <EnumerateConfigs>b__0(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__3; 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(modId, "Configs"); } }; ButtonEventHandler val2 = val; <>9__3 = val; obj = val2; } componentInChildren.LocalPressed += obj; } internal void <EnumerateConfigs>b__3(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(modId, "Configs"); } } 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__5; if (obj == null) { ButtonEventHandler val = delegate { SaveConfigs(modId); }; ButtonEventHandler val2 = val; <>9__5 = val; obj = val2; } component.LocalPressed += obj; } internal void <EnumerateConfigs>b__5(IButton _, ButtonEventData _) { SaveConfigs(modId); } 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__DisplayClass6_1 CS$<>8__locals0 = new <>c__DisplayClass6_1 { CS$<>8__locals1 = 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__locals1.modId, 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__DisplayClass6_2 CS$<>8__locals1 = new <>c__DisplayClass6_2(); 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__DisplayClass6_1 { public ValueMultiDriver<bool> valueDriver; public Button btn; public <>c__DisplayClass6_0 CS$<>8__locals1; internal void <EnumerateConfigs>b__6(IButton b, ButtonEventData _) { ResetConfigs(b, CS$<>8__locals1.modId, valueDriver); } } [CompilerGenerated] private sealed class <>c__DisplayClass6_2 { public FieldDrive<bool> drive; internal bool <EnumerateConfigs>b__8(BooleanValueDriver<colorX> x) { return x.State == ((SyncRef<IField<bool>>)(object)drive).Target; } } [CompilerGenerated] private sealed class <EnumerateConfigs>d__6 : 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 ModConfiguration modConfig; public ModConfiguration <>3__modConfig; private <>c__DisplayClass6_0 <>8__1; private List<string> <added>5__2; private string[] <groupKeys>5__3; private global::System.Collections.Generic.IEnumerator<ModConfigurationKey> <>7__wrap3; private global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> <>7__wrap4; private object <>7__wrap5; private int <>7__wrap6; 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__6(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_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_080d: Unknown result type (might be due to invalid IL or missing references) //IL_0814: Expected O, but got Unknown //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_083c: Unknown result type (might be due to invalid IL or missing references) //IL_078e: Unknown result type (might be due to invalid IL or missing references) //IL_0794: Expected O, but got Unknown //IL_07ae: Unknown result type (might be due to invalid IL or missing references) //IL_07bb: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: 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_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_05de: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Expected O, but got Unknown //IL_073f: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Expected O, but got Unknown //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Expected O, but got Unknown //IL_0684: Unknown result type (might be due to invalid IL or missing references) //IL_068b: Expected O, but got Unknown int num = <>1__state; try { switch (num) { default: { if (<>w__disposeMode) { break; } num = (<>1__state = -1); <>8__1 = new <>c__DisplayClass6_0(); <>8__1.modId = path[1]; DataFeedResettableGroup val2 = new DataFeedResettableGroup(); ((DataFeedItem)val2).InitBase("Configs", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleString.op_Implicit("Configs"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); val2.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__1.<>9__3; 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__1.modId, "Configs"); } }; ButtonEventHandler val15 = val14; <>8__1.<>9__3 = val14; obj5 = val15; } componentInChildren.LocalPressed += obj5; } }); <>2__current = (DataFeedItem)(object)val2; num = (<>1__state = -4); goto IL_0932; } case -4: num = (<>1__state = -1); if (<>w__disposeMode) { break; } <added>5__2 = new List<string>(); <>7__wrap3 = ((global::System.Collections.Generic.IEnumerable<ModConfigurationKey>)modConfig.ConfigurationItemDefinitions).GetEnumerator(); goto case -9; case -9: case -8: case -7: case -6: case -5: case 0: case 1: { try { ValueTaskAwaiter awaiter; object obj3; switch (num) { case -5: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto default; case -6: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto default; case -7: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto default; case -8: case 0: try { ValueTaskAwaiter<bool> awaiter2; if (num != -8) { if (num != 0) { goto IL_04f5; } awaiter2 = <>u__1; <>u__1 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_0560; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_04f5; } goto end_IL_04ae; IL_04f5: <>2__current = null; awaiter2 = <>7__wrap4.MoveNextAsync().GetAwaiter(); if (!awaiter2.IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter2; <EnumerateConfigs>d__6 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <EnumerateConfigs>d__6>(ref awaiter2, ref <EnumerateConfigs>d__); return; } goto IL_0560; IL_0560: if (awaiter2.GetResult()) { DataFeedItem current2 = <>7__wrap4.Current; <>2__current = current2; num = (<>1__state = -8); goto IL_0932; } end_IL_04ae:; } catch (object obj2) { <>7__wrap5 = obj2; } if (<>7__wrap4 != null) { <>2__current = null; awaiter = ((global::System.IAsyncDisposable)<>7__wrap4).DisposeAsync().GetAwaiter(); if (!((ValueTaskAwaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 1); <>u__2 = awaiter; <EnumerateConfigs>d__6 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <EnumerateConfigs>d__6>(ref awaiter, ref <EnumerateConfigs>d__); return; } goto IL_05ed; } goto IL_05f4; case 1: awaiter = <>u__2; <>u__2 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_05ed; case -9: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto default; default: { while (((global::System.Collections.IEnumerator)<>7__wrap3).MoveNext()) { ModConfigurationKey current = <>7__wrap3.Current; bool internalAccessOnly = current.InternalAccessOnly; if (!Plugin.ShowHidden.Value && internalAccessOnly) { continue; } global::System.Type type = current.ValueType(); string text = "Configs." + current.Name; string text2 = (<added>5__2.Contains(text) ? (text + <added>5__2.Count) : text); <added>5__2.Add(text2); LocaleString val4 = LocaleString.op_Implicit(internalAccessOnly ? ("<color=hero.yellow>" + current.Name + "</color>") : current.Name); LocaleString val5 = LocaleString.op_Implicit(current.Description); LocaleString val6 = LocaleString.op_Implicit($"{current.Name} : {type}"); if (internalAccessOnly) { val4 = ((LocaleString)(ref val4)).SetFormat("<color=hero.yellow>{0}</color>"); } InternalLocale val7 = new InternalLocale(val4, val5); string[] array = new string[1] { "Configs" }; if (type == typeof(dummy)) { DataFeedItem val8 = (DataFeedItem)(object)new DataFeedValueField<dummy>(); val8.InitBase(text2, path, (global::System.Collections.Generic.IReadOnlyList<string>)array, val7.Key, val7.Description, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); <>2__current = val8; num = (<>1__state = -5); } else if (type == typeof(bool)) { <>2__current = (DataFeedItem)(object)ConfigHelpers.GenerateToggle(text2, path, array, val7, modConfig, current); num = (<>1__state = -6); } else if (type.IsEnum) { DataFeedItem val9; try { val9 = (DataFeedItem)((MethodBase)ConfigHelpers.GenerateEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { type })).Invoke((object)null, new object[6] { text2, path, array, val7, modConfig, current }); } catch (global::System.Exception ex) { Log.LogError((object)ex); val9 = (DataFeedItem)(object)new DataFeedValueField<dummy>(); val9.InitBase(text2, path, (global::System.Collections.Generic.IReadOnlyList<string>)array, val6, val5, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); } <>2__current = val9; num = (<>1__state = -7); } else { if (ReflectionExtensions.IsNullable(type)) { global::System.Type type2 = type.GetGenericArguments()[0]; if (!type2.IsEnum) { continue; } global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable; try { asyncEnumerable = (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)ConfigHelpers.GenerateNullableEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { type2 })).Invoke((object)null, new object[4] { text2, path, array, current }); } catch (global::System.Exception ex2) { Log.LogError((object)ex2); DataFeedValueField<dummy> obj = new DataFeedValueField<dummy>(); ((DataFeedItem)obj).InitBase(text2, path, (global::System.Collections.Generic.IReadOnlyList<string>)array, val6, val5, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); asyncEnumerable = DataFeedHelpers.AsAsyncEnumerable((DataFeedItem)(object)obj); } <>7__wrap4 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken)); <>7__wrap5 = null; <>7__wrap6 = 0; goto case -8; } DataFeedItem val10; try { val10 = (DataFeedItem)((MethodBase)ConfigHelpers.GenerateValueField.MakeGenericMethod(new global::System.Type[1] { type })).Invoke((object)null, new object[6] { text2, path, array, val7, modConfig, current }); } catch (global::System.Exception ex3) { Log.LogError((object)ex3); val10 = (DataFeedItem)(object)new DataFeedValueField<dummy>(); val10.InitBase(text2, path, (global::System.Collections.Generic.IReadOnlyList<string>)array, val6, val5, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); } <>2__current = val10; num = (<>1__state = -9); } goto IL_0932; } break; } IL_05f4: obj3 = <>7__wrap5; if (obj3 != null) { ExceptionDispatchInfo.Capture((obj3 as global::System.Exception) ?? throw obj3).Throw(); } _ = <>7__wrap6; if (!<>w__disposeMode) { <>7__wrap5 = null; <>7__wrap4 = null; goto default; } break; IL_05ed: ((ValueTaskAwaiter)(ref awaiter)).GetResult(); goto IL_05f4; } } finally { if (num == -1 && <>7__wrap3 != null) { ((global::System.IDisposable)<>7__wrap3).Dispose(); } } if (<>w__disposeMode) { break; } <>7__wrap3 = null; DataFeedGroup val11 = new DataFeedGroup(); ((DataFeedItem)val11).InitBase("ActionsGroup", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.RML.Mods.Actions", (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)val11; num = (<>1__state = -10); goto IL_0932; } case -10: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } <groupKeys>5__3 = new string[1] { "ActionsGroup" }; DataFeedAction val3 = new DataFeedAction(); ((DataFeedItem)val3).InitBase("SaveConfig", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupKeys>5__3, LocaleHelper.AsLocaleKey("Settings.RML.Mods.SaveConfig", (string)null, true, (Dictionary<string, object>)null), LocaleHelper.AsLocaleKey("Settings.RML.Mods.SaveConfig.Description", (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); val3.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 component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false); if (component != null) { ButtonEventHandler obj4 = <>8__1.<>9__5; if (obj4 == null) { ButtonEventHandler val12 = delegate { SaveConfigs(<>8__1.modId); }; ButtonEventHandler val13 = val12; <>8__1.<>9__5 = val12; obj4 = val13; } component.LocalPressed += obj4; } }); <>2__current = (DataFeedItem)(object)val3; num = (<>1__state = -11); goto IL_0932; } case -11: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } DataFeedAction val = new DataFeedAction(); ((DataFeedItem)val).InitBase("ResetConfig", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupKeys>5__3, LocaleHelper.AsLocaleKey("Settings.RML.Mods.ResetConfig", (string)null, true, (Dictionary<string, object>)null), LocaleHelper.AsLocaleKey("Settings.RML.Mods.ResetConfig.Description", (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) { //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__DisplayClass6_1 CS$<>8__locals0 = new <>c__DisplayClass6_1 { CS$<>8__locals1 = <>8__1, 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__locals1.modId, 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__DisplayClass6_2 CS$<>8__locals1 = new <>c__DisplayClass6_2(); 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> component2 = ((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 (component2 != null) { ((SyncField<colorX>)(object)component2.TrueValue).Value = color; } } } }); <>2__current = (DataFeedItem)(object)val; num = (<>1__state = -12); goto IL_0932; } case -12: num = (<>1__state = -1); _ = <>w__disposeMode; break; } } catch (global::System.Exception exception) { <>1__state = -2; <>8__1 = null; <added>5__2 = null; <groupKeys>5__3 = null; <>7__wrap3 = null; <>7__wrap4 = null; <>7__wrap5 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetException(exception); return; } <>1__state = -2; <>8__1 = null; <added>5__2 = null; <groupKeys>5__3 = null; <>7__wrap3 = null; <>7__wrap4 = null; <>7__wrap5 = null; <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetResult(false); return; IL_0932: <>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) <EnumerateConfigs>d__6 <EnumerateConfigs>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = -3; <>t__builder = AsyncIteratorMethodBuilder.Create(); <>w__disposeMode = false; <EnumerateConfigs>d__ = this; } else { <EnumerateConfigs>d__ = new <EnumerateConfigs>d__6(-3); } <EnumerateConfigs>d__.modConfig = <>3__modConfig; <EnumerateConfigs>d__.path = <>3__path; return <EnumerateConfigs>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(); <EnumerateConfigs>d__6 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<EnumerateConfigs>d__6>(ref <EnumerateConfigs>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(); <EnumerateConfigs>d__6 <EnumerateConfigs>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<EnumerateConfigs>d__6>(ref <EnumerateConfigs>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } [CompilerGenerated] private sealed class <RmlSettingsConfigsEnumerate>d__5 : 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__DisplayClass5_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 <RmlSettingsConfigsEnumerate>d__5(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_02f0: 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_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Expected O, but got Unknown //IL_0373: 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_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_046e: 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_0577: Unknown result type (might be due to invalid IL or missing references) //IL_057e: Expected O, but got Unknown //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; try { TaskAwaiter awaiter; ValueTaskAwaiter awaiter3; object obj; DataFeedGroup val2; ModConfiguration configuration; global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable; DataFeedIndicator<string> val5; switch (num) { default: if (<>w__disposeMode) { break; } num = (<>1__state = -1); <>8__1 = new <>c__DisplayClass5_0(); <>2__current = null; awaiter = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter(); if (!((TaskAwaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter; <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <RmlSettingsConfigsEnumerate>d__5>(ref awaiter, ref <RmlSettingsConfigsEnumerate>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_0358; case -5: case 1: try { ValueTaskAwaiter<bool> awaiter2; if (num != -5) { if (num != 1) { goto IL_0214; } awaiter2 = <>u__2; <>u__2 = default(ValueTaskAwaiter<bool>); num = (<>1__state = -1); goto IL_027f; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_0214; } goto end_IL_01cc; IL_0214: <>2__current = null; awaiter2 = <>7__wrap2.MoveNextAsync().GetAwaiter(); if (!awaiter2.IsCompleted) { num = (<>1__state = 1); <>u__2 = awaiter2; <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <RmlSettingsConfigsEnumerate>d__5>(ref awaiter2, ref <RmlSettingsConfigsEnumerate>d__); return; } goto IL_027f; IL_027f: if (awaiter2.GetResult()) { DataFeedItem current = <>7__wrap2.Current; <>2__current = current; num = (<>1__state = -5); goto IL_0673; } end_IL_01cc:; } catch (object obj2) { <>7__wrap3 = obj2; } 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; <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <RmlSettingsConfigsEnumerate>d__5>(ref awaiter3, ref <RmlSettingsConfigsEnumerate>d__); return; } goto IL_030c; } goto IL_0313; case 2: awaiter3 = <>u__3; <>u__3 = default(ValueTaskAwaiter); num = (<>1__state = -1); goto IL_030c; case -6: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } <metadataGroup>5__2 = new string[1] { "Metadata" }; DataFeedIndicator<string> val6 = new DataFeedIndicator<string>(); ((DataFeedItem)val6).InitBase("Id", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.RML.Mods.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); val6.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = <>8__1.modId; }, (string)null); <>2__current = (DataFeedItem)(object)val6; num = (<>1__state = -7); goto IL_0673; } case -7: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } if (string.IsNullOrWhiteSpace(<>8__1.mod.Author)) { goto IL_04c3; } DataFeedIndicator<string> val3 = new DataFeedIndicator<string>(); ((DataFeedItem)val3).InitBase("Author", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.RML.Mods.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); val3.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = <>8__1.mod.Author; }, (string)null); <>2__current = (DataFeedItem)(object)val3; num = (<>1__state = -8); goto IL_0673; } case -8: num = (<>1__state = -1); if (<>w__disposeMode) { break; } goto IL_04c3; case -9: { num = (<>1__state = -1); if (<>w__disposeMode || string.IsNullOrWhiteSpace(<>8__1.mod.Link) || !Uri.TryCreate(<>8__1.mod.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.RML.Mods.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 val7 = ((syncDelegate != null) ? ((SyncElement)syncDelegate).Slot : null); if (val7 != null) { ((SyncField<Uri>)(object)((ContainerWorker<Component>)(object)val7).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null).URL).Value = <>8__1.uri; } }); <>2__current = (DataFeedItem)(object)val; num = (<>1__state = -10); goto IL_0673; } case -10: { num = (<>1__state = -1); _ = <>w__disposeMode; break; } IL_0313: obj = <>7__wrap3; if (obj != null) { ExceptionDispatchInfo.Capture((obj as global::System.Exception) ?? throw obj).Throw(); } _ = <>7__wrap4; if (<>w__disposeMode) { break; } <>7__wrap3 = null; <>7__wrap2 = null; goto IL_0358; IL_0358: val2 = new DataFeedGroup(); ((DataFeedItem)val2).InitBase("Metadata", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.RML.Mods.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)val2; num = (<>1__state = -6); goto IL_0673; IL_00c6: ((TaskAwaiter)(ref awaiter)).GetResult(); <>8__1.modId = path[1]; <>8__1.mod = Enumerable.FirstOrDefault<ResoniteModBase>(ModLoader.Mods(), (Func<ResoniteModBase, bool>)((ResoniteModBase mod) => mod.GetModId() == <>8__1.modId)); if (<>8__1.mod == null) { <>w__disposeMode = true; break; } configuration = <>8__1.mod.GetConfiguration(); if (ConfigHelpers.IsEmpty(configuration)) { DataFeedLabel val4 = new DataFeedLabel(); ((DataFeedItem)val4).InitBase("NoConfigs", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.RML.Mods.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)val4; num = (<>1__state = -4); goto IL_0673; } asyncEnumerable = EnumerateConfigs(configuration, path); <>7__wrap2 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken)); <>7__wrap3 = null; <>7__wrap4 = 0; goto case -5; IL_04c3: val5 = new DataFeedIndicator<string>(); ((DataFeedItem)val5).InitBase("Version", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.RML.Mods.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); val5.InitSetupValue((Action<IField<string>>)delegate(IField<string> field) { ((IValue<string>)(object)field).Value = <>8__1.mod.Version; }, (string)null); <>2__current = (DataFeedItem)(object)val5; num = (<>1__state = -9); goto IL_0673; IL_030c: ((ValueTaskAwaiter)(ref awaiter3)).GetResult(); goto IL_0313; } } 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_0673: <>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) <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = -3; <>t__builder = AsyncIteratorMethodBuilder.Create(); <>w__disposeMode = false; <RmlSettingsConfigsEnumerate>d__ = this; } else { <RmlSettingsConfigsEnumerate>d__ = new <RmlSettingsConfigsEnumerate>d__5(-3); } <RmlSettingsConfigsEnumerate>d__.path = <>3__path; return <RmlSettingsConfigsEnumerate>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(); <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<RmlSettingsConfigsEnumerate>d__5>(ref <RmlSettingsConfigsEnumerate>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(); <RmlSettingsConfigsEnumerate>d__5 <RmlSettingsConfigsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<RmlSettingsConfigsEnumerate>d__5>(ref <RmlSettingsConfigsEnumerate>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } [CompilerGenerated] private sealed class <RmlSettingsEnumerate>d__3 : 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 string[] <loadedModsGroup>5__2; private TaskAwaiter <>u__1; private Enumerator<ResoniteModBase> <>7__wrap2; DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <RmlSettingsEnumerate>d__3(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_0459: Unknown result type (might be due to invalid IL or missing references) //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_0495: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_012c: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Expected O, but got Unknown //IL_040a: 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) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; try { TaskAwaiter awaiter; DataFeedGroup val6; 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; <RmlSettingsEnumerate>d__3 <RmlSettingsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <RmlSettingsEnumerate>d__3>(ref awaiter, ref <RmlSettingsEnumerate>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; } DataFeedGrid val7 = new DataFeedGrid(); ((DataFeedItem)val7).InitBase("ModsGrid", path, (global::System.Collections.Generic.IReadOnlyList<string>)new <>z__ReadOnlySingleElementList<string>("RMLSettingsGroup"), LocaleHelper.AsLocaleKey("Settings.RML.LoadedMods", (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 = -5); goto IL_04ba; } case -5: { num = (<>1__state = -1); if (<>w__disposeMode) { break; } <loadedModsGroup>5__2 = new string[2] { "RMLSettingsGroup", "ModsGrid" }; List<ResoniteModBase> val = new List<ResoniteModBase>(ModLoader.Mods()); if (val.Count > 0) { List<ResoniteModBase> obj = new List<ResoniteModBase>((global::System.Collections.Generic.IEnumerable<ResoniteModBase>)val); obj.Sort((Comparison<ResoniteModBase>)((ResoniteModBase a, ResoniteModBase b) => string.Compare(a.Name, b.Name, (StringComparison)5))); List<ResoniteModBase> val2 = Enumerable.ToList<ResoniteModBase>(FilterMods(obj, BepisPluginsPage.SearchString)); if (val2.Count > 0) { <>7__wrap2 = val2.GetEnumerator(); goto case -6; } if (!string.IsNullOrEmpty(BepisPluginsPage.SearchString)) { DataFeedLabel val3 = new DataFeedLabel(); ((DataFeedItem)val3).InitBase("NoSearchResults", path, (global::System.Collections.Generic.IReadOnlyList<string>)<loadedModsGroup>5__2, LocaleHelper.AsLocaleKey("Settings.RML.Mods.NoSearchResults", (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)val3; num = (<>1__state = -7); goto IL_04ba; } } DataFeedLabel val4 = new DataFeedLabel(); ((DataFeedItem)val4).InitBase("NoMods", path, (global::System.Collections.Generic.IReadOnlyList<string>)<loadedModsGroup>5__2, LocaleHelper.AsLocaleKey("Settings.RML.Mods.NoMods", (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)val4; num = (<>1__state = -8); goto IL_04ba; } case -6: try { if (num != -6) { goto IL_0325; } num = (<>1__state = -1); if (!<>w__disposeMode) { goto IL_0325; } goto end_IL_01f1; IL_0325: if (<>7__wrap2.MoveNext()) { ResoniteModBase current = <>7__wrap2.Current; bool num2 = ConfigHelpers.IsEmpty(current.GetConfiguration()); string text = (num2 ? ("<color=#a8a8a8>" + current.Name + "</color>") : current.Name); string modId = current.GetModId(); LocaleLoader.AddLocaleString("Settings." + modId + ".Breadcrumb", text, false, "NepuShiro"); DataFeedCategory val5 = new DataFeedCategory(); ((DataFeedItem)val5).InitBase(modId, path, (global::System.Collections.Generic.IReadOnlyList<string>)<loadedModsGroup>5__2, LocaleString.op_Implicit(text), LocaleString.op_Implicit($"{text} ({current.Version})\nby \"{current.Author}\"\n\n{modId}"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null); if (num2) { ((DataFeedItem)val5).InitSorting(1L); } <>2__current = (DataFeedItem)(object)val5; num = (<>1__state = -6); goto IL_04ba; } end_IL_01f1:; } finally { if (num == -1) { ((global::System.IDisposable)<>7__wrap2).Dispose(); } } if (!<>w__disposeMode) { <>7__wrap2 = default(Enumerator<ResoniteModBase>); <>w__disposeMode = true; } break; case -7: num = (<>1__state = -1); if (!<>w__disposeMode) { <>w__disposeMode = true; } break; case -8: { num = (<>1__state = -1); _ = <>w__disposeMode; break; } IL_00ab: ((TaskAwaiter)(ref awaiter)).GetResult(); val6 = new DataFeedGroup(); ((DataFeedItem)val6).InitBase("RMLSettingsGroup", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.RML.Mods", (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_04ba; } } catch (global::System.Exception exception) { <>1__state = -2; <loadedModsGroup>5__2 = null; <>7__wrap2 = default(Enumerator<ResoniteModBase>); <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetException(exception); return; } <>1__state = -2; <loadedModsGroup>5__2 = null; <>7__wrap2 = default(Enumerator<ResoniteModBase>); <>2__current = null; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete(); <>v__promiseOfValueOrEnd.SetResult(false); return; IL_04ba: <>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) <RmlSettingsEnumerate>d__3 <RmlSettingsEnumerate>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = -3; <>t__builder = AsyncIteratorMethodBuilder.Create(); <>w__disposeMode = false; <RmlSettingsEnumerate>d__ = this; } else { <RmlSettingsEnumerate>d__ = new <RmlSettingsEnumerate>d__3(-3); } <RmlSettingsEnumerate>d__.path = <>3__path; return <RmlSettingsEnumerate>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(); <RmlSettingsEnumerate>d__3 <RmlSettingsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<RmlSettingsEnumerate>d__3>(ref <RmlSettingsEnumerate>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(); <RmlSettingsEnumerate>d__3 <RmlSettingsEnumerate>d__ = this; ((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<RmlSettingsEnumerate>d__3>(ref <RmlSettingsEnumerate>d__); return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version); } } internal stati