more extension methods using priority
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user