0
0
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:
Cj 2025-01-10 09:00:03 -05:00
parent 165739eacd
commit 2da74cc061
3 changed files with 407 additions and 12 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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;

View File

@ -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)