more extension methods using priority

This commit is contained in:
Pilzinsel64
2024-07-16 10:15:04 +02:00
parent 4bb72c63b2
commit 3f4eb82273

View File

@@ -21,4 +21,14 @@ public static class Extensions
{
return @this.Enabled ? @this.Execute(@params) : default;
}
public static IEnumerable<T> Enabled<T>(this IEnumerable<T> @this) where T : PluginFeature
{
return @this.Where(n => n.Enabled);
}
public static IEnumerable<T> Orderd<T>(this IEnumerable<T> @this) where T : PluginFeature
{
return @this.OrderByDescending(n => n.Prioritization);
}
}