From c7d7159d9902f4d1d61e2c4da46ac54a6bed4a0f Mon Sep 17 00:00:00 2001 From: Alexander <122119488+AHdevelopment@users.noreply.github.com> Date: Tue, 30 May 2023 08:18:59 +0200 Subject: [PATCH] Updates --- .../Authentication/MarketActorIdentity.cs | 4 ++++ source/CimMessageAdapter/Messages/MessageReceiver.cs | 10 +--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/source/Application/Configuration/Authentication/MarketActorIdentity.cs b/source/Application/Configuration/Authentication/MarketActorIdentity.cs index c9d0ce29a8..f33cbd8326 100644 --- a/source/Application/Configuration/Authentication/MarketActorIdentity.cs +++ b/source/Application/Configuration/Authentication/MarketActorIdentity.cs @@ -32,6 +32,10 @@ protected MarketActorIdentity(string id, ActorNumber? number, IEnumerable + /// Actor number. + /// TODO AJW: Remove nullable. + /// public ActorNumber? Number { get; } public bool HasRole(string role) diff --git a/source/CimMessageAdapter/Messages/MessageReceiver.cs b/source/CimMessageAdapter/Messages/MessageReceiver.cs index 0cc232fe2c..ad08152ce9 100644 --- a/source/CimMessageAdapter/Messages/MessageReceiver.cs +++ b/source/CimMessageAdapter/Messages/MessageReceiver.cs @@ -53,12 +53,11 @@ public async Task ReceiveAsync ReceiveAsync CheckTransactionIdAsync(string transactionId, CancellationToken cancellationToken) { if (transactionId == null) throw new ArgumentNullException(nameof(transactionId)); @@ -132,14 +126,12 @@ private async Task CheckMessageIdAsync(string messageId, CancellationToken cance private async Task AuthorizeSenderAsync(MessageHeader messageHeader) { - if (messageHeader == null) throw new ArgumentNullException(nameof(messageHeader)); var result = await _senderAuthorizer.AuthorizeAsync(messageHeader.SenderId, messageHeader.SenderRole).ConfigureAwait(false); _errors.AddRange(result.Errors); } private async Task VerifyReceiverAsync(MessageHeader messageHeader) { - if (messageHeader == null) throw new ArgumentNullException(nameof(messageHeader)); var receiverVerification = await ReceiverVerification.VerifyAsync(messageHeader.ReceiverId, messageHeader.ReceiverRole).ConfigureAwait(false); _errors.AddRange(receiverVerification.Errors); }