From beb71698d704bda12969392fe5b1874a115a3cf5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:31:47 +0000 Subject: [PATCH 1/2] Bump YamlDotNet from 15.1.6 to 15.3.0 Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 15.1.6 to 15.3.0. - [Release notes](https://github.com/aaubry/YamlDotNet/releases) - [Commits](https://github.com/aaubry/YamlDotNet/compare/v15.1.6...v15.3.0) --- updated-dependencies: - dependency-name: YamlDotNet dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- BadDicom/BadDicom.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BadDicom/BadDicom.csproj b/BadDicom/BadDicom.csproj index 3c5eb92..ec76688 100644 --- a/BadDicom/BadDicom.csproj +++ b/BadDicom/BadDicom.csproj @@ -35,7 +35,7 @@ - + From 9b9d492e2dce7f530266527d801e8bd54be21512 Mon Sep 17 00:00:00 2001 From: James A Sutherland Date: Mon, 17 Jun 2024 09:47:01 -0500 Subject: [PATCH 2/2] Tidy up YAML bits --- BadDicom/Configuration/ConfigContext.cs | 7 ++++--- BadDicom/Configuration/ExplicitUIDs.cs | 4 ++-- BadDicom/Configuration/TargetDatabase.cs | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/BadDicom/Configuration/ConfigContext.cs b/BadDicom/Configuration/ConfigContext.cs index da925ac..d92699d 100644 --- a/BadDicom/Configuration/ConfigContext.cs +++ b/BadDicom/Configuration/ConfigContext.cs @@ -3,6 +3,7 @@ namespace BadDicom.Configuration; [YamlStaticContext] -public partial class ConfigContext : StaticContext -{ -} \ No newline at end of file +[YamlSerializable(typeof(Config))] +[YamlSerializable(typeof(TargetDatabase))] +[YamlSerializable(typeof(ExplicitUIDs))] +public sealed partial class ConfigContext; \ No newline at end of file diff --git a/BadDicom/Configuration/ExplicitUIDs.cs b/BadDicom/Configuration/ExplicitUIDs.cs index f4cb8db..f5aee3c 100644 --- a/BadDicom/Configuration/ExplicitUIDs.cs +++ b/BadDicom/Configuration/ExplicitUIDs.cs @@ -10,7 +10,7 @@ namespace BadDicom.Configuration; /// Config section for loading explicit UIDs from disk and using those in file creation /// [YamlSerializable] -public class ExplicitUIDs +public sealed class ExplicitUIDs { /// /// Path to a file containing a list of study instance UIDs to use @@ -52,6 +52,6 @@ private static IEnumerable GetUIDsFrom(string? path) { if (string.IsNullOrWhiteSpace(path) || !File.Exists(path)) return Enumerable.Empty(); - return File.ReadLines(path).Where(l => !string.IsNullOrWhiteSpace(l)); + return File.ReadLines(path).Where(static l => !string.IsNullOrWhiteSpace(l)); } } \ No newline at end of file diff --git a/BadDicom/Configuration/TargetDatabase.cs b/BadDicom/Configuration/TargetDatabase.cs index 51bd427..f195156 100644 --- a/BadDicom/Configuration/TargetDatabase.cs +++ b/BadDicom/Configuration/TargetDatabase.cs @@ -7,7 +7,7 @@ namespace BadDicom.Configuration; /// Identify the target database and configuration for generated data /// [YamlSerializable] -public class TargetDatabase +public sealed class TargetDatabase { /// /// Which RDBMS the database is (MySQL, Microsoft SQL Server, etc)