From 61514db3be8abdd2c1b996f31337b8047cd6deed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tjorven=20K=C3=A4mpfer?= <62958434+tjorvenK@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:37:59 +0100 Subject: [PATCH] refactor: use stronlgy package --- .../Ashampoo.Translation.Systems.Formats.Abstractions.csproj | 2 +- .../src/Models/Language.cs | 4 ++-- .../src/JavaProperties/JavaPropertiesFormat.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Ashampoo.Translation.Systems.Formats.Abstractions/src/Ashampoo.Translation.Systems.Formats.Abstractions.csproj b/src/Ashampoo.Translation.Systems.Formats.Abstractions/src/Ashampoo.Translation.Systems.Formats.Abstractions.csproj index 90e873d..d927bdd 100644 --- a/src/Ashampoo.Translation.Systems.Formats.Abstractions/src/Ashampoo.Translation.Systems.Formats.Abstractions.csproj +++ b/src/Ashampoo.Translation.Systems.Formats.Abstractions/src/Ashampoo.Translation.Systems.Formats.Abstractions.csproj @@ -32,6 +32,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Ashampoo.Translation.Systems.Formats.Abstractions/src/Models/Language.cs b/src/Ashampoo.Translation.Systems.Formats.Abstractions/src/Models/Language.cs index 8548974..4adbc2b 100644 --- a/src/Ashampoo.Translation.Systems.Formats.Abstractions/src/Models/Language.cs +++ b/src/Ashampoo.Translation.Systems.Formats.Abstractions/src/Models/Language.cs @@ -1,11 +1,11 @@ -using StronglyTypedIds; +using Strongly; namespace Ashampoo.Translation.Systems.Formats.Abstractions.Models; /// /// Represents a strongly typed identifier for a language. /// -[StronglyTypedId(Template.String)] +[Strongly(StronglyType.String, StronglyConverter.SystemTextJson, StronglyImplementations.IEquatable |StronglyImplementations.Parsable)] public readonly partial struct Language; /// diff --git a/src/Ashampoo.Translation.Systems.Formats/src/JavaProperties/JavaPropertiesFormat.cs b/src/Ashampoo.Translation.Systems.Formats/src/JavaProperties/JavaPropertiesFormat.cs index d167311..3563b95 100644 --- a/src/Ashampoo.Translation.Systems.Formats/src/JavaProperties/JavaPropertiesFormat.cs +++ b/src/Ashampoo.Translation.Systems.Formats/src/JavaProperties/JavaPropertiesFormat.cs @@ -71,7 +71,7 @@ private async Task ConfigureOptionsAsync(FormatReadOptions? options) } else { - Header.TargetLanguage = (Language)options.TargetLanguage!; + Header.TargetLanguage = options.TargetLanguage!; } return true;