Skip to content

Commit

Permalink
Engine+Mongo: Drop target for netstandard2.0
Browse files Browse the repository at this point in the history
This drops the netstandard2.1 target and targets netstandard2.1 instead.
  • Loading branch information
kennethmyhra committed Feb 2, 2025
1 parent 13064e3 commit d3a00a7
Show file tree
Hide file tree
Showing 27 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions src/Spark.Engine/Core/ConditionalHeaderParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using System.Collections.Generic;
using System.Net.Http;
using Spark.Engine.Extensions;
#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Microsoft.AspNetCore.Http;
#endif

Expand All @@ -23,7 +23,7 @@ public ConditionalHeaderParameters(HttpRequestMessage request)
IfModifiedSince = request.IfModifiedSince();
}

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
public ConditionalHeaderParameters(HttpRequest request)
{
IfNoneMatchTags = request.IfNoneMatch();
Expand Down
4 changes: 2 additions & 2 deletions src/Spark.Engine/Core/HistoryParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using System.Net.Http;
using Spark.Engine.Extensions;
using Spark.Engine.Utility;
#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Microsoft.AspNetCore.Http;
#endif

Expand All @@ -28,7 +28,7 @@ public HistoryParameters(HttpRequestMessage request)
SortBy = request.GetParameter(FhirParameter.SORT);
}

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
public HistoryParameters(HttpRequest request)
{
Count = FhirParameterParser.ParseIntParameter(request.GetParameter(FhirParameter.COUNT));
Expand Down
2 changes: 1 addition & 1 deletion src/Spark.Engine/ExceptionHandling/NetCore/ErrorHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using FhirModel = Hl7.Fhir.Model;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Formatters;
Expand Down
4 changes: 2 additions & 2 deletions src/Spark.Engine/Extensions/HttpHeadersExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Microsoft.AspNetCore.Http;
#endif

Expand Down Expand Up @@ -53,7 +53,7 @@ public static bool IsContentTypeHeaderFhirMediaType(string contentType)
|| ContentType.JSON_CONTENT_HEADERS.Contains(contentType);
}

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
public static string GetParameter(this HttpRequest request, string key)
{
string value = null;
Expand Down
4 changes: 2 additions & 2 deletions src/Spark.Engine/Extensions/HttpRequestFhirExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using Spark.Formatters;
using System.Collections.Specialized;
using System.Runtime.CompilerServices;
#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Http.Headers;
Expand All @@ -42,7 +42,7 @@ private static string WithoutQuotes(string s)
}
}

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
public static int GetPagingOffsetParameter(this HttpRequest request)
{
var offset = FhirParameterParser.ParseIntParameter(request.GetParameter(FhirParameter.OFFSET));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Mvc.Formatters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using Spark.Engine.ExceptionHandling;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Hl7.Fhir.Model;
using Hl7.Fhir.Serialization;
using Microsoft.AspNetCore.Mvc;
Expand Down
2 changes: 1 addition & 1 deletion src/Spark.Engine/Extensions/NetCore/SparkOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Microsoft.AspNetCore.Mvc;
using System;

Expand Down
4 changes: 2 additions & 2 deletions src/Spark.Engine/Extensions/OperationOutcomeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using System.Diagnostics;
using System.Linq;
using Spark.Engine.Utility;
#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Microsoft.AspNetCore.Mvc;
#endif

Expand All @@ -26,7 +26,7 @@ public static class OperationOutcomeExtensions
{
internal static Func<string, string> pascalToCamelCase = (pascalCase) => $"{char.ToLower(pascalCase[0])}{pascalCase.Substring(1)}";

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
public static OperationOutcome AddValidationProblems(this OperationOutcome outcome, Type resourceType, HttpStatusCode code, ValidationProblemDetails validationProblems)
{
if (resourceType == null) throw new ArgumentNullException(nameof(resourceType));
Expand Down
2 changes: 1 addition & 1 deletion src/Spark.Engine/Extensions/X509Certificate2Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal static class X509Certificate2Extensions
{
public static AsymmetricAlgorithm GetPrivateKey(this X509Certificate2 certificate)
{
#if NETSTANDARD2_0 || NET472
#if NETSTANDARD2_1 || NET472
return certificate.PrivateKey;
#else
if (!certificate.HasPrivateKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Hl7.Fhir.Model;
using Hl7.Fhir.Serialization;
using Microsoft.AspNetCore.Mvc.Formatters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using FhirModel = Hl7.Fhir.Model;
using Hl7.Fhir.Serialization;
using Microsoft.AspNetCore.Mvc.Formatters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Hl7.Fhir.Model;
using Hl7.Fhir.Serialization;
using Microsoft.AspNetCore.Mvc.Formatters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using FhirModel = Hl7.Fhir.Model;
using Hl7.Fhir.Serialization;
using Microsoft.AspNetCore.Mvc.Formatters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Hl7.Fhir.Model;
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.Extensions.Primitives;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using FhirModel = Hl7.Fhir.Model;
using Microsoft.AspNetCore.Mvc.Formatters;
using Spark.Engine.Core;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.AspNetCore.Mvc.Infrastructure;
Expand Down
2 changes: 1 addition & 1 deletion src/Spark.Engine/Formatters/NetCore/JsonArrayPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Newtonsoft.Json;
using System;
using System.Buffers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Hl7.Fhir.Model;
using Hl7.Fhir.Serialization;
using Microsoft.AspNetCore.Http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using FhirModel = Hl7.Fhir.Model;
using Hl7.Fhir.Rest;
using Hl7.Fhir.Serialization;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Hl7.Fhir.Model;
using Hl7.Fhir.Serialization;
using Microsoft.AspNetCore.Http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using FhirModel = Hl7.Fhir.Model;
using Hl7.Fhir.Rest;
using Hl7.Fhir.Serialization;
Expand Down
2 changes: 1 addition & 1 deletion src/Spark.Engine/Handlers/NetCore/FormatTypeHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using Hl7.Fhir.Rest;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Primitives;
Expand Down
2 changes: 1 addition & 1 deletion src/Spark.Engine/Maintenance/MaintenanceModeHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/

#if NETSTANDARD2_0 || NET6_0_OR_GREATER
#if NETSTANDARD2_1 || NET6_0_OR_GREATER
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;

Expand Down
4 changes: 2 additions & 2 deletions src/Spark.Engine/Spark.Engine.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net472</TargetFrameworks>
<AssemblyName>Spark.Engine.STU3</AssemblyName>
<LangVersion>latest</LangVersion>
<PackageId>Spark.Engine.STU3</PackageId>
Expand All @@ -18,7 +18,7 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.WebApiCompatShim" Version="2.2.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Spark.Mongo/Spark.Mongo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Spark.Mongo.STU3</AssemblyName>
<LangVersion>latest</LangVersion>
<PackageId>Spark.Mongo.STU3</PackageId>
Expand Down

0 comments on commit d3a00a7

Please sign in to comment.