From 3970812d4f7e241df939c5b6e2c6ddcda78b38cc Mon Sep 17 00:00:00 2001 From: Cj <161484149+CJ-SPT@users.noreply.github.com> Date: Wed, 26 Jun 2024 20:50:53 -0400 Subject: [PATCH] Code style + fix out path --- RecodeItLib/AutoMapper/ReCodeItAutoMapper.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/RecodeItLib/AutoMapper/ReCodeItAutoMapper.cs b/RecodeItLib/AutoMapper/ReCodeItAutoMapper.cs index ea96167..f88b066 100644 --- a/RecodeItLib/AutoMapper/ReCodeItAutoMapper.cs +++ b/RecodeItLib/AutoMapper/ReCodeItAutoMapper.cs @@ -503,14 +503,21 @@ public class ReCodeItAutoMapper private void WriteChanges() { - Module.Write(Settings.OutputPath); + var path = Path.Combine(Settings.OutputPath, Module.Assembly.Name + "-auto_mapped.dll"); - var fieldCountMatchResult = MappingPairs.Where(x => x.AutoMappingResult == AutoMappingResult.Match_From_Property).Count(); - var propertyCountMatchResult = MappingPairs.Where(x => x.AutoMappingResult == AutoMappingResult.Match_From_Property).Count(); - var methodCountMatchResult = MappingPairs.Where(x => x.AutoMappingResult == AutoMappingResult.Match_From_Method).Count(); + Module.Write(path); + + var fieldCountMatchResult = MappingPairs + .Count(x => x.AutoMappingResult == AutoMappingResult.Match_From_Field); + + var propertyCountMatchResult = MappingPairs + .Count(x => x.AutoMappingResult == AutoMappingResult.Match_From_Property); + + var methodCountMatchResult = MappingPairs + .Count(x => x.AutoMappingResult == AutoMappingResult.Match_From_Method); Logger.Log($"-------------------------------RESULT-----------------------------------", ConsoleColor.Green); - Logger.Log($"Complete: Assembly written to `{Settings.OutputPath}`", ConsoleColor.Green); + Logger.Log($"Complete: Assembly written to `{path}`", ConsoleColor.Green); Logger.Log($"Found {MappingPairs.Count()} automatic remaps", ConsoleColor.Green); Logger.Log($"Found {fieldCountMatchResult} automatic remaps from fields", ConsoleColor.Green); Logger.Log($"Found {propertyCountMatchResult} automatic remaps from properties", ConsoleColor.Green);