namespace ReCodeIt.Models;
///
/// All settings container
///
public class Settings
{
public AppSettings AppSettings { get; set; }
public RemapperSettings Remapper { get; set; }
public AutoMapperSettings AutoMapper { get; set; }
public CrossPatchingSettings CrossPatching { get; set; }
}
///
/// These are settings for the application
///
public class AppSettings
{
public bool Debug { get; set; }
public bool SilentMode { get; set; }
public bool RenameFields { get; set; }
public bool RenameProperties { get; set; }
}
///
/// These are settings for the manual remapper
///
public class RemapperSettings
{
///
/// Path to the assembly we want to remap
///
public string AssemblyPath { get; set; }
///
/// Path including the filename and extension we want to write the changes to
///
public string OutputPath { get; set; }
///
/// Path to the mapping file
///
public string MappingPath { get; set; }
public MappingSettings MappingSettings { get; set; }
}
///
/// These are settings for the auto mapping
///
public class AutoMapperSettings
{
///
/// Path to the assembly we want to remap
///
public string AssemblyPath { get; set; }
///
/// Path including the filename and extension we want to write the changes to
///
public string OutputPath { get; set; }
///
/// Minimum number of times a member must have this name in the assembly before considering it
/// for remapping
///
public int RequiredMatches { get; set; }
///
/// Minimum length of the field/property name in code before it will be considered for a rename
///
public int MinLengthToMatch { get; set; }
///
/// Will attempt to map types from method meta data and parameters
///
public bool SearchMethods { get; set; }
public MappingSettings MappingSettings { get; set; }
///
/// Any member name you want to ignore while iterating through the assembly
///
public List TypesToIgnore { get; set; }
///
/// The auto mapper will look for these tokens in class names and prioritize those
///
public List TokensToMatch { get; set; }
///
/// Property or fields names to ignore in the automap, these are case sanitized so case does not matter
///
public List PropertyFieldBlackList { get; set; }
///
/// method parameter names to ignore in the automap, these are case sanitized so case does not matter
///
public List MethodParamaterBlackList { get; set; }
}
///
/// These are settings for the cross patching module
///
public class CrossPatchingSettings
{
///
/// The path to the original assembly to use as a reference, for unity games its
/// 'Assembly-CSharp.dll' from the games Data/Managed Folder
///
public string OriginalAssemblyPath { get; set; }
///
/// The output path of the remapped assembly
///
public string RemappedOutput { get; set; }
///
/// The input path of the assembly referenced by the remapped dll
///
public string ReversePatchInputPath { get; set; }
///
/// Where should the de-patched dll be placed? (This is the one you test/distribute with)
///
public string ReversePatchOutputPath { get; set; }
}
///
/// These are settings that all versions of the remappers use
///
public class MappingSettings
{
///
/// Names of fields of the matched type will be renamed to the type name with approproiate convention
///
public bool RenameFields { get; set; }
///
/// Names of properties of the matched type will be renamed to the type name with approproiate convention
///
public bool RenameProperties { get; set; }
///
/// Publicize all types, methods, and properties : NOTE: Not run until after the remap has completed
///
public bool Publicize { get; set; }
///
/// Unseal all types : NOTE: Not run until after the remap has completed
///
public bool Unseal { get; set; }
}