Skip to content

Commit

Permalink
Update StaticHelpers.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexejhero committed Nov 6, 2023
1 parent 8862d85 commit 6ad920a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SCHIZO/Helpers/StaticHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
Expand All @@ -16,8 +17,9 @@ public static void CacheAll()
IEnumerable<string> names = PLUGIN_ASSEMBLY.GetTypes()
.SelectMany(t => t.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic))
.Where(m => m.GetCustomAttribute<CacheAttribute>() != null)
.SelectMany(m => (IEnumerable<TriDropdownItem<string>>) m.Invoke(null, Array.Empty<object>()))
.Select(i => i.Value);
.Select(m => (IEnumerable) m.Invoke(null, Array.Empty<object>()))
.SelectMany(i => i.Cast<ITriDropdownItem>())
.Select(i => i.Value.ToString());

CacheValues(names);
}
Expand Down

0 comments on commit 6ad920a

Please sign in to comment.