From 108e5223164aaf3433bf631d3db1985473b7d218 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 31 Aug 2026 00:53:34 +0200 Subject: [PATCH] Add multi-targeting and refactor project structure Enabled multi-targeting in `DocumentService.Application` to support `net462`, `net480`, and `net8.0`. Updated dependencies with framework-specific versions and added conditional configurations for compatibility. Refactored `DocumentService.Client` by removing redundant enums and unused code. Adjusted namespaces and project references to streamline the codebase and improve maintainability. These changes modernize the project, enhance compatibility, and align with modular design principles. --- .../DocumentService.Application.csproj | 41 ++++++++++++++++--- .../DocumentService.Client.csproj | 4 ++ .../Models/Requests/PdfOperationRequests.cs | 1 + .../Models/ValueObjects/AnnotationOrigin.cs | 17 -------- .../Models/ValueObjects/AnnotationType.cs | 32 --------------- .../ValueObjects/PredefinedStampType.cs | 32 --------------- .../Models/ValueObjects/StampPlacement.cs | 17 -------- .../Models/ValueObjects/StampType.cs | 22 ---------- .../Models/ValueObjects/TextMarkupStyle.cs | 22 ---------- 9 files changed, 41 insertions(+), 147 deletions(-) delete mode 100644 DocumentService.Client/Models/ValueObjects/AnnotationOrigin.cs delete mode 100644 DocumentService.Client/Models/ValueObjects/AnnotationType.cs delete mode 100644 DocumentService.Client/Models/ValueObjects/PredefinedStampType.cs delete mode 100644 DocumentService.Client/Models/ValueObjects/StampPlacement.cs delete mode 100644 DocumentService.Client/Models/ValueObjects/StampType.cs delete mode 100644 DocumentService.Client/Models/ValueObjects/TextMarkupStyle.cs diff --git a/DocumentService.Application/DocumentService.Application.csproj b/DocumentService.Application/DocumentService.Application.csproj index 14fccae..30daa7c 100644 --- a/DocumentService.Application/DocumentService.Application.csproj +++ b/DocumentService.Application/DocumentService.Application.csproj @@ -1,9 +1,10 @@  - net8.0 + net462;net480;net8.0 enable - enable + enable + latest @@ -15,7 +16,7 @@ - + @@ -25,8 +26,38 @@ - - + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + diff --git a/DocumentService.Client/DocumentService.Client.csproj b/DocumentService.Client/DocumentService.Client.csproj index 34defcf..cbf285d 100644 --- a/DocumentService.Client/DocumentService.Client.csproj +++ b/DocumentService.Client/DocumentService.Client.csproj @@ -42,5 +42,9 @@ \ + + + + diff --git a/DocumentService.Client/Models/Requests/PdfOperationRequests.cs b/DocumentService.Client/Models/Requests/PdfOperationRequests.cs index 3246772..c6b9416 100644 --- a/DocumentService.Client/Models/Requests/PdfOperationRequests.cs +++ b/DocumentService.Client/Models/Requests/PdfOperationRequests.cs @@ -1,4 +1,5 @@ using DocumentService.Client.Models.ValueObjects; +using DocumentService.Domain.Models.ValueObjects; namespace DocumentService.Client.Models.Requests; diff --git a/DocumentService.Client/Models/ValueObjects/AnnotationOrigin.cs b/DocumentService.Client/Models/ValueObjects/AnnotationOrigin.cs deleted file mode 100644 index 87643c0..0000000 --- a/DocumentService.Client/Models/ValueObjects/AnnotationOrigin.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace DocumentService.Client.Models.ValueObjects; - -/// -/// Coordinate origin point for PDF annotations. -/// -public enum AnnotationOrigin -{ - /// - /// Bottom-left corner (PDF native coordinate system, default) - /// - BottomLeft, - - /// - /// Top-left corner (common in UI frameworks) - /// - TopLeft -} diff --git a/DocumentService.Client/Models/ValueObjects/AnnotationType.cs b/DocumentService.Client/Models/ValueObjects/AnnotationType.cs deleted file mode 100644 index 6b5a6e3..0000000 --- a/DocumentService.Client/Models/ValueObjects/AnnotationType.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace DocumentService.Client.Models.ValueObjects; - -/// -/// Supported PDF annotation types -/// -public enum AnnotationType -{ - /// - /// Text markup annotation (highlight, underline, strikeout) - /// - TextMarkup, - - /// - /// Free text annotation (text box with visible text) - /// - FreeText, - - /// - /// Sticky note annotation (popup comment icon) - /// - StickyNote, - - /// - /// Circle shape annotation - /// - Circle, - - /// - /// Square shape annotation - /// - Square -} diff --git a/DocumentService.Client/Models/ValueObjects/PredefinedStampType.cs b/DocumentService.Client/Models/ValueObjects/PredefinedStampType.cs deleted file mode 100644 index ec43464..0000000 --- a/DocumentService.Client/Models/ValueObjects/PredefinedStampType.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace DocumentService.Client.Models.ValueObjects; - -/// -/// Predefined stamp types with standard text and styling. -/// -public enum PredefinedStampType -{ - /// - /// CONFIDENTIAL stamp (red, bold). - /// - Confidential, - - /// - /// APPROVED stamp (green, bold). - /// - Approved, - - /// - /// DRAFT stamp (gray, italic). - /// - Draft, - - /// - /// VOID stamp (red, strikethrough effect). - /// - Void, - - /// - /// FOR REVIEW stamp (orange, bold). - /// - ForReview -} diff --git a/DocumentService.Client/Models/ValueObjects/StampPlacement.cs b/DocumentService.Client/Models/ValueObjects/StampPlacement.cs deleted file mode 100644 index b0b8147..0000000 --- a/DocumentService.Client/Models/ValueObjects/StampPlacement.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace DocumentService.Client.Models.ValueObjects; - -/// -/// Specifies whether the stamp should appear in the foreground or background. -/// -public enum StampPlacement -{ - /// - /// Stamp appears on top of existing page content. - /// - Foreground, - - /// - /// Stamp appears behind existing page content (watermark effect). - /// - Background -} diff --git a/DocumentService.Client/Models/ValueObjects/StampType.cs b/DocumentService.Client/Models/ValueObjects/StampType.cs deleted file mode 100644 index 7ccb18c..0000000 --- a/DocumentService.Client/Models/ValueObjects/StampType.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace DocumentService.Client.Models.ValueObjects; - -/// -/// Specifies the type of stamp to add to a PDF document. -/// -public enum StampType -{ - /// - /// Text-based stamp with custom text, font, and color. - /// - Text, - - /// - /// Image-based stamp (PNG/JPEG overlay). - /// - Image, - - /// - /// Predefined stamp with standard text (e.g., CONFIDENTIAL, APPROVED). - /// - Predefined -} diff --git a/DocumentService.Client/Models/ValueObjects/TextMarkupStyle.cs b/DocumentService.Client/Models/ValueObjects/TextMarkupStyle.cs deleted file mode 100644 index 95b19f4..0000000 --- a/DocumentService.Client/Models/ValueObjects/TextMarkupStyle.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace DocumentService.Client.Models.ValueObjects; - -/// -/// Text markup annotation style (highlight, underline, strikeout) -/// -public enum TextMarkupStyle -{ - /// - /// Highlight text with background color - /// - Highlight, - - /// - /// Underline text - /// - Underline, - - /// - /// Strikeout text (strikethrough) - /// - Strikeout -}