diff --git a/Responses/OperationOutcome.cs b/Responses/OperationOutcome.cs index 8c57700..1eac669 100644 --- a/Responses/OperationOutcome.cs +++ b/Responses/OperationOutcome.cs @@ -7,13 +7,6 @@ namespace TheOmenDen.Shared.Responses; /// public sealed class OperationOutcome { - public OperationOutcome() - { - ClientErrorPayload = new (); - CorrelationId = String.Empty; - Errors = Enumerable.Empty(); - } - /// /// /// @@ -22,30 +15,31 @@ public OperationOutcome() /// /// The correlation id for us to search for this outcome /// - public String CorrelationId { get; set; } + public String CorrelationId { get; set; } = String.Empty; /// /// The errors that lead to the outcome represented as a collection of strings /// - public IEnumerable Errors { get; set; } + public IEnumerable Errors { get; set; } = Enumerable.Empty(); /// /// /// - public ClientErrorPayload ClientErrorPayload { get; set; } + public ClientErrorPayload ClientErrorPayload { get; set; } = new(); /// /// Successful outcome indicator /// public static OperationOutcome SuccessfulOutcome => new() { - Errors= Enumerable.Empty(), + Errors = Enumerable.Empty(), CorrelationId = String.Empty, - ClientErrorPayload = new (){ - IsError = false, - IsValidationFailure = false, - Message = String.Empty, - Detail = String.Empty + ClientErrorPayload = new() + { + IsError = false, + IsValidationFailure = false, + Message = String.Empty, + Detail = String.Empty }, OperationResult = OperationResult.Success }; diff --git a/TheOmenDen.Shared.csproj b/TheOmenDen.Shared.csproj index 1e35796..bd4d535 100644 --- a/TheOmenDen.Shared.csproj +++ b/TheOmenDen.Shared.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0 + net6.0;net7.0;net8.0 false false @@ -25,13 +25,13 @@ False Andrew Beers (Alu) The Omen Den Shared - False + True annotations omen-den-wave.png The Omen Den's Shared Library git dotnet;dotnetcore;dotnet7;dotnet6;csharp; c#; enumerations;guards;general purpose;theomenden - Add guard classes, add enumeration record types + Update to .NET 8 True snupkg @@ -40,6 +40,23 @@ + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -48,8 +65,4 @@ - - - -