Skip to content

Commit

Permalink
Update runtime to support .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
AluTheCrow committed Nov 27, 2023
1 parent 60a104e commit 0663249
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
26 changes: 10 additions & 16 deletions Responses/OperationOutcome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ namespace TheOmenDen.Shared.Responses;
/// </summary>
public sealed class OperationOutcome
{
public OperationOutcome()
{
ClientErrorPayload = new ();
CorrelationId = String.Empty;
Errors = Enumerable.Empty<String>();
}

/// <summary>
/// <inheritdoc cref="Enumerations.OperationResult"/>
/// </summary>
Expand All @@ -22,30 +15,31 @@ public OperationOutcome()
/// <summary>
/// The correlation id for us to search for this outcome
/// </summary>
public String CorrelationId { get; set; }
public String CorrelationId { get; set; } = String.Empty;

/// <summary>
/// The errors that lead to the outcome represented as a collection of strings
/// </summary>
public IEnumerable<String> Errors { get; set; }
public IEnumerable<String> Errors { get; set; } = Enumerable.Empty<String>();

/// <summary>
/// <inheritdoc cref="ClientErrorPayload"/>
/// </summary>
public ClientErrorPayload ClientErrorPayload { get; set; }
public ClientErrorPayload ClientErrorPayload { get; set; } = new();

/// <summary>
/// Successful outcome indicator
/// </summary>
public static OperationOutcome SuccessfulOutcome => new()
{
Errors= Enumerable.Empty<String>(),
Errors = Enumerable.Empty<String>(),
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
};
Expand Down
27 changes: 20 additions & 7 deletions TheOmenDen.Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Deterministic>false</Deterministic>
</PropertyGroup>
Expand All @@ -25,13 +25,13 @@
<SignAssembly>False</SignAssembly>
<Authors>Andrew Beers (Alu)</Authors>
<Product>The Omen Den Shared</Product>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Nullable>annotations</Nullable>
<PackageIcon>omen-den-wave.png</PackageIcon>
<Title>The Omen Den's Shared Library</Title>
<RepositoryType>git</RepositoryType>
<PackageTags>dotnet;dotnetcore;dotnet7;dotnet6;csharp; c#; enumerations;guards;general purpose;theomenden</PackageTags>
<PackageReleaseNotes>Add guard classes, add enumeration record types</PackageReleaseNotes>
<PackageReleaseNotes>Update to .NET 8</PackageReleaseNotes>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
Expand All @@ -40,6 +40,23 @@
</WriteLinesToFile>
</Target>
<ItemGroup>
<Compile Remove="Delegates\**" />
<EmbeddedResource Remove="Delegates\**" />
<None Remove="Delegates\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.Analyzers" Version="4.6.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.12.0.78982">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>

Expand All @@ -48,8 +65,4 @@
<None Include="README.md" Pack="true" PackagePath="\">
</None>
</ItemGroup>

<ItemGroup>
<Folder Include="Delegates\" />
</ItemGroup>
</Project>

0 comments on commit 0663249

Please sign in to comment.