From aae340d7bddede526d27cb30abfff6b14d6791cc Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Mon, 8 Jan 2024 09:17:30 -0800 Subject: [PATCH] Remove primary ctor --- Source/v2/Meadow.CLI/Linker/MeadowLinker.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Source/v2/Meadow.CLI/Linker/MeadowLinker.cs b/Source/v2/Meadow.CLI/Linker/MeadowLinker.cs index 68e64d0c..89ff3540 100644 --- a/Source/v2/Meadow.CLI/Linker/MeadowLinker.cs +++ b/Source/v2/Meadow.CLI/Linker/MeadowLinker.cs @@ -5,7 +5,7 @@ namespace LinkerTest; -public class MeadowLinker(string meadowAssembliesPath, ILogger? logger = null) +public class MeadowLinker { private const string IL_LINKER_DIR = "lib"; private const string IL_LINKER_DLL = "illink.dll"; @@ -14,11 +14,18 @@ public class MeadowLinker(string meadowAssembliesPath, ILogger? logger = null) private const string PostLinkDirectoryName = "postlink_bin"; private const string PreLinkDirectoryName = "prelink_bin"; - readonly ILLinker _linker = new ILLinker(logger); - readonly ILogger? _logger = logger; + readonly ILLinker _linker; + readonly ILogger? _logger; //ToDo ... might need to make this a property or pass it in when used - private readonly string _meadowAssembliesPath = meadowAssembliesPath; + private readonly string _meadowAssembliesPath; + + public MeadowLinker(string meadowAssembliesPath, ILogger? logger = null) + { + _meadowAssembliesPath = meadowAssembliesPath; + _logger = logger; + _linker = new ILLinker(logger); + } public async Task Trim( FileInfo meadowAppFile,