Skip to content

Commit

Permalink
Tidy up YAML bits
Browse files Browse the repository at this point in the history
  • Loading branch information
jas88 committed Jun 17, 2024
1 parent beb7169 commit 9b9d492
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions BadDicom/Configuration/ConfigContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace BadDicom.Configuration;

[YamlStaticContext]
public partial class ConfigContext : StaticContext
{
}
[YamlSerializable(typeof(Config))]
[YamlSerializable(typeof(TargetDatabase))]
[YamlSerializable(typeof(ExplicitUIDs))]
public sealed partial class ConfigContext;
4 changes: 2 additions & 2 deletions BadDicom/Configuration/ExplicitUIDs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace BadDicom.Configuration;
/// Config section for loading explicit UIDs from disk and using those in file creation
/// </summary>
[YamlSerializable]
public class ExplicitUIDs
public sealed class ExplicitUIDs
{
/// <summary>
/// Path to a file containing a list of study instance UIDs to use
Expand Down Expand Up @@ -52,6 +52,6 @@ private static IEnumerable<string> GetUIDsFrom(string? path)
{
if (string.IsNullOrWhiteSpace(path) || !File.Exists(path)) return Enumerable.Empty<string>();

return File.ReadLines(path).Where(l => !string.IsNullOrWhiteSpace(l));
return File.ReadLines(path).Where(static l => !string.IsNullOrWhiteSpace(l));
}
}
2 changes: 1 addition & 1 deletion BadDicom/Configuration/TargetDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace BadDicom.Configuration;
/// Identify the target database and configuration for generated data
/// </summary>
[YamlSerializable]
public class TargetDatabase
public sealed class TargetDatabase
{
/// <summary>
/// Which RDBMS the database is (MySQL, Microsoft SQL Server, etc)
Expand Down

0 comments on commit 9b9d492

Please sign in to comment.