From 685fadbfdf541b7fbb64172bac110a6f13301c8a Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 18 Mar 2026 16:55:48 -0400 Subject: [PATCH] Move wrapper utility classes into Wrappers namespace --- ExtractionTool/Features/MainFeature.cs | 1 - InfoPrint/Features/MainFeature.cs | 1 - .../SabreTools.Wrappers/PortableExecutable.cs | 2 +- .../{ => SabreTools.Wrappers}/Printer.cs | 5 ++--- SabreTools.Serialization/WrapperFactory.cs | 3 +-- 5 files changed, 4 insertions(+), 8 deletions(-) rename SabreTools.Serialization/{ => SabreTools.Wrappers}/Printer.cs (92%) diff --git a/ExtractionTool/Features/MainFeature.cs b/ExtractionTool/Features/MainFeature.cs index f4dd83f3..9839bf3a 100644 --- a/ExtractionTool/Features/MainFeature.cs +++ b/ExtractionTool/Features/MainFeature.cs @@ -3,7 +3,6 @@ using System.IO; using SabreTools.CommandLine; using SabreTools.CommandLine.Inputs; using SabreTools.IO.Extensions; -using SabreTools.Serialization; using SabreTools.Wrappers; namespace ExtractionTool.Features diff --git a/InfoPrint/Features/MainFeature.cs b/InfoPrint/Features/MainFeature.cs index 69e6c559..29610d91 100644 --- a/InfoPrint/Features/MainFeature.cs +++ b/InfoPrint/Features/MainFeature.cs @@ -5,7 +5,6 @@ using SabreTools.CommandLine; using SabreTools.CommandLine.Inputs; using SabreTools.Hashing; using SabreTools.IO.Extensions; -using SabreTools.Serialization; using SabreTools.Wrappers; namespace InfoPrint.Features diff --git a/SabreTools.Serialization/SabreTools.Wrappers/PortableExecutable.cs b/SabreTools.Serialization/SabreTools.Wrappers/PortableExecutable.cs index 62d7ed0f..52323865 100644 --- a/SabreTools.Serialization/SabreTools.Wrappers/PortableExecutable.cs +++ b/SabreTools.Serialization/SabreTools.Wrappers/PortableExecutable.cs @@ -1813,7 +1813,7 @@ namespace SabreTools.Wrappers // Parse the executable and recurse _dataSource.SeekIfPossible(resourceOffset, SeekOrigin.Begin); - var resourceExe = Serialization.WrapperFactory.CreateExecutableWrapper(_dataSource); + var resourceExe = WrapperFactory.CreateExecutableWrapper(_dataSource); if (resourceExe is not PortableExecutable resourcePex) return -1; diff --git a/SabreTools.Serialization/Printer.cs b/SabreTools.Serialization/SabreTools.Wrappers/Printer.cs similarity index 92% rename from SabreTools.Serialization/Printer.cs rename to SabreTools.Serialization/SabreTools.Wrappers/Printer.cs index edc50191..9a96fc7e 100644 --- a/SabreTools.Serialization/Printer.cs +++ b/SabreTools.Serialization/SabreTools.Wrappers/Printer.cs @@ -1,8 +1,7 @@ using System; using System.Text; -using SabreTools.Wrappers; -namespace SabreTools.Serialization +namespace SabreTools.Wrappers { /// /// Generic wrapper around printing methods @@ -15,7 +14,7 @@ namespace SabreTools.Serialization /// public static void PrintToConsole(this IWrapper wrapper) { - var sb = ExportStringBuilder(wrapper); + var sb = wrapper.ExportStringBuilder(); if (sb is null) { Console.WriteLine("No item information could be generated"); diff --git a/SabreTools.Serialization/WrapperFactory.cs b/SabreTools.Serialization/WrapperFactory.cs index 2b437037..d0ef0e4c 100644 --- a/SabreTools.Serialization/WrapperFactory.cs +++ b/SabreTools.Serialization/WrapperFactory.cs @@ -1,9 +1,8 @@ using System; using System.IO; using SabreTools.IO.Extensions; -using SabreTools.Wrappers; -namespace SabreTools.Serialization +namespace SabreTools.Wrappers { public static class WrapperFactory {