mirror of
https://github.com/sp-tarkov/assembly-tool.git
synced 2025-02-12 15:10:44 -05:00
Convert IsEnum
This commit is contained in:
parent
165739eacd
commit
2da74cc061
File diff suppressed because it is too large
Load Diff
@ -58,7 +58,7 @@ public class GenericParams
|
||||
public bool IsPublic { get; set; } = true;
|
||||
public bool IsAbstract { get; set; }
|
||||
public bool IsInterface { get; set; }
|
||||
public bool? IsEnum { get; set; } = null;
|
||||
public bool IsEnum { get; set; }
|
||||
public bool IsSealed { get; set; }
|
||||
public bool? HasAttribute { get; set; } = null;
|
||||
public bool? HasGenericParameters { get; set; } = null;
|
||||
|
@ -39,17 +39,7 @@ internal static class GenericTypeFilters
|
||||
|
||||
public static IEnumerable<TypeDef> FilterEnum(IEnumerable<TypeDef> types, SearchParams parms)
|
||||
{
|
||||
// Filter based on enum or not
|
||||
if (parms.GenericParams.IsEnum is true)
|
||||
{
|
||||
types = types.Where(t => t.IsEnum);
|
||||
}
|
||||
else if (parms.GenericParams.IsEnum is false)
|
||||
{
|
||||
types = types.Where(t => !t.IsEnum);
|
||||
}
|
||||
|
||||
return types;
|
||||
return types.Where(t => t.IsEnum == parms.GenericParams.IsEnum);
|
||||
}
|
||||
|
||||
public static IEnumerable<TypeDef> FilterAttributes(IEnumerable<TypeDef> types, SearchParams parms)
|
||||
|
Loading…
x
Reference in New Issue
Block a user