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.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFrameworks>net462;net480;net8.0</TargetFrameworks>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -15,7 +16,7 @@
|
||||
<None Remove="Features\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<PackageReference Include="AutoMapper" Version="16.2.0" />
|
||||
<PackageReference Include="Codecrete.SwissQRBill.Generator" Version="3.4.0" />
|
||||
<PackageReference Include="FluentValidation" Version="12.1.1" />
|
||||
@@ -25,8 +26,38 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.10" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Common\Mappings\" />
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
|
||||
<PackageReference Include="AutoMapper" Version="16.2.0" />
|
||||
<PackageReference Include="FluentValidation" Version="11.11.0" />
|
||||
<PackageReference Include="MediatR" Version="14.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net480'">
|
||||
<PackageReference Include="AutoMapper" Version="16.2.0" />
|
||||
<PackageReference Include="FluentValidation" Version="11.11.0" />
|
||||
<PackageReference Include="MediatR" Version="14.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'net8.0'">
|
||||
<PackageReference Include="PolySharp" Version="1.14.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'net8.0'">
|
||||
<Compile Remove="Common\Interfaces\ISwissQrCodeProcessor.cs" />
|
||||
<Compile Remove="Common\DTOs\SwissQrBillDto.cs" />
|
||||
<Compile Remove="Common\DTOs\SwissQrCodeExtractionResult.cs" />
|
||||
<Compile Remove="Common\Mapping\MappingProfile.cs" />
|
||||
<Compile Remove="SwissQrCode\**" />
|
||||
<Compile Remove="ExtractZugferd\**" />
|
||||
<Compile Remove="HasZugferd\**" />
|
||||
<Compile Remove="DependencyInjection.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -42,5 +42,9 @@
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DocumentService.Application\DocumentService.Application.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using DocumentService.Client.Models.ValueObjects;
|
||||
using DocumentService.Domain.Models.ValueObjects;
|
||||
|
||||
namespace DocumentService.Client.Models.Requests;
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Coordinate origin point for PDF annotations.
|
||||
/// </summary>
|
||||
public enum AnnotationOrigin
|
||||
{
|
||||
/// <summary>
|
||||
/// Bottom-left corner (PDF native coordinate system, default)
|
||||
/// </summary>
|
||||
BottomLeft,
|
||||
|
||||
/// <summary>
|
||||
/// Top-left corner (common in UI frameworks)
|
||||
/// </summary>
|
||||
TopLeft
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Supported PDF annotation types
|
||||
/// </summary>
|
||||
public enum AnnotationType
|
||||
{
|
||||
/// <summary>
|
||||
/// Text markup annotation (highlight, underline, strikeout)
|
||||
/// </summary>
|
||||
TextMarkup,
|
||||
|
||||
/// <summary>
|
||||
/// Free text annotation (text box with visible text)
|
||||
/// </summary>
|
||||
FreeText,
|
||||
|
||||
/// <summary>
|
||||
/// Sticky note annotation (popup comment icon)
|
||||
/// </summary>
|
||||
StickyNote,
|
||||
|
||||
/// <summary>
|
||||
/// Circle shape annotation
|
||||
/// </summary>
|
||||
Circle,
|
||||
|
||||
/// <summary>
|
||||
/// Square shape annotation
|
||||
/// </summary>
|
||||
Square
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Predefined stamp types with standard text and styling.
|
||||
/// </summary>
|
||||
public enum PredefinedStampType
|
||||
{
|
||||
/// <summary>
|
||||
/// CONFIDENTIAL stamp (red, bold).
|
||||
/// </summary>
|
||||
Confidential,
|
||||
|
||||
/// <summary>
|
||||
/// APPROVED stamp (green, bold).
|
||||
/// </summary>
|
||||
Approved,
|
||||
|
||||
/// <summary>
|
||||
/// DRAFT stamp (gray, italic).
|
||||
/// </summary>
|
||||
Draft,
|
||||
|
||||
/// <summary>
|
||||
/// VOID stamp (red, strikethrough effect).
|
||||
/// </summary>
|
||||
Void,
|
||||
|
||||
/// <summary>
|
||||
/// FOR REVIEW stamp (orange, bold).
|
||||
/// </summary>
|
||||
ForReview
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies whether the stamp should appear in the foreground or background.
|
||||
/// </summary>
|
||||
public enum StampPlacement
|
||||
{
|
||||
/// <summary>
|
||||
/// Stamp appears on top of existing page content.
|
||||
/// </summary>
|
||||
Foreground,
|
||||
|
||||
/// <summary>
|
||||
/// Stamp appears behind existing page content (watermark effect).
|
||||
/// </summary>
|
||||
Background
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the type of stamp to add to a PDF document.
|
||||
/// </summary>
|
||||
public enum StampType
|
||||
{
|
||||
/// <summary>
|
||||
/// Text-based stamp with custom text, font, and color.
|
||||
/// </summary>
|
||||
Text,
|
||||
|
||||
/// <summary>
|
||||
/// Image-based stamp (PNG/JPEG overlay).
|
||||
/// </summary>
|
||||
Image,
|
||||
|
||||
/// <summary>
|
||||
/// Predefined stamp with standard text (e.g., CONFIDENTIAL, APPROVED).
|
||||
/// </summary>
|
||||
Predefined
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
namespace DocumentService.Client.Models.ValueObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Text markup annotation style (highlight, underline, strikeout)
|
||||
/// </summary>
|
||||
public enum TextMarkupStyle
|
||||
{
|
||||
/// <summary>
|
||||
/// Highlight text with background color
|
||||
/// </summary>
|
||||
Highlight,
|
||||
|
||||
/// <summary>
|
||||
/// Underline text
|
||||
/// </summary>
|
||||
Underline,
|
||||
|
||||
/// <summary>
|
||||
/// Strikeout text (strikethrough)
|
||||
/// </summary>
|
||||
Strikeout
|
||||
}
|
||||
Reference in New Issue
Block a user