2024-06-13 01:46:51 -04:00
|
|
|
|
using AssemblyRemapper.Enums;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace AssemblyRemapper.Models;
|
2024-06-12 00:05:59 -04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Object to store linq statements in inside of json to search and remap classes
|
|
|
|
|
/// </summary>
|
|
|
|
|
internal class RemapModel
|
|
|
|
|
{
|
2024-06-13 01:46:51 -04:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
public bool Succeeded { get; set; } = false;
|
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
public EFailureReason FailureReason { get; set; }
|
|
|
|
|
|
2024-06-12 00:05:59 -04:00
|
|
|
|
public string NewTypeName { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public string OriginalTypeName { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public bool UseForceRename { get; set; }
|
|
|
|
|
|
|
|
|
|
public SearchParams SearchParams { get; set; } = new();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Search filters to find types and remap them
|
|
|
|
|
/// </summary>
|
|
|
|
|
internal class SearchParams
|
|
|
|
|
{
|
2024-06-13 04:56:08 -04:00
|
|
|
|
#region BOOL_PARAMS
|
|
|
|
|
|
2024-06-12 00:05:59 -04:00
|
|
|
|
public bool? IsPublic { get; set; } = null;
|
|
|
|
|
public bool? IsAbstract { get; set; } = null;
|
|
|
|
|
public bool? IsInterface { get; set; } = null;
|
|
|
|
|
public bool? IsEnum { get; set; } = null;
|
|
|
|
|
public bool? IsNested { get; set; } = null;
|
|
|
|
|
public bool? IsSealed { get; set; } = null;
|
|
|
|
|
public bool? HasAttribute { get; set; } = null;
|
|
|
|
|
public bool? IsDerived { get; set; } = null;
|
|
|
|
|
public bool? HasGenericParameters { get; set; } = null;
|
2024-06-13 04:56:08 -04:00
|
|
|
|
|
|
|
|
|
#endregion BOOL_PARAMS
|
|
|
|
|
|
|
|
|
|
#region STR_PARAMS
|
|
|
|
|
|
|
|
|
|
public string? ParentName { get; set; } = null;
|
|
|
|
|
public string? MatchBaseClass { get; set; } = null;
|
|
|
|
|
public string? IgnoreBaseClass { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
#endregion STR_PARAMS
|
|
|
|
|
|
|
|
|
|
#region INT_PARAMS
|
|
|
|
|
|
|
|
|
|
public int? ConstructorParameterCount { get; set; } = null;
|
|
|
|
|
public int? MethodCount { get; set; } = null;
|
|
|
|
|
public int? FieldCount { get; set; } = null;
|
|
|
|
|
public int? PropertyCount { get; set; } = null;
|
2024-06-13 12:32:21 -04:00
|
|
|
|
public int? NestedTypeCount { get; set; } = null;
|
2024-06-13 04:56:08 -04:00
|
|
|
|
|
|
|
|
|
#endregion INT_PARAMS
|
|
|
|
|
|
|
|
|
|
#region LISTS
|
|
|
|
|
|
2024-06-13 12:32:21 -04:00
|
|
|
|
public List<string> IncludeMethods { get; set; }
|
|
|
|
|
public List<string> ExcludeMethods { get; set; }
|
|
|
|
|
public List<string> IncludeFields { get; set; }
|
|
|
|
|
public List<string> ExcludeFields { get; set; }
|
|
|
|
|
public List<string> IncludeProperties { get; set; }
|
|
|
|
|
public List<string> ExcludeProperties { get; set; }
|
|
|
|
|
public List<string> IncludeNestedTypes { get; set; }
|
|
|
|
|
public List<string> ExcludeNestedTypes { get; set; }
|
2024-06-12 00:05:59 -04:00
|
|
|
|
|
2024-06-13 04:56:08 -04:00
|
|
|
|
#endregion LISTS
|
|
|
|
|
|
2024-06-12 00:05:59 -04:00
|
|
|
|
public SearchParams()
|
|
|
|
|
{
|
|
|
|
|
}
|
2024-06-12 15:47:11 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal class AdvancedSearchParams
|
|
|
|
|
{
|
2024-06-12 00:05:59 -04:00
|
|
|
|
}
|