From 8587c577f7f33e6ecc35dfa7906e31938d9498d7 Mon Sep 17 00:00:00 2001 From: Amadeusz Sadowski Date: Wed, 16 Jul 2025 12:07:24 +0200 Subject: [PATCH 1/7] refactor: fix errors and warnings --- ...FromSamplingTelemetryInitializerRulesTests.cs | 2 +- .../Controllers/WeatherForecastController.cs | 5 +---- .../.editorconfig | 5 ++++- .../PrometheusMetrics.cs | 11 ++++------- .../.editorconfig | 3 +++ .../Allegro.Extensions.AspNetCore.Demo.csproj | 4 ---- ...legro.Extensions.AspNetCore.Tests.Unit.csproj | 5 ----- .../Allegro.Extensions.Cqrs.Demo/.editorconfig | 4 ++++ .../Helpers/FakeStartup.cs | 3 ++- .../Allegro.Extensions.Dapper.Postgres.csproj | 2 +- .../DapperPostgresBinaryCopyClient.cs | 2 +- .../PostgresDatabaseConnectionFactory.cs | 2 +- .../Allegro.Extensions.Dapper/DapperClient.cs | 2 +- .../Extensions/MoneyExtensionsTests.cs | 2 +- .../Validators/ObjectValidatorTests.cs | 16 ++++++++-------- .../RateLimiter.cs | 9 ++++++++- .../Extensions/EnumHelper.cs | 9 +++++---- src/Directory.Build.props | 9 ++++++--- src/Package.Build.props | 6 +++--- 19 files changed, 54 insertions(+), 47 deletions(-) create mode 100644 src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/.editorconfig create mode 100644 src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/.editorconfig diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/ExcludeFromSamplingTelemetryInitializerRulesTests.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/ExcludeFromSamplingTelemetryInitializerRulesTests.cs index 8897501..5576e28 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/ExcludeFromSamplingTelemetryInitializerRulesTests.cs +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/ExcludeFromSamplingTelemetryInitializerRulesTests.cs @@ -7,7 +7,7 @@ namespace Allegro.Extensions.ApplicationInsights.Demo.UnitTests; -internal class +internal sealed class CustomExcludeFromSamplingTelemetryInitializer : ExcludeFromSamplingTelemetryInitializer { diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Controllers/WeatherForecastController.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Controllers/WeatherForecastController.cs index adff118..be7f168 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Controllers/WeatherForecastController.cs +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Controllers/WeatherForecastController.cs @@ -13,10 +13,7 @@ public record WeatherForecast(DateTime Date, int TemperatureC, string Summary); [Route("[controller]")] public class WeatherForecastController : ControllerBase { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; + private static readonly string[] Summaries = ["Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"]; private readonly ILogger _logger; private readonly IHttpClientFactory _httpClientFactory; diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/.editorconfig b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/.editorconfig index c6cfa88..ab04c65 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/.editorconfig +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/.editorconfig @@ -1,2 +1,5 @@ [*.{cs,fs}] -dotnet_diagnostic.CS1591.severity = none \ No newline at end of file +dotnet_diagnostic.CS1591.severity = none + +# CA1861: Avoid constant arrays as arguments +dotnet_diagnostic.CA1861.severity = silent diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/PrometheusMetrics.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/PrometheusMetrics.cs index d6f8223..5c1c6e6 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/PrometheusMetrics.cs +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/PrometheusMetrics.cs @@ -21,11 +21,8 @@ private static Histogram DependencyHistogramFactory(IMetricFactory metrics) "The duration of dependency call", new HistogramConfiguration { - LabelNames = new[] - { - "service", "type", "target", "name", "operation_name", "success", "resultCode" - }, - Buckets = new[] { 0.008, 0.016, 0.032, 0.064, 0.128, 0.512, 1, 4, 16 } + LabelNames = ["service", "type", "target", "name", "operation_name", "success", "resultCode"], + Buckets = [0.008, 0.016, 0.032, 0.064, 0.128, 0.512, 1, 4, 16] }); } @@ -36,8 +33,8 @@ private static Histogram RequestHistogramFactory(IMetricFactory metrics) "The duration of request", new HistogramConfiguration { - LabelNames = new[] { "service", "name", "success", "resultCode" }, - Buckets = new[] { 0.008, 0.016, 0.032, 0.064, 0.128, 0.512, 1, 4, 16 } + LabelNames = ["service", "name", "success", "resultCode"], + Buckets = [0.008, 0.016, 0.032, 0.064, 0.128, 0.512, 1, 4, 16] }); } } \ No newline at end of file diff --git a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/.editorconfig b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/.editorconfig new file mode 100644 index 0000000..6902e1a --- /dev/null +++ b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/.editorconfig @@ -0,0 +1,3 @@ +[*.cs] +# CS1591: Missing XML comment for publicly visible type or member +dotnet_diagnostic.CS1591.severity = none \ No newline at end of file diff --git a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj index a48c3ee..edb5df5 100644 --- a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj +++ b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj @@ -1,9 +1,5 @@ - - false - IDE0005 - diff --git a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Tests.Unit/Allegro.Extensions.AspNetCore.Tests.Unit.csproj b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Tests.Unit/Allegro.Extensions.AspNetCore.Tests.Unit.csproj index 1b42da6..490d799 100644 --- a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Tests.Unit/Allegro.Extensions.AspNetCore.Tests.Unit.csproj +++ b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Tests.Unit/Allegro.Extensions.AspNetCore.Tests.Unit.csproj @@ -1,10 +1,5 @@ - - false - false - IDE0005 - diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/.editorconfig b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/.editorconfig new file mode 100644 index 0000000..ab73c2d --- /dev/null +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] + +# CS1591: Missing XML comment for publicly visible type or member +dotnet_diagnostic.CS1591.severity = silent diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Helpers/FakeStartup.cs b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Helpers/FakeStartup.cs index e3003ed..95380f9 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Helpers/FakeStartup.cs +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Helpers/FakeStartup.cs @@ -18,7 +18,8 @@ public FakeStartup(IConfiguration configuration) public void ConfigureServices(IServiceCollection services) { - var connectionString = _configuration["PostgresSDK:ConnectionString"]; + var connectionString = _configuration["PostgresSDK:ConnectionString"] + ?? throw new InvalidOperationException("Connection string not found in configuration."); services .AddDapperClient() diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj index b100248..29741c8 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/DapperPostgresBinaryCopyClient.cs b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/DapperPostgresBinaryCopyClient.cs index 775e9d6..638eb2d 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/DapperPostgresBinaryCopyClient.cs +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/DapperPostgresBinaryCopyClient.cs @@ -8,7 +8,7 @@ namespace Allegro.Extensions.Dapper.Postgres; /// -internal class DapperPostgresBinaryCopyClient : IDapperPostgresBinaryCopyClient +internal sealed class DapperPostgresBinaryCopyClient : IDapperPostgresBinaryCopyClient { private readonly PostgresDatabaseConnectionFactory _databaseConnectionFactory; diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Factories/PostgresDatabaseConnectionFactory.cs b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Factories/PostgresDatabaseConnectionFactory.cs index 709b69b..e6f9eb6 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Factories/PostgresDatabaseConnectionFactory.cs +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Factories/PostgresDatabaseConnectionFactory.cs @@ -8,7 +8,7 @@ namespace Allegro.Extensions.Dapper.Postgres.Factories; /// /// Database connection factory for Postgres database. /// -internal class PostgresDatabaseConnectionFactory : IDatabaseConnectionFactory +internal sealed class PostgresDatabaseConnectionFactory : IDatabaseConnectionFactory { private readonly DatabaseConfiguration _databaseConfiguration; diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/DapperClient.cs b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/DapperClient.cs index f713148..da01537 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/DapperClient.cs +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/DapperClient.cs @@ -8,7 +8,7 @@ namespace Allegro.Extensions.Dapper; /// Database client which initializes connection to a database, /// performs operation and makes sure that connection is closed. /// -internal class DapperClient : IDapperClient +internal sealed class DapperClient : IDapperClient { private readonly IDatabaseConnectionFactory _databaseConnectionFactory; diff --git a/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Extensions/MoneyExtensionsTests.cs b/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Extensions/MoneyExtensionsTests.cs index b12b767..959e9d9 100644 --- a/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Extensions/MoneyExtensionsTests.cs +++ b/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Extensions/MoneyExtensionsTests.cs @@ -76,7 +76,7 @@ public StructWithMoney(decimal money) } } - private class ClassWithMoney + private sealed class ClassWithMoney { public Money Money { get; } diff --git a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Validators/ObjectValidatorTests.cs b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Validators/ObjectValidatorTests.cs index 69400c1..c706e0c 100644 --- a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Validators/ObjectValidatorTests.cs +++ b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Validators/ObjectValidatorTests.cs @@ -267,7 +267,7 @@ public record StaticConstructorMethodCircularDependencyObject(decimal Value) public static StaticConstructorMethodCircularDependencyObject Empty => new(0); } - private class NonNullableObject + private sealed class NonNullableObject { public int Number { get; init; } @@ -296,16 +296,15 @@ private class NonNullableObject public Dictionary> NonNullableDictionaryOfIEnumerable { get; init; } } - private record NonNullableKey + private sealed record NonNullableKey { public int Number { get; init; } public string String { get; init; } } - private class PrivatePropertiesObject + private sealed class PrivatePropertiesObject { -#pragma warning restore IDE0051 public string PublicText { get; init; } #pragma warning disable IDE0051 @@ -316,16 +315,17 @@ private class PrivatePropertiesObject private string String { get; init; } private string? StringNullable { get; init; } +#pragma warning restore IDE0051 } - private class NonNullableObjectChild + private sealed class NonNullableObjectChild { public int Number { get; init; } public string String { get; init; } } - private class NullableObject + private sealed class NullableObject { public int? Number { get; init; } @@ -352,14 +352,14 @@ private class NullableObject public Dictionary?>? NullableDictionaryOfIEnumerable { get; init; } } - private class NullableKey + private sealed class NullableKey { public int? Number { get; init; } public string? String { get; init; } } - private class NullableObjectChild + private sealed class NullableObjectChild { public int? Number { get; init; } diff --git a/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting/RateLimiter.cs b/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting/RateLimiter.cs index 0938814..f97f481 100644 --- a/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting/RateLimiter.cs +++ b/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting/RateLimiter.cs @@ -12,7 +12,7 @@ namespace Allegro.Extensions.RateLimiting /// Also first execution of each unique operationName will be synchronous until its weight is calculated, to prevent /// any chance of exceeding the MaxRate. /// - public class RateLimiter : IRateLimiterWithVariableRate + public sealed class RateLimiter : IRateLimiterWithVariableRate, IDisposable { private readonly SemaphoreSlim _delaySemaphore = new(1, 1); private readonly SemaphoreSlim _logUsageSemaphore = new(1, 1); @@ -174,6 +174,13 @@ public async Task ExecuteWithEstimatedWeightAsync( return result; } + /// + public void Dispose() + { + _delaySemaphore.Dispose(); + _logUsageSemaphore.Dispose(); + } + private async Task CalculateWeightAndLogUsage( string operationName, T result, diff --git a/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization/Extensions/EnumHelper.cs b/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization/Extensions/EnumHelper.cs index e61ed04..ac918f4 100644 --- a/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization/Extensions/EnumHelper.cs +++ b/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization/Extensions/EnumHelper.cs @@ -1,4 +1,5 @@ using System.Collections.Concurrent; +using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.Serialization; @@ -28,19 +29,19 @@ public static TEnum Parse(string enumValue) } /// - /// Tires to parse enum value to TEnum type + /// Tires to parse enum value to TEnum type /// - public static bool TryParse(string enumValue, out TEnum? result) + public static bool TryParse(string enumValue, [NotNullWhen(true)] out TEnum? result) where TEnum : struct, Enum { var map = GetValueMap(); - if (!map.ContainsKey(enumValue)) + if (!map.TryGetValue(enumValue, out var value)) { result = null; return false; } - result = (TEnum)map[enumValue].EnumValue; + result = (TEnum)value.EnumValue; return true; } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 9667540..db066f5 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,14 +3,17 @@ net8.0 false + true + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), version.xml)) + $([MSBuild]::EnsureTrailingSlash($(SolutionDir))) true - $(SolutionDir)\bin\$(MSBuildProjectName) - $(SolutionDir)\obj\$(MSBuildProjectName) - $(SolutionDir)\nuget + $(SolutionDir)bin\$(MSBuildProjectName) + $(SolutionDir)obj\$(MSBuildProjectName) + $(SolutionDir)nuget \ No newline at end of file diff --git a/src/Package.Build.props b/src/Package.Build.props index 08b540e..8f79fcd 100644 --- a/src/Package.Build.props +++ b/src/Package.Build.props @@ -14,9 +14,9 @@ - - + + - + \ No newline at end of file From f20bbe8b029b7781e82f64b5b29cbaf99fa9be74 Mon Sep 17 00:00:00 2001 From: Amadeusz Sadowski Date: Wed, 16 Jul 2025 12:17:31 +0200 Subject: [PATCH 2/7] refactor: move InternalsVisibleTo into csproj --- ...ions.ApplicationInsights.AspNetCore.csproj | 4 ++ .../InternalsVisibleTo.cs | 6 --- ...Extensions.ApplicationInsights.Demo.csproj | 45 +++++++++---------- .../InternalsVisibleTo.cs | 4 -- ...ions.ApplicationInsights.Prometheus.csproj | 43 +++++++++--------- .../InternalsVisibleTo.cs | 3 -- .../Allegro.Extensions.AspNetCore.csproj | 3 ++ .../InternalsVisibleTo.cs | 3 -- .../Allegro.Extensions.Cqrs.csproj | 3 ++ .../InternalsVisibleTo.cs | 5 --- .../Allegro.Extensions.DependencyCall.csproj | 5 ++- 11 files changed, 56 insertions(+), 68 deletions(-) delete mode 100644 src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/InternalsVisibleTo.cs delete mode 100644 src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/InternalsVisibleTo.cs delete mode 100644 src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/InternalsVisibleTo.cs delete mode 100644 src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore/InternalsVisibleTo.cs delete mode 100644 src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/InternalsVisibleTo.cs diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj index 8054351..9817fa3 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj @@ -25,4 +25,8 @@ runtime; compile; build; native; contentfiles; analyzers + + + + diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/InternalsVisibleTo.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/InternalsVisibleTo.cs deleted file mode 100644 index 095ceb5..0000000 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/InternalsVisibleTo.cs +++ /dev/null @@ -1,6 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo( - "Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests")] -[assembly: InternalsVisibleTo( - "Allegro.Extensions.ApplicationInsights.Demo.UnitTests")] \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj index 5e327ac..a7bfd26 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj @@ -1,26 +1,25 @@ + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; compile; build; native; contentfiles; analyzers + + - - enable - + + + + - - - - - - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; compile; build; native; contentfiles; analyzers - - - - - - - - + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/InternalsVisibleTo.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/InternalsVisibleTo.cs deleted file mode 100644 index 5bf3168..0000000 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/InternalsVisibleTo.cs +++ /dev/null @@ -1,4 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo( - "Allegro.Extensions.ApplicationInsights.Demo.UnitTests")] \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj index fea3cf8..670dbd9 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj @@ -1,25 +1,24 @@ + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; compile; build; native; contentfiles; analyzers + + - - enable - true - - - - - - - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; compile; build; native; contentfiles; analyzers - - + + + - - - - + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/InternalsVisibleTo.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/InternalsVisibleTo.cs deleted file mode 100644 index 62fb9f0..0000000 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/InternalsVisibleTo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests")] \ No newline at end of file diff --git a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.csproj b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.csproj index ead0131..0c9a71d 100644 --- a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.csproj +++ b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.csproj @@ -8,4 +8,7 @@ + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore/InternalsVisibleTo.cs b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore/InternalsVisibleTo.cs deleted file mode 100644 index e3b7543..0000000 --- a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore/InternalsVisibleTo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Allegro.Extensions.AspNetCore.Tests.Unit")] \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.csproj index 5d8d005..89042df 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.csproj @@ -7,4 +7,7 @@ + + + diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/InternalsVisibleTo.cs b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/InternalsVisibleTo.cs deleted file mode 100644 index 27996fd..0000000 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/InternalsVisibleTo.cs +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) PlaceholderCompany. All rights reserved. - -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Allegro.Extensions.Cqrs.Tests.Unit")] \ No newline at end of file diff --git a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj index 78ed55c..b35f8b5 100644 --- a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj +++ b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj @@ -6,17 +6,18 @@ ${NoWarn},CS8618,SA1636 - + - + + From 7b7b17adf025bf8942da4b949e57ff273b39b289 Mon Sep 17 00:00:00 2001 From: Amadeusz Sadowski Date: Wed, 16 Jul 2025 14:18:46 +0200 Subject: [PATCH 3/7] refactor: cleanup NoWarn, warnings and other unnecessary csproj properties --- .../.editorconfig | 2 - .../.editorconfig | 2 - .../.editorconfig | 3 ++ .../Controllers/WeatherForecastController.cs | 2 - .../CustomDependencyForFilter.cs | 1 - .../.editorconfig | 4 +- ...llegro.Extensions.Cqrs.Abstractions.csproj | 1 - .../Allegro.Extensions.Cqrs.Demo.csproj | 3 -- ...o.Extensions.Cqrs.FluentValidations.csproj | 1 - .../Allegro.Extensions.Cqrs.Tests.Unit.csproj | 4 -- ...s.Dapper.Postgres.Tests.Integration.csproj | 3 -- .../Abstractions/DbType.cs | 3 +- .../InvalidDbConnectionTypeException.cs | 11 +---- ...ensions.DependencyCall.Abstractions.csproj | 3 +- ...s.DependencyCall.Metrics.Prometheus.csproj | 3 +- ...xtensions.DependencyCall.Tests.Unit.csproj | 4 -- .../Allegro.Extensions.DependencyCall.csproj | 1 - ...ro.Extensions.Financials.Tests.Unit.csproj | 4 -- .../ValueObjects/Currency.cs | 3 +- .../ValueObjects/Money.Operators.cs | 4 +- ...egro.Extensions.Globalization.Tests.csproj | 5 --- ...Extensions.Identifiers.Abstractions.csproj | 1 - ...o.Extensions.Identifiers.AspNetCore.csproj | 1 - .../.editorconfig | 3 ++ ...Allegro.Extensions.Identifiers.Demo.csproj | 3 -- .../Identifiers/OrderId.cs | 3 -- ...s.NullableReferenceTypes.Tests.Unit.csproj | 5 --- .../Validators/ObjectValidatorTests.cs | 30 +++++++------- ...o.Extensions.NullableReferenceTypes.csproj | 1 - .../Validators/ObjectValidator.cs | 41 +++++++++---------- ....Extensions.RateLimiting.Tests.Unit.csproj | 4 -- ...Extensions.Serialization.Tests.Unit.csproj | 5 --- ...ro.Extensions.Validators.Tests.Unit.csproj | 5 --- .../Allegro.Extensions.Validators.csproj | 1 - 34 files changed, 51 insertions(+), 119 deletions(-) delete mode 100644 src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/.editorconfig delete mode 100644 src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/.editorconfig create mode 100644 src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/.editorconfig create mode 100644 src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/.editorconfig diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/.editorconfig b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/.editorconfig deleted file mode 100644 index c6cfa88..0000000 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/.editorconfig +++ /dev/null @@ -1,2 +0,0 @@ -[*.{cs,fs}] -dotnet_diagnostic.CS1591.severity = none \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/.editorconfig b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/.editorconfig deleted file mode 100644 index c6cfa88..0000000 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/.editorconfig +++ /dev/null @@ -1,2 +0,0 @@ -[*.{cs,fs}] -dotnet_diagnostic.CS1591.severity = none \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/.editorconfig b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/.editorconfig new file mode 100644 index 0000000..6902e1a --- /dev/null +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/.editorconfig @@ -0,0 +1,3 @@ +[*.cs] +# CS1591: Missing XML comment for publicly visible type or member +dotnet_diagnostic.CS1591.severity = none \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Controllers/WeatherForecastController.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Controllers/WeatherForecastController.cs index be7f168..4daaac0 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Controllers/WeatherForecastController.cs +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Controllers/WeatherForecastController.cs @@ -3,8 +3,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - namespace Allegro.Extensions.ApplicationInsights.Demo.Controllers; public record WeatherForecast(DateTime Date, int TemperatureC, string Summary); diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/CustomDependencyForFilter.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/CustomDependencyForFilter.cs index be43519..f2d5bab 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/CustomDependencyForFilter.cs +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/CustomDependencyForFilter.cs @@ -1,6 +1,5 @@ using Allegro.Extensions.ApplicationInsights.AspNetCore; using Microsoft.ApplicationInsights.DataContracts; -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member namespace Allegro.Extensions.ApplicationInsights.Demo; diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/.editorconfig b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/.editorconfig index ab04c65..a9405b8 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/.editorconfig +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/.editorconfig @@ -1,5 +1,3 @@ -[*.{cs,fs}] -dotnet_diagnostic.CS1591.severity = none - +[*.cs] # CA1861: Avoid constant arrays as arguments dotnet_diagnostic.CA1861.severity = silent diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj index 49bf788..f4ddacf 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj @@ -2,7 +2,6 @@ Allegro.Extensions.Cqrs.Abstractions Contains Cqrs basic abstractions used in Allegro services - true diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj index 3be5c25..b69fdc7 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj @@ -1,7 +1,4 @@ - - true - diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj index e611d1b..1d03635 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj @@ -2,7 +2,6 @@ Allegro.Extensions.Cqrs.FluentValidations Contains FluentVlidations extension for Allegro.Extensions.Cqrs - true diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj index 5e2da67..613d450 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj @@ -1,8 +1,4 @@ - - false - true - diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Allegro.Extensions.Dapper.Postgres.Tests.Integration.csproj b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Allegro.Extensions.Dapper.Postgres.Tests.Integration.csproj index f29dc30..92af97e 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Allegro.Extensions.Dapper.Postgres.Tests.Integration.csproj +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Allegro.Extensions.Dapper.Postgres.Tests.Integration.csproj @@ -1,8 +1,5 @@ - - false - diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Abstractions/DbType.cs b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Abstractions/DbType.cs index e214dec..4b1c00c 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Abstractions/DbType.cs +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Abstractions/DbType.cs @@ -1,6 +1,5 @@ using System.Diagnostics.CodeAnalysis; -#pragma warning disable CS1591 namespace Allegro.Extensions.Dapper.Postgres.Abstractions; /// @@ -9,10 +8,12 @@ namespace Allegro.Extensions.Dapper.Postgres.Abstractions; [SuppressMessage("Naming", "CA1720:Identifier contains type name", Justification = "Purpose of that enum")] public enum DbType { +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member Int, BigInt, Text, Date, Decimal, Guid, +#pragma warning restore CS1591 } \ No newline at end of file diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Exceptions/InvalidDbConnectionTypeException.cs b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Exceptions/InvalidDbConnectionTypeException.cs index 1794a9c..047556e 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Exceptions/InvalidDbConnectionTypeException.cs +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Exceptions/InvalidDbConnectionTypeException.cs @@ -1,14 +1,7 @@ -#pragma warning disable CS1591 - namespace Allegro.Extensions.Dapper.Postgres.Exceptions; /// /// Exception which indicates invalid underlying DbConnection type. /// -public class InvalidDbConnectionTypeException : Exception -{ - public InvalidDbConnectionTypeException(string expectedType) - : base($"Invalid DbConnectionType, expected type: {expectedType}") - { - } -} \ No newline at end of file +public class InvalidDbConnectionTypeException(string expectedType) + : Exception($"Invalid DbConnectionType, expected type: {expectedType}"); \ No newline at end of file diff --git a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Abstractions/Allegro.Extensions.DependencyCall.Abstractions.csproj b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Abstractions/Allegro.Extensions.DependencyCall.Abstractions.csproj index 40418c3..480b8c6 100644 --- a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Abstractions/Allegro.Extensions.DependencyCall.Abstractions.csproj +++ b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Abstractions/Allegro.Extensions.DependencyCall.Abstractions.csproj @@ -2,7 +2,6 @@ Allegro.Extensions.DependencyCall.Abstractions Contains DependencyCall package abstractions - ${NoWarn},CS8618,SA1636 - + \ No newline at end of file diff --git a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj index bdd5f99..47aec19 100644 --- a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj +++ b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj @@ -2,7 +2,6 @@ Allegro.Extensions.DependencyCall.Metrics.Prometheus Contains prometheus based metrics for dependency call - ${NoWarn},CS8618,SA1636 @@ -15,4 +14,4 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Tests.Unit/Allegro.Extensions.DependencyCall.Tests.Unit.csproj b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Tests.Unit/Allegro.Extensions.DependencyCall.Tests.Unit.csproj index 4ae1499..ad00bd1 100644 --- a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Tests.Unit/Allegro.Extensions.DependencyCall.Tests.Unit.csproj +++ b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Tests.Unit/Allegro.Extensions.DependencyCall.Tests.Unit.csproj @@ -1,9 +1,5 @@ - - false - ${NoWarn},CS8618,CS1591 - diff --git a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj index b35f8b5..bfc494a 100644 --- a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj +++ b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj @@ -3,7 +3,6 @@ Allegro.Extensions.DependencyCall Contains DependencyCall tool - ${NoWarn},CS8618,SA1636 diff --git a/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Allegro.Extensions.Financials.Tests.Unit.csproj b/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Allegro.Extensions.Financials.Tests.Unit.csproj index 5755f19..8800523 100644 --- a/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Allegro.Extensions.Financials.Tests.Unit.csproj +++ b/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Allegro.Extensions.Financials.Tests.Unit.csproj @@ -1,9 +1,5 @@ - - false - false - diff --git a/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials/ValueObjects/Currency.cs b/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials/ValueObjects/Currency.cs index 712937c..d73c332 100644 --- a/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials/ValueObjects/Currency.cs +++ b/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials/ValueObjects/Currency.cs @@ -1,5 +1,4 @@ using System.Runtime.Serialization; -#pragma warning disable CS1591 namespace Allegro.Extensions.Financials.ValueObjects; @@ -9,6 +8,8 @@ namespace Allegro.Extensions.Financials.ValueObjects; /// public enum Currency { +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member [EnumMember(Value = "PLN")] PLN = 985, +#pragma warning restore CS1591 } \ No newline at end of file diff --git a/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials/ValueObjects/Money.Operators.cs b/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials/ValueObjects/Money.Operators.cs index 7a4f410..147d57c 100644 --- a/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials/ValueObjects/Money.Operators.cs +++ b/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials/ValueObjects/Money.Operators.cs @@ -1,9 +1,8 @@ -#pragma warning disable CS1591 - namespace Allegro.Extensions.Financials.ValueObjects; public partial record Money { +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member // Money & Money public static Money operator +(Money? m1, Money? m2) => Calculate(m1?.Amount, m1?.Currency, m2?.Amount, m2?.Currency, CalculateOperator.Add); @@ -68,6 +67,7 @@ public partial record Money public static bool operator >=(Money? m1, decimal? d2) => Compare(m1?.Amount, m1?.Currency, d2, c2: null, CompareOperator.MoreOrEquals); +#pragma warning restore CS1591 private enum CalculateOperator { diff --git a/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.Tests/Allegro.Extensions.Globalization.Tests.csproj b/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.Tests/Allegro.Extensions.Globalization.Tests.csproj index 5016838..fbc0655 100644 --- a/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.Tests/Allegro.Extensions.Globalization.Tests.csproj +++ b/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.Tests/Allegro.Extensions.Globalization.Tests.csproj @@ -1,10 +1,5 @@ - - false - AnyCPU;x64 - false - diff --git a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Abstractions/Allegro.Extensions.Identifiers.Abstractions.csproj b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Abstractions/Allegro.Extensions.Identifiers.Abstractions.csproj index 01018d7..be4a0f3 100644 --- a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Abstractions/Allegro.Extensions.Identifiers.Abstractions.csproj +++ b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Abstractions/Allegro.Extensions.Identifiers.Abstractions.csproj @@ -3,7 +3,6 @@ Allegro.Extensions.Identifiers.Abstractions Contains strongly typed identifiers abstractions. - CS1574 diff --git a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj index 98c250c..804ce92 100644 --- a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj +++ b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj @@ -3,7 +3,6 @@ Allegro.Extensions.Identifiers.AspNetCore Contains strongly typed identifiers extensions for swagger. - CS1574 diff --git a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/.editorconfig b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/.editorconfig new file mode 100644 index 0000000..6902e1a --- /dev/null +++ b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/.editorconfig @@ -0,0 +1,3 @@ +[*.cs] +# CS1591: Missing XML comment for publicly visible type or member +dotnet_diagnostic.CS1591.severity = none \ No newline at end of file diff --git a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj index 69f4a94..dd8e4a5 100644 --- a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj +++ b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj @@ -1,8 +1,5 @@ - - false - diff --git a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Identifiers/OrderId.cs b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Identifiers/OrderId.cs index fb3f376..b7ec865 100644 --- a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Identifiers/OrderId.cs +++ b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Identifiers/OrderId.cs @@ -1,6 +1,3 @@ -// Copyright (c) PlaceholderCompany. All rights reserved. -#pragma warning disable 1591 - using Allegro.Extensions.Identifiers.Abstractions; using Meziantou.Framework.Annotations; diff --git a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Allegro.Extensions.NullableReferenceTypes.Tests.Unit.csproj b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Allegro.Extensions.NullableReferenceTypes.Tests.Unit.csproj index 390acb2..7bc8c55 100644 --- a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Allegro.Extensions.NullableReferenceTypes.Tests.Unit.csproj +++ b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Allegro.Extensions.NullableReferenceTypes.Tests.Unit.csproj @@ -1,10 +1,5 @@ - - false - ${NoWarn},CS8618 - false - diff --git a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Validators/ObjectValidatorTests.cs b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Validators/ObjectValidatorTests.cs index c706e0c..1c1cf7a 100644 --- a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Validators/ObjectValidatorTests.cs +++ b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Validators/ObjectValidatorTests.cs @@ -271,48 +271,48 @@ private sealed class NonNullableObject { public int Number { get; init; } - public string String { get; init; } + public required string String { get; init; } - public string[] StringArray { get; init; } + public required string[] StringArray { get; init; } public DateTimeOffset Date { get; init; } - public NonNullableObjectChild NonNullable { get; init; } + public required NonNullableObjectChild NonNullable { get; init; } - public IEnumerable NonNullableIEnumerable { get; init; } + public required IEnumerable NonNullableIEnumerable { get; init; } - public ICollection NonNullableICollection { get; init; } + public required ICollection NonNullableICollection { get; init; } - public IList NonNullableIList { get; init; } + public required IList NonNullableIList { get; init; } - public List NonNullableList { get; init; } + public required List NonNullableList { get; init; } - public NonNullableObjectChild[] NonNullableArray { get; init; } + public required NonNullableObjectChild[] NonNullableArray { get; init; } - public IDictionary NonNullableIDictionary { get; init; } + public required IDictionary NonNullableIDictionary { get; init; } - public Dictionary NonNullableDictionary { get; init; } + public required Dictionary NonNullableDictionary { get; init; } - public Dictionary> NonNullableDictionaryOfIEnumerable { get; init; } + public required Dictionary> NonNullableDictionaryOfIEnumerable { get; init; } } private sealed record NonNullableKey { public int Number { get; init; } - public string String { get; init; } + public required string String { get; init; } } private sealed class PrivatePropertiesObject { - public string PublicText { get; init; } + public required string PublicText { get; init; } #pragma warning disable IDE0051 private int Number { get; init; } private int? NumberNullable { get; init; } - private string String { get; init; } + private string String { get; init; } = null!; private string? StringNullable { get; init; } #pragma warning restore IDE0051 @@ -322,7 +322,7 @@ private sealed class NonNullableObjectChild { public int Number { get; init; } - public string String { get; init; } + public required string String { get; init; } } private sealed class NullableObject diff --git a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.csproj b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.csproj index 62d811d..0dde5b6 100644 --- a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.csproj +++ b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.csproj @@ -3,7 +3,6 @@ Allegro.Extensions.NullableReferenceTypes Contains useful classes and extensions for projects which use NRT. - ${NoWarn},CS8618 \ No newline at end of file diff --git a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes/Validators/ObjectValidator.cs b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes/Validators/ObjectValidator.cs index f31c61b..50b6e28 100644 --- a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes/Validators/ObjectValidator.cs +++ b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes/Validators/ObjectValidator.cs @@ -1,5 +1,7 @@ using System.Collections; using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Reflection; namespace Allegro.Extensions.NullableReferenceTypes.Validators; @@ -69,11 +71,11 @@ private static bool TryValidateCollections(Type type, object instance, string pr var result = false; if (type.IsArray) { - var elementType = type.GetElementType(); + var elementType = type.GetElementType() ?? throw new UnreachableException("Array element type cannot be null."); var index = 0; foreach (var item in (Array)instance) { - Validate(elementType!, item, propertyPath + $"[{index}]"); + Validate(elementType, item, propertyPath + $"[{index}]"); index++; } @@ -87,8 +89,8 @@ private static bool TryValidateCollections(Type type, object instance, string pr var dictionary = (IDictionary)instance; foreach (DictionaryEntry item in dictionary) { - Validate(underlyingKeyType!, item.Key, propertyPath + $"[{item.Key}]"); - Validate(underlyingValueType!, item.Value, propertyPath + $"[{item.Key}]"); + Validate(underlyingKeyType, item.Key, propertyPath + $"[{item.Key}]"); + Validate(underlyingValueType, item.Value, propertyPath + $"[{item.Key}]"); } result = true; @@ -99,7 +101,7 @@ private static bool TryValidateCollections(Type type, object instance, string pr var index = 0; foreach (var item in collection) { - Validate(underlyingType!, item, propertyPath + $"[{index}]"); + Validate(underlyingType, item, propertyPath + $"[{index}]"); index++; } @@ -109,12 +111,11 @@ private static bool TryValidateCollections(Type type, object instance, string pr return result; } - private static bool IsEnumerableType(Type type, out Type? underlyingType) + private static bool IsEnumerableType(Type type, [NotNullWhen(true)] out Type? underlyingType) { - underlyingType = null; - if (!type.IsGenericType || !IsAssignableToGenericType(type, typeof(IEnumerable<>))) { + underlyingType = null; return false; } @@ -123,13 +124,12 @@ private static bool IsEnumerableType(Type type, out Type? underlyingType) return true; } - private static bool IsDictionaryType(Type type, out Type? underlyingKeyType, out Type? underlyingValueType) + private static bool IsDictionaryType(Type type, [NotNullWhen(true)] out Type? underlyingKeyType, [NotNullWhen(true)] out Type? underlyingValueType) { - underlyingKeyType = null; - underlyingValueType = null; - if (!type.IsGenericType || !IsAssignableToGenericType(type, typeof(IDictionary<,>))) { + underlyingKeyType = null; + underlyingValueType = null; return false; } @@ -171,20 +171,19 @@ private static bool IsNullable(PropertyInfo property) var nullable = property.CustomAttributes .FirstOrDefault(x => x.AttributeType.FullName == "System.Runtime.CompilerServices.NullableAttribute"); - if (nullable != null && nullable.ConstructorArguments.Count == 1) + if (nullable is { ConstructorArguments: [{ Value: { } } attributeArgument] }) { - var attributeArgument = nullable.ConstructorArguments[0]; if (attributeArgument.ArgumentType == typeof(byte[])) { - var args = (ReadOnlyCollection)attributeArgument.Value!; - if (args.Count > 0 && args[0].ArgumentType == typeof(byte)) + var args = (ReadOnlyCollection)attributeArgument.Value; + if (args is [{ Value: { } } arg, ..] && arg.ArgumentType == typeof(byte)) { - return (byte)args[0].Value! == 2; + return (byte)arg.Value == 2; } } else if (attributeArgument.ArgumentType == typeof(byte)) { - return (byte)attributeArgument.Value! == 2; + return (byte)attributeArgument.Value == 2; } } @@ -194,11 +193,9 @@ private static bool IsNullable(PropertyInfo property) .FirstOrDefault( x => x.AttributeType.FullName == "System.Runtime.CompilerServices.NullableContextAttribute"); - if (context != null && - context.ConstructorArguments.Count == 1 && - context.ConstructorArguments[0].ArgumentType == typeof(byte)) + if (context is { ConstructorArguments: [{ Value: { } value } argument] } && argument.ArgumentType == typeof(byte)) { - return (byte)context.ConstructorArguments[0].Value! == 2; + return (byte)value == 2; } } diff --git a/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting.Tests.Unit/Allegro.Extensions.RateLimiting.Tests.Unit.csproj b/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting.Tests.Unit/Allegro.Extensions.RateLimiting.Tests.Unit.csproj index 604ad73..2f119bc 100644 --- a/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting.Tests.Unit/Allegro.Extensions.RateLimiting.Tests.Unit.csproj +++ b/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting.Tests.Unit/Allegro.Extensions.RateLimiting.Tests.Unit.csproj @@ -1,9 +1,5 @@ - - false - false - diff --git a/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization.Tests.Unit/Allegro.Extensions.Serialization.Tests.Unit.csproj b/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization.Tests.Unit/Allegro.Extensions.Serialization.Tests.Unit.csproj index 23d096a..6815eb2 100644 --- a/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization.Tests.Unit/Allegro.Extensions.Serialization.Tests.Unit.csproj +++ b/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization.Tests.Unit/Allegro.Extensions.Serialization.Tests.Unit.csproj @@ -1,10 +1,5 @@ - - false - AnyCPU;x64 - false - diff --git a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/Allegro.Extensions.Validators.Tests.Unit.csproj b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/Allegro.Extensions.Validators.Tests.Unit.csproj index edbcff4..cd8cc28 100644 --- a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/Allegro.Extensions.Validators.Tests.Unit.csproj +++ b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/Allegro.Extensions.Validators.Tests.Unit.csproj @@ -1,10 +1,5 @@ - - false - ${NoWarn},CS8618 - false - diff --git a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj index 93d3d8c..e6136f3 100644 --- a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj +++ b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj @@ -3,7 +3,6 @@ Allegro.Extensions.Validators Contains useful classes and extensions validators. - ${NoWarn},CS8618,SA1636 From 213b8b35729a8500bfeb8660d60a8586b53a60f1 Mon Sep 17 00:00:00 2001 From: Amadeusz Sadowski Date: Wed, 16 Jul 2025 14:53:16 +0200 Subject: [PATCH 4/7] refactor: unify formatting of csproj files, cleanup duplicated properties --- ...cationInsights.AspNetCore.UnitTests.csproj | 56 +++++++----------- ...ions.ApplicationInsights.AspNetCore.csproj | 41 +++++-------- ....ApplicationInsights.Demo.UnitTests.csproj | 58 +++++++------------ ...Extensions.ApplicationInsights.Demo.csproj | 18 ++---- ...cationInsights.Prometheus.UnitTests.csproj | 54 +++++++---------- ...ions.ApplicationInsights.Prometheus.csproj | 16 +---- .../Allegro.Extensions.AspNetCore.Demo.csproj | 2 +- ...llegro.Extensions.Cqrs.Abstractions.csproj | 2 +- .../Allegro.Extensions.Cqrs.Demo.csproj | 8 +-- ...o.Extensions.Cqrs.FluentValidations.csproj | 24 ++++---- .../Allegro.Extensions.Cqrs.Tests.Unit.csproj | 2 +- .../Allegro.Extensions.Cqrs.csproj | 2 +- .../Allegro.Extensions.Dapper.Postgres.csproj | 4 +- .../Allegro.Extensions.Dapper.csproj | 2 +- ...s.DependencyCall.Metrics.Prometheus.csproj | 8 +-- .../Allegro.Extensions.DependencyCall.csproj | 9 +-- .../Allegro.Extensions.Globalization.csproj | 2 +- ...o.Extensions.Identifiers.AspNetCore.csproj | 4 +- ...Allegro.Extensions.Identifiers.Demo.csproj | 6 +- .../Allegro.Extensions.Validators.csproj | 2 +- 20 files changed, 121 insertions(+), 199 deletions(-) diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests.csproj index 6fdbd5b..b1c6365 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests.csproj @@ -1,36 +1,22 @@ - - - enable - false - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; compile; build; native; contentfiles; analyzers - - - - - - - - - + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj index 9817fa3..7e01c3c 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj @@ -1,32 +1,19 @@ - - - enable - true - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; compile; build; native; contentfiles; analyzers - - + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/Allegro.Extensions.ApplicationInsights.Demo.UnitTests.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/Allegro.Extensions.ApplicationInsights.Demo.UnitTests.csproj index c1760c8..68c3737 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/Allegro.Extensions.ApplicationInsights.Demo.UnitTests.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/Allegro.Extensions.ApplicationInsights.Demo.UnitTests.csproj @@ -1,37 +1,23 @@ - - - enable - false - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; compile; build; native; contentfiles; analyzers - - - - - - - - - - + + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj index a7bfd26..caf55aa 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj @@ -1,24 +1,14 @@ + + + + - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; compile; build; native; contentfiles; analyzers - - - - - - - diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests.csproj index 2639292..bf281fd 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests.csproj @@ -1,35 +1,21 @@ - - - enable - false - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; compile; build; native; contentfiles; analyzers - - - - - - - - - + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj index 670dbd9..394fd29 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj @@ -1,23 +1,13 @@ + + + - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; compile; build; native; contentfiles; analyzers - - - - - - diff --git a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj index edb5df5..c1d937b 100644 --- a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj +++ b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj @@ -4,6 +4,6 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj index f4ddacf..cf9c7bf 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj @@ -8,4 +8,4 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj index b69fdc7..d5558cb 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj @@ -1,9 +1,9 @@ - - - - + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj index 1d03635..2714479 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj @@ -1,13 +1,13 @@ - - Allegro.Extensions.Cqrs.FluentValidations - Contains FluentVlidations extension for Allegro.Extensions.Cqrs - - - - - - - - - + + Allegro.Extensions.Cqrs.FluentValidations + Contains FluentVlidations extension for Allegro.Extensions.Cqrs + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj index 613d450..2705b7a 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj @@ -13,4 +13,4 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.csproj index 89042df..a36350a 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.csproj @@ -10,4 +10,4 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj index 29741c8..34433d3 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj @@ -6,9 +6,9 @@ - + - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.csproj b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.csproj index b63e805..1e8d282 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.csproj +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.csproj @@ -6,7 +6,7 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj index 47aec19..eae5dfa 100644 --- a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj +++ b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj @@ -3,15 +3,15 @@ Allegro.Extensions.DependencyCall.Metrics.Prometheus Contains prometheus based metrics for dependency call - - - + + + + - \ No newline at end of file diff --git a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj index bfc494a..8983e2d 100644 --- a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj +++ b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj @@ -5,18 +5,15 @@ Contains DependencyCall tool - + + + - - - - - diff --git a/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.csproj b/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.csproj index f52632a..ed964d9 100644 --- a/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.csproj +++ b/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.csproj @@ -1,4 +1,4 @@ - + Allegro.Extensions.Globalization diff --git a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj index 804ce92..3fb66a0 100644 --- a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj +++ b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj @@ -6,9 +6,9 @@ - + - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj index dd8e4a5..da29849 100644 --- a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj +++ b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj @@ -1,10 +1,10 @@ - - - + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj index e6136f3..2605688 100644 --- a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj +++ b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj @@ -5,7 +5,7 @@ Contains useful classes and extensions validators. - + From 9484ae134720731f70b23065c93eaae7a14f5b60 Mon Sep 17 00:00:00 2001 From: Amadeusz Sadowski Date: Wed, 16 Jul 2025 15:56:16 +0200 Subject: [PATCH 5/7] refactor: migrate to nuget CPM - Central Package Management --- .gitignore | 1 + ...cationInsights.AspNetCore.UnitTests.csproj | 12 ++++---- ...ions.ApplicationInsights.AspNetCore.csproj | 20 ++++++------- ....ApplicationInsights.Demo.UnitTests.csproj | 12 ++++---- ...Extensions.ApplicationInsights.Demo.csproj | 8 +++--- ...cationInsights.Prometheus.UnitTests.csproj | 10 +++---- ...ions.ApplicationInsights.Prometheus.csproj | 6 ++-- .../Directory.Packages.props | 28 +++++++++++++++++++ .../Allegro.Extensions.AspNetCore.Demo.csproj | 2 +- ...ro.Extensions.AspNetCore.Tests.Unit.csproj | 10 +++---- .../Directory.Packages.props | 14 ++++++++++ ...llegro.Extensions.Cqrs.Abstractions.csproj | 4 +-- .../Allegro.Extensions.Cqrs.Demo.csproj | 2 +- ...o.Extensions.Cqrs.FluentValidations.csproj | 2 +- .../Allegro.Extensions.Cqrs.Tests.Unit.csproj | 12 ++++---- .../Directory.Packages.props | 18 ++++++++++++ ...s.Dapper.Postgres.Tests.Integration.csproj | 14 +++++----- .../Allegro.Extensions.Dapper.Postgres.csproj | 2 +- .../Allegro.Extensions.Dapper.csproj | 4 +-- .../Directory.Packages.props | 18 ++++++++++++ ...s.DependencyCall.Metrics.Prometheus.csproj | 2 +- ...xtensions.DependencyCall.Tests.Unit.csproj | 10 +++---- .../Allegro.Extensions.DependencyCall.csproj | 8 +++--- .../Directory.Packages.props | 18 ++++++++++++ ...ro.Extensions.Financials.Tests.Unit.csproj | 10 +++---- .../Directory.Packages.props | 13 +++++++++ ...egro.Extensions.Globalization.Tests.csproj | 10 +++---- .../Directory.Packages.props | 13 +++++++++ ...Extensions.Identifiers.Abstractions.csproj | 4 +-- ...o.Extensions.Identifiers.AspNetCore.csproj | 2 +- ...Allegro.Extensions.Identifiers.Demo.csproj | 2 +- .../Directory.Packages.props | 11 ++++++++ ...s.NullableReferenceTypes.Tests.Unit.csproj | 12 ++++---- .../Directory.Packages.props | 14 ++++++++++ ....Extensions.RateLimiting.Tests.Unit.csproj | 10 +++---- .../Directory.Packages.props | 13 +++++++++ ...Extensions.Serialization.Tests.Unit.csproj | 10 +++---- .../Directory.Packages.props | 13 +++++++++ ...ro.Extensions.Validators.Tests.Unit.csproj | 10 +++---- .../Allegro.Extensions.Validators.csproj | 10 +++---- .../Directory.Packages.props | 18 ++++++++++++ src/nuget.config | 13 +++++++++ 42 files changed, 315 insertions(+), 110 deletions(-) create mode 100644 src/Allegro.Extensions.ApplicationInsights/Directory.Packages.props create mode 100644 src/Allegro.Extensions.AspNetCore/Directory.Packages.props create mode 100644 src/Allegro.Extensions.Cqrs/Directory.Packages.props create mode 100644 src/Allegro.Extensions.Dapper/Directory.Packages.props create mode 100644 src/Allegro.Extensions.DependencyCall/Directory.Packages.props create mode 100644 src/Allegro.Extensions.Financials/Directory.Packages.props create mode 100644 src/Allegro.Extensions.Globalization/Directory.Packages.props create mode 100644 src/Allegro.Extensions.Identifiers/Directory.Packages.props create mode 100644 src/Allegro.Extensions.NullableReferenceTypes/Directory.Packages.props create mode 100644 src/Allegro.Extensions.RateLimiting/Directory.Packages.props create mode 100644 src/Allegro.Extensions.Serialization/Directory.Packages.props create mode 100644 src/Allegro.Extensions.Validators/Directory.Packages.props create mode 100644 src/nuget.config diff --git a/.gitignore b/.gitignore index 9e7e7fb..78ee638 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ obj/ bin/ build/ deploy/ +nuget/ TestResults/ *.bak *.user diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests.csproj index b1c6365..4ecf9e3 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests.csproj @@ -6,15 +6,15 @@ - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj index 7e01c3c..f81d0f8 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/Allegro.Extensions.ApplicationInsights.AspNetCore.csproj @@ -1,16 +1,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/Allegro.Extensions.ApplicationInsights.Demo.UnitTests.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/Allegro.Extensions.ApplicationInsights.Demo.UnitTests.csproj index 68c3737..327f206 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/Allegro.Extensions.ApplicationInsights.Demo.UnitTests.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo.UnitTests/Allegro.Extensions.ApplicationInsights.Demo.UnitTests.csproj @@ -7,15 +7,15 @@ - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj index caf55aa..dbf8a43 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Demo/Allegro.Extensions.ApplicationInsights.Demo.csproj @@ -4,10 +4,10 @@ - - - - + + + + diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests.csproj index bf281fd..6663e22 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests.csproj @@ -6,14 +6,14 @@ - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj index 394fd29..5217902 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus/Allegro.Extensions.ApplicationInsights.Prometheus.csproj @@ -4,9 +4,9 @@ - - - + + + diff --git a/src/Allegro.Extensions.ApplicationInsights/Directory.Packages.props b/src/Allegro.Extensions.ApplicationInsights/Directory.Packages.props new file mode 100644 index 0000000..f2b25c6 --- /dev/null +++ b/src/Allegro.Extensions.ApplicationInsights/Directory.Packages.props @@ -0,0 +1,28 @@ + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj index c1d937b..a5d93b8 100644 --- a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj +++ b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Demo/Allegro.Extensions.AspNetCore.Demo.csproj @@ -4,6 +4,6 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Tests.Unit/Allegro.Extensions.AspNetCore.Tests.Unit.csproj b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Tests.Unit/Allegro.Extensions.AspNetCore.Tests.Unit.csproj index 490d799..8b7877d 100644 --- a/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Tests.Unit/Allegro.Extensions.AspNetCore.Tests.Unit.csproj +++ b/src/Allegro.Extensions.AspNetCore/Allegro.Extensions.AspNetCore.Tests.Unit/Allegro.Extensions.AspNetCore.Tests.Unit.csproj @@ -4,11 +4,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Allegro.Extensions.AspNetCore/Directory.Packages.props b/src/Allegro.Extensions.AspNetCore/Directory.Packages.props new file mode 100644 index 0000000..3a5d0eb --- /dev/null +++ b/src/Allegro.Extensions.AspNetCore/Directory.Packages.props @@ -0,0 +1,14 @@ + + + true + true + + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj index cf9c7bf..adb3922 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Abstractions/Allegro.Extensions.Cqrs.Abstractions.csproj @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj index d5558cb..edd95d3 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Demo/Allegro.Extensions.Cqrs.Demo.csproj @@ -4,6 +4,6 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj index 2714479..c277a85 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/Allegro.Extensions.Cqrs.FluentValidations.csproj @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj index 2705b7a..33f5227 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.Tests.Unit/Allegro.Extensions.Cqrs.Tests.Unit.csproj @@ -3,14 +3,14 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Directory.Packages.props b/src/Allegro.Extensions.Cqrs/Directory.Packages.props new file mode 100644 index 0000000..a99940b --- /dev/null +++ b/src/Allegro.Extensions.Cqrs/Directory.Packages.props @@ -0,0 +1,18 @@ + + + true + true + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Allegro.Extensions.Dapper.Postgres.Tests.Integration.csproj b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Allegro.Extensions.Dapper.Postgres.Tests.Integration.csproj index 92af97e..6a4a04f 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Allegro.Extensions.Dapper.Postgres.Tests.Integration.csproj +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres.Tests.Integration/Allegro.Extensions.Dapper.Postgres.Tests.Integration.csproj @@ -4,13 +4,13 @@ - - - - - - - + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj index 34433d3..0bfea5e 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.Postgres/Allegro.Extensions.Dapper.Postgres.csproj @@ -9,6 +9,6 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.csproj b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.csproj index 1e8d282..3814657 100644 --- a/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.csproj +++ b/src/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper/Allegro.Extensions.Dapper.csproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Dapper/Directory.Packages.props b/src/Allegro.Extensions.Dapper/Directory.Packages.props new file mode 100644 index 0000000..929ea01 --- /dev/null +++ b/src/Allegro.Extensions.Dapper/Directory.Packages.props @@ -0,0 +1,18 @@ + + + true + true + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj index eae5dfa..d9611fe 100644 --- a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj +++ b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Metrics.Prometheus/Allegro.Extensions.DependencyCall.Metrics.Prometheus.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Tests.Unit/Allegro.Extensions.DependencyCall.Tests.Unit.csproj b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Tests.Unit/Allegro.Extensions.DependencyCall.Tests.Unit.csproj index ad00bd1..9cac6dc 100644 --- a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Tests.Unit/Allegro.Extensions.DependencyCall.Tests.Unit.csproj +++ b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.Tests.Unit/Allegro.Extensions.DependencyCall.Tests.Unit.csproj @@ -5,11 +5,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj index 8983e2d..e3f96c5 100644 --- a/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj +++ b/src/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall/Allegro.Extensions.DependencyCall.csproj @@ -9,10 +9,10 @@ - - - - + + + + diff --git a/src/Allegro.Extensions.DependencyCall/Directory.Packages.props b/src/Allegro.Extensions.DependencyCall/Directory.Packages.props new file mode 100644 index 0000000..718313c --- /dev/null +++ b/src/Allegro.Extensions.DependencyCall/Directory.Packages.props @@ -0,0 +1,18 @@ + + + true + true + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Allegro.Extensions.Financials.Tests.Unit.csproj b/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Allegro.Extensions.Financials.Tests.Unit.csproj index 8800523..2d5413f 100644 --- a/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Allegro.Extensions.Financials.Tests.Unit.csproj +++ b/src/Allegro.Extensions.Financials/Allegro.Extensions.Financials.Tests.Unit/Allegro.Extensions.Financials.Tests.Unit.csproj @@ -4,11 +4,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Allegro.Extensions.Financials/Directory.Packages.props b/src/Allegro.Extensions.Financials/Directory.Packages.props new file mode 100644 index 0000000..d5c0042 --- /dev/null +++ b/src/Allegro.Extensions.Financials/Directory.Packages.props @@ -0,0 +1,13 @@ + + + true + true + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.Tests/Allegro.Extensions.Globalization.Tests.csproj b/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.Tests/Allegro.Extensions.Globalization.Tests.csproj index fbc0655..c06827b 100644 --- a/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.Tests/Allegro.Extensions.Globalization.Tests.csproj +++ b/src/Allegro.Extensions.Globalization/Allegro.Extensions.Globalization.Tests/Allegro.Extensions.Globalization.Tests.csproj @@ -4,11 +4,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Allegro.Extensions.Globalization/Directory.Packages.props b/src/Allegro.Extensions.Globalization/Directory.Packages.props new file mode 100644 index 0000000..c03b53e --- /dev/null +++ b/src/Allegro.Extensions.Globalization/Directory.Packages.props @@ -0,0 +1,13 @@ + + + true + true + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Abstractions/Allegro.Extensions.Identifiers.Abstractions.csproj b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Abstractions/Allegro.Extensions.Identifiers.Abstractions.csproj index be4a0f3..0356306 100644 --- a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Abstractions/Allegro.Extensions.Identifiers.Abstractions.csproj +++ b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Abstractions/Allegro.Extensions.Identifiers.Abstractions.csproj @@ -6,7 +6,7 @@ - - + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj index 3fb66a0..0289e7d 100644 --- a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj +++ b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.AspNetCore/Allegro.Extensions.Identifiers.AspNetCore.csproj @@ -9,6 +9,6 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj index da29849..fbc0430 100644 --- a/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj +++ b/src/Allegro.Extensions.Identifiers/Allegro.Extensions.Identifiers.Demo/Allegro.Extensions.Identifiers.Demo.csproj @@ -5,6 +5,6 @@ - + \ No newline at end of file diff --git a/src/Allegro.Extensions.Identifiers/Directory.Packages.props b/src/Allegro.Extensions.Identifiers/Directory.Packages.props new file mode 100644 index 0000000..3a19682 --- /dev/null +++ b/src/Allegro.Extensions.Identifiers/Directory.Packages.props @@ -0,0 +1,11 @@ + + + true + true + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Allegro.Extensions.NullableReferenceTypes.Tests.Unit.csproj b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Allegro.Extensions.NullableReferenceTypes.Tests.Unit.csproj index 7bc8c55..5c556ab 100644 --- a/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Allegro.Extensions.NullableReferenceTypes.Tests.Unit.csproj +++ b/src/Allegro.Extensions.NullableReferenceTypes/Allegro.Extensions.NullableReferenceTypes.Tests.Unit/Allegro.Extensions.NullableReferenceTypes.Tests.Unit.csproj @@ -4,14 +4,14 @@ - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - \ No newline at end of file diff --git a/src/Allegro.Extensions.NullableReferenceTypes/Directory.Packages.props b/src/Allegro.Extensions.NullableReferenceTypes/Directory.Packages.props new file mode 100644 index 0000000..22b3fb4 --- /dev/null +++ b/src/Allegro.Extensions.NullableReferenceTypes/Directory.Packages.props @@ -0,0 +1,14 @@ + + + true + true + + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting.Tests.Unit/Allegro.Extensions.RateLimiting.Tests.Unit.csproj b/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting.Tests.Unit/Allegro.Extensions.RateLimiting.Tests.Unit.csproj index 2f119bc..9402a70 100644 --- a/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting.Tests.Unit/Allegro.Extensions.RateLimiting.Tests.Unit.csproj +++ b/src/Allegro.Extensions.RateLimiting/Allegro.Extensions.RateLimiting.Tests.Unit/Allegro.Extensions.RateLimiting.Tests.Unit.csproj @@ -4,11 +4,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Allegro.Extensions.RateLimiting/Directory.Packages.props b/src/Allegro.Extensions.RateLimiting/Directory.Packages.props new file mode 100644 index 0000000..c03b53e --- /dev/null +++ b/src/Allegro.Extensions.RateLimiting/Directory.Packages.props @@ -0,0 +1,13 @@ + + + true + true + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization.Tests.Unit/Allegro.Extensions.Serialization.Tests.Unit.csproj b/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization.Tests.Unit/Allegro.Extensions.Serialization.Tests.Unit.csproj index 6815eb2..4d50f0c 100644 --- a/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization.Tests.Unit/Allegro.Extensions.Serialization.Tests.Unit.csproj +++ b/src/Allegro.Extensions.Serialization/Allegro.Extensions.Serialization.Tests.Unit/Allegro.Extensions.Serialization.Tests.Unit.csproj @@ -4,11 +4,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Allegro.Extensions.Serialization/Directory.Packages.props b/src/Allegro.Extensions.Serialization/Directory.Packages.props new file mode 100644 index 0000000..c03b53e --- /dev/null +++ b/src/Allegro.Extensions.Serialization/Directory.Packages.props @@ -0,0 +1,13 @@ + + + true + true + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/Allegro.Extensions.Validators.Tests.Unit.csproj b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/Allegro.Extensions.Validators.Tests.Unit.csproj index cd8cc28..02069cd 100644 --- a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/Allegro.Extensions.Validators.Tests.Unit.csproj +++ b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/Allegro.Extensions.Validators.Tests.Unit.csproj @@ -4,11 +4,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj index 2605688..fc389e6 100644 --- a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj +++ b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/Allegro.Extensions.Validators.csproj @@ -6,10 +6,10 @@ - - - - - + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Validators/Directory.Packages.props b/src/Allegro.Extensions.Validators/Directory.Packages.props new file mode 100644 index 0000000..e098d17 --- /dev/null +++ b/src/Allegro.Extensions.Validators/Directory.Packages.props @@ -0,0 +1,18 @@ + + + true + true + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/nuget.config b/src/nuget.config new file mode 100644 index 0000000..a82e4bb --- /dev/null +++ b/src/nuget.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file From 725b18e8f902b6c823b710b0a258c67daec2f608 Mon Sep 17 00:00:00 2001 From: Amadeusz Sadowski Date: Wed, 16 Jul 2025 17:46:08 +0200 Subject: [PATCH 6/7] chore: update multiple dependencies --- .../SamplingFilterTests.cs | 24 ++++++------ .../StartupExtensions.cs | 6 ++- ...ghtsToPrometheusMetricsInitializerTests.cs | 4 +- .../Directory.Packages.props | 38 +++++++++---------- .../Directory.Packages.props | 10 ++--- .../StartupExtensions.cs | 3 +- .../Directory.Packages.props | 18 ++++----- .../Directory.Packages.props | 14 +++---- .../Directory.Packages.props | 18 ++++----- .../Directory.Packages.props | 8 ++-- .../Directory.Packages.props | 8 ++-- .../Directory.Packages.props | 6 +-- .../Directory.Packages.props | 8 ++-- .../Directory.Packages.props | 8 ++-- .../Directory.Packages.props | 8 ++-- .../InputValidatorTests.cs | 4 +- .../StartupExtensions.cs | 2 +- .../Directory.Packages.props | 18 ++++----- 18 files changed, 104 insertions(+), 101 deletions(-) diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/SamplingFilterTests.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/SamplingFilterTests.cs index d7ae293..c62f157 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/SamplingFilterTests.cs +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore.UnitTests/SamplingFilterTests.cs @@ -98,14 +98,14 @@ public class SamplingFilterTests : FilterTests new(d); - ApplyDependencyRules(dependency, filter, DependencyMap); + ApplyDependencyRules(dependency, filter!, DependencyMap); ((ISupportSampling)dependency).SamplingPercentage.Should().Be(shouldSample ? null : 100); } @@ -208,13 +208,13 @@ public void Dependencies_Rules( [InlineData(null, null, null, 150, true, null, "CloudRoleName eq 'SomeService'", true)] [InlineData(null, null, null, 150, true, null, "startswith(CloudRoleName, 'SomeService')", true)] public void Requests_Rules( - string cloudRoleName, - string name, + string? cloudRoleName, + string? name, string? url, int duration, bool success, - string responseCode, - string filter, + string? responseCode, + string? filter, bool shouldSample) { var requestTelemetry = new RequestTelemetry( @@ -231,7 +231,7 @@ public void Requests_Rules( RequestForFilter RequestMap(RequestTelemetry d) => new(d); - ApplyRequestRules(requestTelemetry, filter, RequestMap); + ApplyRequestRules(requestTelemetry, filter!, RequestMap); ((ISupportSampling)requestTelemetry).SamplingPercentage.Should().Be(shouldSample ? null : 100); } diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/StartupExtensions.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/StartupExtensions.cs index 5e029d9..6e73b58 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/StartupExtensions.cs +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.AspNetCore/StartupExtensions.cs @@ -86,9 +86,11 @@ public static ApplicationInsightsExtensionsBuilder AddApplicationInsightsTelemet private static string GetConnectionString(string? connectionString, IConfiguration configuration, IHostEnvironment env) { - var sendConfig = configuration.GetSection(MainSection).Get(); + var sendConfig = configuration.GetSection(MainSection).Get() + ?? throw new InvalidOperationException("Missing SendConfig configuration section in ApplicationInsights configuration!"); return env.IsDevelopment() && sendConfig.DisableLocally ? "InstrumentationKey=FakeKey" : - connectionString ?? configuration.GetSection(MainSection)["ConnectionString"]; + connectionString ?? (configuration.GetSection(MainSection)["ConnectionString"] + ?? throw new InvalidOperationException("Missing ConnectionString configuration in ApplicationInsights configuration!")); } /// diff --git a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/ApplicationInsightsToPrometheusMetricsInitializerTests.cs b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/ApplicationInsightsToPrometheusMetricsInitializerTests.cs index d4bc562..4c1f9ec 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/ApplicationInsightsToPrometheusMetricsInitializerTests.cs +++ b/src/Allegro.Extensions.ApplicationInsights/Allegro.Extensions.ApplicationInsights.Prometheus.UnitTests/ApplicationInsightsToPrometheusMetricsInitializerTests.cs @@ -22,7 +22,7 @@ public ApplicationInsightsToPrometheusMetricsInitializerTests() [InlineData("Anything else", false, false)] [InlineData("Process SomeTopic", false, false)] [InlineData("Process SomeTopic", true, true)] - public void ApplyRequestsIncludes(string name, bool includeBus, bool shouldInclude) + public void ApplyRequestsIncludes(string? name, bool includeBus, bool shouldInclude) { var count = 0; var requestTelemetry = new RequestTelemetry( @@ -51,7 +51,7 @@ public void ApplyRequestsIncludes(string name, bool includeBus, bool shouldInclu [InlineData("http", new[] { "http" }, true)] [InlineData("cosmos", new[] { "http", "cosmos" }, true)] [InlineData("Some Type", new[] { "http", "cosmos" }, false)] - public void ApplyDependencyIncludes(string type, string[] typesToInclude, bool shouldInclude) + public void ApplyDependencyIncludes(string? type, string[] typesToInclude, bool shouldInclude) { var count = 0; var dependencyTelemetry = new DependencyTelemetry( diff --git a/src/Allegro.Extensions.ApplicationInsights/Directory.Packages.props b/src/Allegro.Extensions.ApplicationInsights/Directory.Packages.props index f2b25c6..9dd5a32 100644 --- a/src/Allegro.Extensions.ApplicationInsights/Directory.Packages.props +++ b/src/Allegro.Extensions.ApplicationInsights/Directory.Packages.props @@ -4,25 +4,25 @@ true - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.AspNetCore/Directory.Packages.props b/src/Allegro.Extensions.AspNetCore/Directory.Packages.props index 3a5d0eb..f1cd49f 100644 --- a/src/Allegro.Extensions.AspNetCore/Directory.Packages.props +++ b/src/Allegro.Extensions.AspNetCore/Directory.Packages.props @@ -5,10 +5,10 @@ - - - - - + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/StartupExtensions.cs b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/StartupExtensions.cs index 7379483..dde36af 100644 --- a/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/StartupExtensions.cs +++ b/src/Allegro.Extensions.Cqrs/Allegro.Extensions.Cqrs.FluentValidations/StartupExtensions.cs @@ -27,8 +27,9 @@ public static IServiceCollection AddCqrsFluentValidations( .AsImplementedInterfaces() .WithScopedLifetime()); + var callingAssembly = Assembly.GetCallingAssembly(); services - .Scan(s => s.FromCallingAssembly() + .Scan(s => s.FromAssemblies(callingAssembly) .AddClasses( c => c.AssignableToAny(typeof(ICommandValidator<>), typeof(IQueryValidator<>)), publicOnly) diff --git a/src/Allegro.Extensions.Cqrs/Directory.Packages.props b/src/Allegro.Extensions.Cqrs/Directory.Packages.props index a99940b..c2013da 100644 --- a/src/Allegro.Extensions.Cqrs/Directory.Packages.props +++ b/src/Allegro.Extensions.Cqrs/Directory.Packages.props @@ -5,14 +5,14 @@ - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Dapper/Directory.Packages.props b/src/Allegro.Extensions.Dapper/Directory.Packages.props index 929ea01..8dfec01 100644 --- a/src/Allegro.Extensions.Dapper/Directory.Packages.props +++ b/src/Allegro.Extensions.Dapper/Directory.Packages.props @@ -6,13 +6,13 @@ - - - - + + + + - - - + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.DependencyCall/Directory.Packages.props b/src/Allegro.Extensions.DependencyCall/Directory.Packages.props index 718313c..e96586e 100644 --- a/src/Allegro.Extensions.DependencyCall/Directory.Packages.props +++ b/src/Allegro.Extensions.DependencyCall/Directory.Packages.props @@ -5,14 +5,14 @@ - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Financials/Directory.Packages.props b/src/Allegro.Extensions.Financials/Directory.Packages.props index d5c0042..665d875 100644 --- a/src/Allegro.Extensions.Financials/Directory.Packages.props +++ b/src/Allegro.Extensions.Financials/Directory.Packages.props @@ -5,9 +5,9 @@ - - - - + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Globalization/Directory.Packages.props b/src/Allegro.Extensions.Globalization/Directory.Packages.props index c03b53e..5c5a730 100644 --- a/src/Allegro.Extensions.Globalization/Directory.Packages.props +++ b/src/Allegro.Extensions.Globalization/Directory.Packages.props @@ -5,9 +5,9 @@ - - - - + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Identifiers/Directory.Packages.props b/src/Allegro.Extensions.Identifiers/Directory.Packages.props index 3a19682..e0a3840 100644 --- a/src/Allegro.Extensions.Identifiers/Directory.Packages.props +++ b/src/Allegro.Extensions.Identifiers/Directory.Packages.props @@ -4,8 +4,8 @@ true - - - + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.NullableReferenceTypes/Directory.Packages.props b/src/Allegro.Extensions.NullableReferenceTypes/Directory.Packages.props index 22b3fb4..446e247 100644 --- a/src/Allegro.Extensions.NullableReferenceTypes/Directory.Packages.props +++ b/src/Allegro.Extensions.NullableReferenceTypes/Directory.Packages.props @@ -6,9 +6,9 @@ - - - - + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.RateLimiting/Directory.Packages.props b/src/Allegro.Extensions.RateLimiting/Directory.Packages.props index c03b53e..5c5a730 100644 --- a/src/Allegro.Extensions.RateLimiting/Directory.Packages.props +++ b/src/Allegro.Extensions.RateLimiting/Directory.Packages.props @@ -5,9 +5,9 @@ - - - - + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Serialization/Directory.Packages.props b/src/Allegro.Extensions.Serialization/Directory.Packages.props index c03b53e..5c5a730 100644 --- a/src/Allegro.Extensions.Serialization/Directory.Packages.props +++ b/src/Allegro.Extensions.Serialization/Directory.Packages.props @@ -5,9 +5,9 @@ - - - - + + + + \ No newline at end of file diff --git a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/InputValidatorTests.cs b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/InputValidatorTests.cs index a3f4120..eb4718e 100644 --- a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/InputValidatorTests.cs +++ b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators.Tests.Unit/InputValidatorTests.cs @@ -9,9 +9,9 @@ public class InputValidatorTests [InlineData(null)] [InlineData("")] [InlineData(" ")] - public void EnsureHasValue_WhenInvalidInput_ShouldThrowArgumentNullException(string test) + public void EnsureHasValue_WhenInvalidInput_ShouldThrowArgumentNullException(string? test) { - var act = () => InputValidator.EnsureHasValue(test); + var act = () => InputValidator.EnsureHasValue(test!); act.Should().Throw(); } diff --git a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/StartupExtensions.cs b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/StartupExtensions.cs index 5564e82..71b53aa 100644 --- a/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/StartupExtensions.cs +++ b/src/Allegro.Extensions.Validators/Allegro.Extensions.Validators/StartupExtensions.cs @@ -51,7 +51,7 @@ public static IServiceCollection RegisterFluentValidator( /// public static OptionsBuilder AddOptionsWithFluentValidation( this IServiceCollection services, - string? configurationSection) + string configurationSection) where TOptions : class where TValidator : class, IValidator { diff --git a/src/Allegro.Extensions.Validators/Directory.Packages.props b/src/Allegro.Extensions.Validators/Directory.Packages.props index e098d17..e481d0a 100644 --- a/src/Allegro.Extensions.Validators/Directory.Packages.props +++ b/src/Allegro.Extensions.Validators/Directory.Packages.props @@ -5,14 +5,14 @@ - - - - - - - - - + + + + + + + + + \ No newline at end of file From 62699449797b273928c95aeae4f8e6030bec6df3 Mon Sep 17 00:00:00 2001 From: Amadeusz Sadowski Date: Wed, 16 Jul 2025 17:49:11 +0200 Subject: [PATCH 7/7] docs: fix formatting --- CONTRIBUTING.md | 6 +++--- README.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index efa72b3..c5ed99d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ * when creating a new package, make sure to: * maintain the repo structure (see existing packages) * add code analyzers - * create the package's README.md + * create the package's README.md * initialize the package's CHANGELOG.md * add tests * consider presenting usage in Demo app (`/samples`) @@ -23,5 +23,5 @@ ## Coding style -The coding style is guarded by the analyzers (such as stylecop) and .editorconfig. -Make sure to follow the defined standards. \ No newline at end of file +The coding style is guarded by the analyzers (such as stylecop) and .editorconfig. +Make sure to follow the defined standards. diff --git a/README.md b/README.md index ae66161..1ed0d5f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Allegro.Extensions +# Allegro.Extensions This repo contains utility packages that can be shared between Allegro services, but are not required. Everyone can be an author of such package - the goal of this repository is to make it easier and quicker to share useful code snippets, helpers, extensions etc, with as little effort as possible. @@ -8,7 +8,7 @@ This repo contains utility packages that can be shared between Allegro services, Every PR is welcomed. You can extend existing packages and add new ones. -Please refer to [Contributing guideline](CONTRIBUTING.md) for details. +Please refer to [Contributing guideline](CONTRIBUTING.md) for details. ***