From afba9d377e5214587816bde3cd17c0979a94611c Mon Sep 17 00:00:00 2001 From: Chris Brohus Date: Wed, 29 Mar 2023 12:28:05 +0200 Subject: [PATCH] Update NuGet packages --- source/Api/Api.csproj | 18 +++++--- source/Application/Application.csproj | 14 +++--- .../Aggregations/ForwardAggregationResult.cs | 21 --------- .../ForwardAggregationResultHandler.cs | 44 +++++++++++++++++++ .../Transactions/MoveIn/BusinessService.cs | 27 ++++++++++++ .../Transactions/MoveIn/GridOperator.cs | 20 +++++++++ .../Transactions/MoveIn/MessageDelivery.cs | 25 +++++++++++ .../Transactions/MoveIn/MoveInSettings.cs | 25 ----------- .../ApplyDBMigrationsApp.csproj | 6 ++- .../ArchitectureTests.csproj | 8 +++- .../CimMessageAdapter.csproj | 8 +++- .../DocumentValidation.csproj | 14 +++++- source/Domain/Domain.csproj | 8 +++- .../EnergySupplying.Contracts.csproj | 6 ++- source/Infrastructure/Infrastructure.csproj | 18 +++++--- .../IntegrationTests/IntegrationTests.csproj | 12 +++-- source/PerformanceTest/PerformanceTest.csproj | 8 +++- .../RequestResponse/RequestResponse.csproj | 8 +++- ...ntCharacteristicsXmlDocumentWriterTests.cs | 8 +++- ...ChangeOfSupplierJsonDocumentWriterTests.cs | 7 ++- ...tChangeOfSupplierXmlDocumentWriterTests.cs | 7 ++- source/Tests/Tests.csproj | 8 +++- 22 files changed, 230 insertions(+), 90 deletions(-) create mode 100644 source/Application/Transactions/Aggregations/ForwardAggregationResultHandler.cs create mode 100644 source/Application/Transactions/MoveIn/BusinessService.cs create mode 100644 source/Application/Transactions/MoveIn/GridOperator.cs create mode 100644 source/Application/Transactions/MoveIn/MessageDelivery.cs diff --git a/source/Api/Api.csproj b/source/Api/Api.csproj index 6d0266f16d..c7fadcfcaa 100644 --- a/source/Api/Api.csproj +++ b/source/Api/Api.csproj @@ -22,20 +22,24 @@ limitations under the License. <_FunctionsSkipCleanOutput>true - - - - + + + + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/Application/Application.csproj b/source/Application/Application.csproj index 6a938e10f4..85e78782bc 100644 --- a/source/Application/Application.csproj +++ b/source/Application/Application.csproj @@ -22,15 +22,19 @@ limitations under the License. - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/Application/Transactions/Aggregations/ForwardAggregationResult.cs b/source/Application/Transactions/Aggregations/ForwardAggregationResult.cs index 77a9863dc1..cdb1907aca 100644 --- a/source/Application/Transactions/Aggregations/ForwardAggregationResult.cs +++ b/source/Application/Transactions/Aggregations/ForwardAggregationResult.cs @@ -45,24 +45,3 @@ public ForwardAggregationResult(Aggregation result) public Aggregation Result { get; } } - -public class ForwardAggregationResultHandler : IRequestHandler -{ - private readonly IAggregationResultForwardingRepository _transactions; - private readonly IOutgoingMessageStore _outgoingMessageStore; - - public ForwardAggregationResultHandler(IAggregationResultForwardingRepository transactions, IOutgoingMessageStore outgoingMessageStore) - { - _transactions = transactions; - _outgoingMessageStore = outgoingMessageStore; - } - - public Task Handle(ForwardAggregationResult request, CancellationToken cancellationToken) - { - ArgumentNullException.ThrowIfNull(request); - var transaction = new AggregationResultForwarding(TransactionId.New()); - _transactions.Add(transaction); - _outgoingMessageStore.Add(transaction.CreateMessage(request.Result)); - return Unit.Task; - } -} diff --git a/source/Application/Transactions/Aggregations/ForwardAggregationResultHandler.cs b/source/Application/Transactions/Aggregations/ForwardAggregationResultHandler.cs new file mode 100644 index 0000000000..015fc1b07d --- /dev/null +++ b/source/Application/Transactions/Aggregations/ForwardAggregationResultHandler.cs @@ -0,0 +1,44 @@ +// Copyright 2020 Energinet DataHub A/S +// +// Licensed under the Apache License, Version 2.0 (the "License2"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Application.OutgoingMessages; +using Domain.Transactions; +using Domain.Transactions.Aggregations; +using MediatR; + +namespace Application.Transactions.Aggregations; + +public class ForwardAggregationResultHandler : IRequestHandler +{ + private readonly IAggregationResultForwardingRepository _transactions; + private readonly IOutgoingMessageStore _outgoingMessageStore; + + public ForwardAggregationResultHandler(IAggregationResultForwardingRepository transactions, IOutgoingMessageStore outgoingMessageStore) + { + _transactions = transactions; + _outgoingMessageStore = outgoingMessageStore; + } + + public Task Handle(ForwardAggregationResult request, CancellationToken cancellationToken) + { + ArgumentNullException.ThrowIfNull(request); + var transaction = new AggregationResultForwarding(TransactionId.New()); + _transactions.Add(transaction); + _outgoingMessageStore.Add(transaction.CreateMessage(request.Result)); + return Unit.Task; + } +} diff --git a/source/Application/Transactions/MoveIn/BusinessService.cs b/source/Application/Transactions/MoveIn/BusinessService.cs new file mode 100644 index 0000000000..b8f94c46f4 --- /dev/null +++ b/source/Application/Transactions/MoveIn/BusinessService.cs @@ -0,0 +1,27 @@ +// Copyright 2020 Energinet DataHub A/S +// +// Licensed under the Apache License, Version 2.0 (the "License2"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; + +namespace Application.Transactions.MoveIn; + +public class BusinessService +{ + public BusinessService(Uri requestEndPoint) + { + RequestEndPoint = requestEndPoint; + } + + public Uri RequestEndPoint { get; set; } +} diff --git a/source/Application/Transactions/MoveIn/GridOperator.cs b/source/Application/Transactions/MoveIn/GridOperator.cs new file mode 100644 index 0000000000..a2f9c05bd3 --- /dev/null +++ b/source/Application/Transactions/MoveIn/GridOperator.cs @@ -0,0 +1,20 @@ +// Copyright 2020 Energinet DataHub A/S +// +// Licensed under the Apache License, Version 2.0 (the "License2"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Application.Transactions.MoveIn; + +public class GridOperator +{ + public int GracePeriodInDaysAfterEffectiveDateIfNotUpdated { get; set; } +} diff --git a/source/Application/Transactions/MoveIn/MessageDelivery.cs b/source/Application/Transactions/MoveIn/MessageDelivery.cs new file mode 100644 index 0000000000..56645b7abb --- /dev/null +++ b/source/Application/Transactions/MoveIn/MessageDelivery.cs @@ -0,0 +1,25 @@ +// Copyright 2020 Energinet DataHub A/S +// +// Licensed under the Apache License, Version 2.0 (the "License2"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Application.Transactions.MoveIn; + +public class MessageDelivery +{ + public MessageDelivery(GridOperator gridOperator) + { + GridOperator = gridOperator; + } + + public GridOperator GridOperator { get; set; } +} diff --git a/source/Application/Transactions/MoveIn/MoveInSettings.cs b/source/Application/Transactions/MoveIn/MoveInSettings.cs index d95f816762..e1d0f78375 100644 --- a/source/Application/Transactions/MoveIn/MoveInSettings.cs +++ b/source/Application/Transactions/MoveIn/MoveInSettings.cs @@ -28,28 +28,3 @@ public MoveInSettings(MessageDelivery messageDelivery, BusinessService businessS public MessageDelivery MessageDelivery { get; set; } } - -public class BusinessService -{ - public BusinessService(Uri requestEndPoint) - { - RequestEndPoint = requestEndPoint; - } - - public Uri RequestEndPoint { get; set; } -} - -public class MessageDelivery -{ - public MessageDelivery(GridOperator gridOperator) - { - GridOperator = gridOperator; - } - - public GridOperator GridOperator { get; set; } -} - -public class GridOperator -{ - public int GracePeriodInDaysAfterEffectiveDateIfNotUpdated { get; set; } -} diff --git a/source/ApplyDBMigrationsApp/ApplyDBMigrationsApp.csproj b/source/ApplyDBMigrationsApp/ApplyDBMigrationsApp.csproj index a2b60063f9..657a7319a0 100644 --- a/source/ApplyDBMigrationsApp/ApplyDBMigrationsApp.csproj +++ b/source/ApplyDBMigrationsApp/ApplyDBMigrationsApp.csproj @@ -33,7 +33,11 @@ limitations under the License. all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/ArchitectureTests/ArchitectureTests.csproj b/source/ArchitectureTests/ArchitectureTests.csproj index 6c18f4a2c0..f347b15673 100644 --- a/source/ArchitectureTests/ArchitectureTests.csproj +++ b/source/ArchitectureTests/ArchitectureTests.csproj @@ -22,7 +22,7 @@ limitations under the License. - + runtime; build; native; contentfiles; analyzers; buildtransitive @@ -36,7 +36,11 @@ limitations under the License. all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/CimMessageAdapter/CimMessageAdapter.csproj b/source/CimMessageAdapter/CimMessageAdapter.csproj index be68c4d6bd..c43aa24366 100644 --- a/source/CimMessageAdapter/CimMessageAdapter.csproj +++ b/source/CimMessageAdapter/CimMessageAdapter.csproj @@ -21,12 +21,16 @@ limitations under the License. - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/DocumentValidation/DocumentValidation.csproj b/source/DocumentValidation/DocumentValidation.csproj index 4fecdcd752..4dfdc25822 100644 --- a/source/DocumentValidation/DocumentValidation.csproj +++ b/source/DocumentValidation/DocumentValidation.csproj @@ -7,7 +7,19 @@ - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/source/Domain/Domain.csproj b/source/Domain/Domain.csproj index 419448b8e8..a4a51551db 100644 --- a/source/Domain/Domain.csproj +++ b/source/Domain/Domain.csproj @@ -23,13 +23,17 @@ limitations under the License. - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/EnergySupplying.Contracts/EnergySupplying.Contracts.csproj b/source/EnergySupplying.Contracts/EnergySupplying.Contracts.csproj index bbd02f4f56..5aa7f3fe3f 100644 --- a/source/EnergySupplying.Contracts/EnergySupplying.Contracts.csproj +++ b/source/EnergySupplying.Contracts/EnergySupplying.Contracts.csproj @@ -26,7 +26,11 @@ limitations under the License. all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/Infrastructure/Infrastructure.csproj b/source/Infrastructure/Infrastructure.csproj index 9529fac3f2..2a20721e00 100644 --- a/source/Infrastructure/Infrastructure.csproj +++ b/source/Infrastructure/Infrastructure.csproj @@ -20,19 +20,19 @@ limitations under the License. - - + + - - + + - + - + @@ -41,7 +41,11 @@ limitations under the License. all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/IntegrationTests/IntegrationTests.csproj b/source/IntegrationTests/IntegrationTests.csproj index 1a3fae54d8..9b16ca6249 100644 --- a/source/IntegrationTests/IntegrationTests.csproj +++ b/source/IntegrationTests/IntegrationTests.csproj @@ -22,9 +22,9 @@ limitations under the License. - - - + + + @@ -40,7 +40,11 @@ limitations under the License. all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/PerformanceTest/PerformanceTest.csproj b/source/PerformanceTest/PerformanceTest.csproj index 3da99fde6d..9bdeabe6ab 100644 --- a/source/PerformanceTest/PerformanceTest.csproj +++ b/source/PerformanceTest/PerformanceTest.csproj @@ -8,14 +8,18 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/RequestResponse/source/RequestResponse/RequestResponse.csproj b/source/RequestResponse/source/RequestResponse/RequestResponse.csproj index b77d7a742c..3178122a20 100644 --- a/source/RequestResponse/source/RequestResponse/RequestResponse.csproj +++ b/source/RequestResponse/source/RequestResponse/RequestResponse.csproj @@ -52,7 +52,7 @@ limitations under the License. - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -60,7 +60,11 @@ limitations under the License. all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeAccountingPointCharacteristics/RejectRequestChangeAccountingPointCharacteristicsXmlDocumentWriterTests.cs b/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeAccountingPointCharacteristics/RejectRequestChangeAccountingPointCharacteristicsXmlDocumentWriterTests.cs index 47f6ddfc67..49624c27b9 100644 --- a/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeAccountingPointCharacteristics/RejectRequestChangeAccountingPointCharacteristicsXmlDocumentWriterTests.cs +++ b/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeAccountingPointCharacteristics/RejectRequestChangeAccountingPointCharacteristicsXmlDocumentWriterTests.cs @@ -60,8 +60,12 @@ public async Task Document_is_valid() new Reason("Reason1", "999"), new Reason("Reason2", "999"), }), - new(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), "FakeMarketEvaluationPointId", - new List() + new( + Guid.NewGuid().ToString(), + Guid.NewGuid().ToString(), + Guid.NewGuid().ToString(), + "FakeMarketEvaluationPointId", + new List() { new Reason("Reason3", "999"), new Reason("Reason4", "999"), diff --git a/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeOfSupplier/RejectRequestChangeOfSupplierJsonDocumentWriterTests.cs b/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeOfSupplier/RejectRequestChangeOfSupplierJsonDocumentWriterTests.cs index bcbda67f27..70a0618b56 100644 --- a/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeOfSupplier/RejectRequestChangeOfSupplierJsonDocumentWriterTests.cs +++ b/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeOfSupplier/RejectRequestChangeOfSupplierJsonDocumentWriterTests.cs @@ -61,8 +61,11 @@ public async Task Document_is_valid() new Reason("Reason1", "999"), new Reason("Reason2", "999"), }), - new("mrid2", "FakeTransactionId", "FakeMarketEvaluationPointId", - new List() + new( + "mrid2", + "FakeTransactionId", + "FakeMarketEvaluationPointId", + new List() { new Reason("Reason3", "999"), new Reason("Reason4", "999"), diff --git a/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeOfSupplier/RejectRequestChangeOfSupplierXmlDocumentWriterTests.cs b/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeOfSupplier/RejectRequestChangeOfSupplierXmlDocumentWriterTests.cs index b874aeef57..0234b61108 100644 --- a/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeOfSupplier/RejectRequestChangeOfSupplierXmlDocumentWriterTests.cs +++ b/source/Tests/Infrastructure/OutgoingMessages/RejectRequestChangeOfSupplier/RejectRequestChangeOfSupplierXmlDocumentWriterTests.cs @@ -56,8 +56,11 @@ public async Task Document_is_valid() new Reason("Reason1", "999"), new Reason("Reason2", "999"), }), - new(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), "FakeMarketEvaluationPointId", - new List() + new( + Guid.NewGuid().ToString(), + Guid.NewGuid().ToString(), + "FakeMarketEvaluationPointId", + new List() { new Reason("Reason3", "999"), new Reason("Reason4", "999"), diff --git a/source/Tests/Tests.csproj b/source/Tests/Tests.csproj index 5ebe7a1b8e..88acf812a5 100644 --- a/source/Tests/Tests.csproj +++ b/source/Tests/Tests.csproj @@ -22,7 +22,7 @@ limitations under the License. - + @@ -37,7 +37,11 @@ limitations under the License. all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive