From c88aea93f24ed9c35789320ffc7cef412d215629 Mon Sep 17 00:00:00 2001 From: Scott Holodak Date: Mon, 30 Oct 2023 16:00:13 -0400 Subject: [PATCH] Utils WiP --- Directory.Build.props | 10 ++- Directory.Build.targets | 2 +- Sholo.ruleset | 8 +- Source/Directory.Build.targets | 2 +- .../BaseServiceCollectionExtender.cs | 56 +++++++------- .../LazyConcurrentDictionaryThing.cs | 66 ++++++++++++++++ Source/Sholo.Utils/EnumExtensions.cs | 33 ++++---- Source/Sholo.Utils/GlobalUsings.cs | 3 + Source/Sholo.Utils/IMeters.cs | 14 ++++ .../Logging/LoggingBuilderExtensions.cs | 62 +++++++++++++++ Source/Sholo.Utils/Meters.cs | 26 +++++++ Source/Sholo.Utils/Sholo.Utils.csproj | 25 +++--- Source/Sholo.Utils/TypeExtensions.cs | 53 +++++++------ .../MiniValidatorValidateOptions.cs | 77 +++++++++++++++++++ ...OptionsBuilderDataAnnotationsExtensions.cs | 16 ++++ Tests/Directory.Build.props | 11 +-- Tests/Directory.Build.targets | 2 +- .../Sholo.Utils.Test/Sholo.Utils.Test.csproj | 8 +- global.json | 4 +- 19 files changed, 374 insertions(+), 104 deletions(-) create mode 100644 Source/Sholo.Utils/Collections/LazyConcurrentDictionaryThing.cs create mode 100644 Source/Sholo.Utils/GlobalUsings.cs create mode 100644 Source/Sholo.Utils/IMeters.cs create mode 100644 Source/Sholo.Utils/Logging/LoggingBuilderExtensions.cs create mode 100644 Source/Sholo.Utils/Meters.cs create mode 100644 Source/Sholo.Utils/Validation/MiniValidatorValidateOptions.cs create mode 100644 Source/Sholo.Utils/Validation/OptionsBuilderDataAnnotationsExtensions.cs diff --git a/Directory.Build.props b/Directory.Build.props index 20bd2d1..5ba50ae 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -10,9 +10,13 @@ true latest AllEnabledByDefault + true + latest + AllEnabledByDefault true $(MSBuildThisFileDirectory)Sholo.ruleset 1591,CA1848 + 1591,CA1848 @@ -35,9 +39,9 @@ - - - + + + diff --git a/Directory.Build.targets b/Directory.Build.targets index e603de4..2f6a80a 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -7,7 +7,7 @@ - preview + preview.0