From a854230e8cca5de41c9e7b2e54494f73d0610a7f Mon Sep 17 00:00:00 2001 From: Ivar Nesje Date: Fri, 17 Nov 2023 11:22:47 +0100 Subject: [PATCH] Moved notifications files to original folders add #nullable enable to all files --- src/Notifications/API/Models/EmailContentTypeExt.cs | 3 ++- src/Notifications/API/Models/EmailNotificationWithResultExt.cs | 3 ++- src/Notifications/API/Models/EmailTemplateExt.cs | 3 ++- src/Notifications/API/Models/NotificationChannelExt.cs | 3 ++- src/Notifications/API/Models/NotificationOrderListExt.cs | 3 ++- src/Notifications/API/Models/NotificationResourceLinksExt.cs | 3 ++- src/Notifications/API/Models/NotificationStatusExt.cs | 3 ++- src/Notifications/API/Models/OrderIdExt.cs | 3 ++- src/Notifications/API/Models/OrderResourceLinksExt.cs | 3 ++- .../EmailNotificationOrderRequestValidator.cs | 0 .../{Controllers => Validators}/ValidationResultExtensions.cs | 3 ++- src/Notifications/Core/Enums/AddressType.cs | 3 ++- src/Notifications/Core/Enums/EmailContentType.cs | 3 ++- src/Notifications/Core/Enums/EmailNotificationResultType.cs | 3 ++- src/Notifications/Core/Enums/IResultType.cs | 3 ++- src/Notifications/Core/Enums/NotificationChannel.cs | 3 ++- src/Notifications/Core/Enums/NotificationTemplateType.cs | 3 ++- src/Notifications/Core/Enums/OrderProcessingStatus.cs | 3 ++- src/Notifications/Core/Models/Address/EmailAddressPoint.cs | 3 ++- src/Notifications/Core/Models/Address/IAddressPoint.cs | 3 ++- src/Notifications/Core/Models/Creator.cs | 3 ++- src/Notifications/Core/Models/Email.cs | 3 ++- .../Core/Models/Notification/EmailNotificationWithResult.cs | 3 ++- src/Notifications/Core/Models/Notification/INotification.cs | 3 ++- .../Core/Models/Notification/INotificationWithResult.cs | 3 ++- .../Core/Models/NotificationTemplate/INotificationTemplate.cs | 3 ++- src/Notifications/Core/Models/Recipient.cs | 3 ++- .../Core/Repository/{ => Interfaces}/IOrderRepository.cs | 0 src/Notifications/Core/Services/DateTimeService.cs | 3 ++- src/Notifications/Core/Services/GuidService.cs | 3 ++- src/Notifications/Core/Services/Interfaces/IDateTimeService.cs | 3 ++- src/Notifications/Core/Services/Interfaces/IGuidService.cs | 3 ++- src/Notifications/Persistence/Repository/OrderRepository.cs | 3 ++- 33 files changed, 62 insertions(+), 31 deletions(-) rename src/Notifications/API/{Controllers => Validators}/EmailNotificationOrderRequestValidator.cs (100%) rename src/Notifications/API/{Controllers => Validators}/ValidationResultExtensions.cs (91%) rename src/Notifications/Core/Repository/{ => Interfaces}/IOrderRepository.cs (100%) diff --git a/src/Notifications/API/Models/EmailContentTypeExt.cs b/src/Notifications/API/Models/EmailContentTypeExt.cs index 76cca39c..22921275 100644 --- a/src/Notifications/API/Models/EmailContentTypeExt.cs +++ b/src/Notifications/API/Models/EmailContentTypeExt.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Models; +#nullable enable +namespace Altinn.Notifications.Models; /// /// Enum describing available content types for an email. diff --git a/src/Notifications/API/Models/EmailNotificationWithResultExt.cs b/src/Notifications/API/Models/EmailNotificationWithResultExt.cs index 49922d59..2e664978 100644 --- a/src/Notifications/API/Models/EmailNotificationWithResultExt.cs +++ b/src/Notifications/API/Models/EmailNotificationWithResultExt.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable enable +using System.Text.Json.Serialization; using Altinn.Notifications.Models; diff --git a/src/Notifications/API/Models/EmailTemplateExt.cs b/src/Notifications/API/Models/EmailTemplateExt.cs index ad5a2d88..8e2c40c4 100644 --- a/src/Notifications/API/Models/EmailTemplateExt.cs +++ b/src/Notifications/API/Models/EmailTemplateExt.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable enable +using System.Text.Json.Serialization; namespace Altinn.Notifications.Models; diff --git a/src/Notifications/API/Models/NotificationChannelExt.cs b/src/Notifications/API/Models/NotificationChannelExt.cs index 1510efab..11bea3a2 100644 --- a/src/Notifications/API/Models/NotificationChannelExt.cs +++ b/src/Notifications/API/Models/NotificationChannelExt.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Models; +#nullable enable +namespace Altinn.Notifications.Models; /// /// Enum describing available notification channels. diff --git a/src/Notifications/API/Models/NotificationOrderListExt.cs b/src/Notifications/API/Models/NotificationOrderListExt.cs index ba315592..e21362ae 100644 --- a/src/Notifications/API/Models/NotificationOrderListExt.cs +++ b/src/Notifications/API/Models/NotificationOrderListExt.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable enable +using System.Text.Json.Serialization; namespace Altinn.Notifications.Models; diff --git a/src/Notifications/API/Models/NotificationResourceLinksExt.cs b/src/Notifications/API/Models/NotificationResourceLinksExt.cs index e4cd97fc..72376c2d 100644 --- a/src/Notifications/API/Models/NotificationResourceLinksExt.cs +++ b/src/Notifications/API/Models/NotificationResourceLinksExt.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable enable +using System.Text.Json.Serialization; namespace Altinn.Notifications.Models; diff --git a/src/Notifications/API/Models/NotificationStatusExt.cs b/src/Notifications/API/Models/NotificationStatusExt.cs index b8dc8b42..bb2bb54d 100644 --- a/src/Notifications/API/Models/NotificationStatusExt.cs +++ b/src/Notifications/API/Models/NotificationStatusExt.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable enable +using System.Text.Json.Serialization; namespace Altinn.Notifications.Models; diff --git a/src/Notifications/API/Models/OrderIdExt.cs b/src/Notifications/API/Models/OrderIdExt.cs index c615b718..551e574e 100644 --- a/src/Notifications/API/Models/OrderIdExt.cs +++ b/src/Notifications/API/Models/OrderIdExt.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable enable +using System.Text.Json.Serialization; namespace Altinn.Notifications.Models; diff --git a/src/Notifications/API/Models/OrderResourceLinksExt.cs b/src/Notifications/API/Models/OrderResourceLinksExt.cs index 07d0e80d..843f44ec 100644 --- a/src/Notifications/API/Models/OrderResourceLinksExt.cs +++ b/src/Notifications/API/Models/OrderResourceLinksExt.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable enable +using System.Text.Json.Serialization; namespace Altinn.Notifications.Models; diff --git a/src/Notifications/API/Controllers/EmailNotificationOrderRequestValidator.cs b/src/Notifications/API/Validators/EmailNotificationOrderRequestValidator.cs similarity index 100% rename from src/Notifications/API/Controllers/EmailNotificationOrderRequestValidator.cs rename to src/Notifications/API/Validators/EmailNotificationOrderRequestValidator.cs diff --git a/src/Notifications/API/Controllers/ValidationResultExtensions.cs b/src/Notifications/API/Validators/ValidationResultExtensions.cs similarity index 91% rename from src/Notifications/API/Controllers/ValidationResultExtensions.cs rename to src/Notifications/API/Validators/ValidationResultExtensions.cs index e5816351..18ffe907 100644 --- a/src/Notifications/API/Controllers/ValidationResultExtensions.cs +++ b/src/Notifications/API/Validators/ValidationResultExtensions.cs @@ -1,4 +1,5 @@ -using FluentValidation.Results; +#nullable enable +using FluentValidation.Results; using Microsoft.AspNetCore.Mvc.ModelBinding; diff --git a/src/Notifications/Core/Enums/AddressType.cs b/src/Notifications/Core/Enums/AddressType.cs index 884ec380..caf5ca9a 100644 --- a/src/Notifications/Core/Enums/AddressType.cs +++ b/src/Notifications/Core/Enums/AddressType.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Enums; +#nullable enable +namespace Altinn.Notifications.Core.Enums; #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member /// diff --git a/src/Notifications/Core/Enums/EmailContentType.cs b/src/Notifications/Core/Enums/EmailContentType.cs index ad3b5c53..991ae849 100644 --- a/src/Notifications/Core/Enums/EmailContentType.cs +++ b/src/Notifications/Core/Enums/EmailContentType.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Enums; +#nullable enable +namespace Altinn.Notifications.Core.Enums; /// /// Enum describing available email content types diff --git a/src/Notifications/Core/Enums/EmailNotificationResultType.cs b/src/Notifications/Core/Enums/EmailNotificationResultType.cs index 65813841..28e0562d 100644 --- a/src/Notifications/Core/Enums/EmailNotificationResultType.cs +++ b/src/Notifications/Core/Enums/EmailNotificationResultType.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Enums; +#nullable enable +namespace Altinn.Notifications.Core.Enums; /// /// Enum describing email notification result types diff --git a/src/Notifications/Core/Enums/IResultType.cs b/src/Notifications/Core/Enums/IResultType.cs index b74d0b50..d8dea4d1 100644 --- a/src/Notifications/Core/Enums/IResultType.cs +++ b/src/Notifications/Core/Enums/IResultType.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Enums; +#nullable enable +namespace Altinn.Notifications.Core.Enums; /// /// Base class for send result of a notification diff --git a/src/Notifications/Core/Enums/NotificationChannel.cs b/src/Notifications/Core/Enums/NotificationChannel.cs index 7da282be..4e23d060 100644 --- a/src/Notifications/Core/Enums/NotificationChannel.cs +++ b/src/Notifications/Core/Enums/NotificationChannel.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Enums; +#nullable enable +namespace Altinn.Notifications.Core.Enums; /// /// Enum describing available notification channels. diff --git a/src/Notifications/Core/Enums/NotificationTemplateType.cs b/src/Notifications/Core/Enums/NotificationTemplateType.cs index ae0de091..a7e02909 100644 --- a/src/Notifications/Core/Enums/NotificationTemplateType.cs +++ b/src/Notifications/Core/Enums/NotificationTemplateType.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Enums; +#nullable enable +namespace Altinn.Notifications.Core.Enums; #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member /// diff --git a/src/Notifications/Core/Enums/OrderProcessingStatus.cs b/src/Notifications/Core/Enums/OrderProcessingStatus.cs index 757bb44f..20c22fa9 100644 --- a/src/Notifications/Core/Enums/OrderProcessingStatus.cs +++ b/src/Notifications/Core/Enums/OrderProcessingStatus.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Enums; +#nullable enable +namespace Altinn.Notifications.Core.Enums; #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member /// diff --git a/src/Notifications/Core/Models/Address/EmailAddressPoint.cs b/src/Notifications/Core/Models/Address/EmailAddressPoint.cs index 9e720b1b..aa2b3031 100644 --- a/src/Notifications/Core/Models/Address/EmailAddressPoint.cs +++ b/src/Notifications/Core/Models/Address/EmailAddressPoint.cs @@ -1,4 +1,5 @@ -using Altinn.Notifications.Core.Enums; +#nullable enable +using Altinn.Notifications.Core.Enums; namespace Altinn.Notifications.Core.Models.Address; diff --git a/src/Notifications/Core/Models/Address/IAddressPoint.cs b/src/Notifications/Core/Models/Address/IAddressPoint.cs index fd961f02..e15ccc17 100644 --- a/src/Notifications/Core/Models/Address/IAddressPoint.cs +++ b/src/Notifications/Core/Models/Address/IAddressPoint.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable enable +using System.Text.Json.Serialization; using Altinn.Notifications.Core.Enums; diff --git a/src/Notifications/Core/Models/Creator.cs b/src/Notifications/Core/Models/Creator.cs index 794e1d0c..ef0e334a 100644 --- a/src/Notifications/Core/Models/Creator.cs +++ b/src/Notifications/Core/Models/Creator.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Models; +#nullable enable +namespace Altinn.Notifications.Core.Models; /// /// A class representing a notification creator diff --git a/src/Notifications/Core/Models/Email.cs b/src/Notifications/Core/Models/Email.cs index 4f86765d..00a3ecce 100644 --- a/src/Notifications/Core/Models/Email.cs +++ b/src/Notifications/Core/Models/Email.cs @@ -1,4 +1,5 @@ -using System.Text.Json; +#nullable enable +using System.Text.Json; using System.Text.Json.Serialization; using Altinn.Notifications.Core.Enums; diff --git a/src/Notifications/Core/Models/Notification/EmailNotificationWithResult.cs b/src/Notifications/Core/Models/Notification/EmailNotificationWithResult.cs index 23146430..a8c7e851 100644 --- a/src/Notifications/Core/Models/Notification/EmailNotificationWithResult.cs +++ b/src/Notifications/Core/Models/Notification/EmailNotificationWithResult.cs @@ -1,4 +1,5 @@ -using Altinn.Notifications.Core.Enums; +#nullable enable +using Altinn.Notifications.Core.Enums; using Altinn.Notifications.Core.Models.Recipients; namespace Altinn.Notifications.Core.Models.Notification diff --git a/src/Notifications/Core/Models/Notification/INotification.cs b/src/Notifications/Core/Models/Notification/INotification.cs index ab244642..4bee1b10 100644 --- a/src/Notifications/Core/Models/Notification/INotification.cs +++ b/src/Notifications/Core/Models/Notification/INotification.cs @@ -1,4 +1,5 @@ -using System; +#nullable enable +using System; using Altinn.Notifications.Core.Enums; diff --git a/src/Notifications/Core/Models/Notification/INotificationWithResult.cs b/src/Notifications/Core/Models/Notification/INotificationWithResult.cs index 0ddfa3bb..aa95da12 100644 --- a/src/Notifications/Core/Models/Notification/INotificationWithResult.cs +++ b/src/Notifications/Core/Models/Notification/INotificationWithResult.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Models.Notification; +#nullable enable +namespace Altinn.Notifications.Core.Models.Notification; /// /// Interface representing a notification object with send result data diff --git a/src/Notifications/Core/Models/NotificationTemplate/INotificationTemplate.cs b/src/Notifications/Core/Models/NotificationTemplate/INotificationTemplate.cs index c8f3ce71..106efd09 100644 --- a/src/Notifications/Core/Models/NotificationTemplate/INotificationTemplate.cs +++ b/src/Notifications/Core/Models/NotificationTemplate/INotificationTemplate.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +#nullable enable +using System.Text.Json.Serialization; using Altinn.Notifications.Core.Enums; diff --git a/src/Notifications/Core/Models/Recipient.cs b/src/Notifications/Core/Models/Recipient.cs index c46f5712..c0517c41 100644 --- a/src/Notifications/Core/Models/Recipient.cs +++ b/src/Notifications/Core/Models/Recipient.cs @@ -1,4 +1,5 @@ -using Altinn.Notifications.Core.Models.Address; +#nullable enable +using Altinn.Notifications.Core.Models.Address; namespace Altinn.Notifications.Core.Models; diff --git a/src/Notifications/Core/Repository/IOrderRepository.cs b/src/Notifications/Core/Repository/Interfaces/IOrderRepository.cs similarity index 100% rename from src/Notifications/Core/Repository/IOrderRepository.cs rename to src/Notifications/Core/Repository/Interfaces/IOrderRepository.cs diff --git a/src/Notifications/Core/Services/DateTimeService.cs b/src/Notifications/Core/Services/DateTimeService.cs index b78bf5e7..a48321cd 100644 --- a/src/Notifications/Core/Services/DateTimeService.cs +++ b/src/Notifications/Core/Services/DateTimeService.cs @@ -1,4 +1,5 @@ -using System.Diagnostics.CodeAnalysis; +#nullable enable +using System.Diagnostics.CodeAnalysis; using Altinn.Notifications.Core.Services.Interfaces; diff --git a/src/Notifications/Core/Services/GuidService.cs b/src/Notifications/Core/Services/GuidService.cs index e106fbd3..d6614803 100644 --- a/src/Notifications/Core/Services/GuidService.cs +++ b/src/Notifications/Core/Services/GuidService.cs @@ -1,4 +1,5 @@ -using System.Diagnostics.CodeAnalysis; +#nullable enable +using System.Diagnostics.CodeAnalysis; using Altinn.Notifications.Core.Services.Interfaces; diff --git a/src/Notifications/Core/Services/Interfaces/IDateTimeService.cs b/src/Notifications/Core/Services/Interfaces/IDateTimeService.cs index 9cdae256..8ff6b2b1 100644 --- a/src/Notifications/Core/Services/Interfaces/IDateTimeService.cs +++ b/src/Notifications/Core/Services/Interfaces/IDateTimeService.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Services.Interfaces; +#nullable enable +namespace Altinn.Notifications.Core.Services.Interfaces; /// /// Interface describing a dateTime service diff --git a/src/Notifications/Core/Services/Interfaces/IGuidService.cs b/src/Notifications/Core/Services/Interfaces/IGuidService.cs index 04b70707..16b81efc 100644 --- a/src/Notifications/Core/Services/Interfaces/IGuidService.cs +++ b/src/Notifications/Core/Services/Interfaces/IGuidService.cs @@ -1,4 +1,5 @@ -namespace Altinn.Notifications.Core.Services.Interfaces; +#nullable enable +namespace Altinn.Notifications.Core.Services.Interfaces; /// /// Interface describing a guid service diff --git a/src/Notifications/Persistence/Repository/OrderRepository.cs b/src/Notifications/Persistence/Repository/OrderRepository.cs index f9e956cb..2f64ae9d 100644 --- a/src/Notifications/Persistence/Repository/OrderRepository.cs +++ b/src/Notifications/Persistence/Repository/OrderRepository.cs @@ -1,4 +1,5 @@ -using System.Text.Json; +#nullable enable +using System.Text.Json; using Altinn.Notifications.Core.Enums; using Altinn.Notifications.Core.Models.Orders;