using Mono.Cecil; namespace ReCodeItLib.AutoMapper; /// /// Represents a match of a field name to obfuscated class /// /// /// /// /// public sealed class MappingPair( TypeDefinition type, string name, bool isInterface, bool isStruct, bool isPublic) { public TypeDefinition OriginalTypeDefinition { get; private set; } = type; /// /// The type reference we want to change /// public TypeDefinition NewTypeRef { get; set; } /// /// Is this field an interface? /// public bool IsInterface { get; set; } = isInterface; /// /// Is this type a struct? /// public bool IsStruct { get; set; } = isStruct; /// /// Has this type been renamed? Use for checking for failures at the end /// public bool HasBeenRenamed { get; set; } = false; /// /// Did this match come from a method? /// public EMapPairSource IsMatchFrom { get; set; } = EMapPairSource.None; /// /// This is the name we want to change the assembly class to /// public string Name { get; set; } = name; /// /// Original name of the property or field type /// public string OriginalPropOrFieldName { get; } = name; } public enum EMapPairSource { None, Field, Property, Method }