Kaynağa Gözat

[CSharp] Upgrade `FastEndpoints` to latest and .net 7.0 (#7694)

Dĵ ΝιΓΞΗΛψΚ 2 yıl önce
ebeveyn
işleme
0e10f1eff3

+ 10 - 10
frameworks/CSharp/fastendpoints/Benchmarks/Benchmarks.csproj

@@ -1,14 +1,14 @@
 <Project Sdk="Microsoft.NET.Sdk.Web">
 
-    <PropertyGroup>
-        <TargetFramework>net6.0</TargetFramework>
-        <Nullable>enable</Nullable>
-        <ImplicitUsings>enable</ImplicitUsings>
-        <NoWarn>CA2016;IDE1006</NoWarn>
-    </PropertyGroup>
+  <PropertyGroup>
+    <TargetFramework>net7.0</TargetFramework>
+    <Nullable>enable</Nullable>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <NoWarn>CA2016;IDE1006</NoWarn>
+  </PropertyGroup>
 
-    <ItemGroup>
-        <PackageReference Include="FastEndpoints" Version="3.*" />
-    </ItemGroup>
+  <ItemGroup>
+    <PackageReference Include="FastEndpoints" Version="5.*" />
+  </ItemGroup>
 
-</Project>
+</Project>

+ 1 - 1
frameworks/CSharp/fastendpoints/Benchmarks/Endpoints/JsonEndpoint.cs

@@ -1,6 +1,6 @@
 namespace Benchmarks.Endpoints;
 
-public class JsonEndpoint : Endpoint<EmptyRequest, object>
+public sealed class JsonEndpoint : Endpoint<EmptyRequest, object>
 {
     public override void Configure()
     {

+ 1 - 1
frameworks/CSharp/fastendpoints/Benchmarks/Endpoints/PlainTextEndpoint.cs

@@ -1,6 +1,6 @@
 namespace Benchmarks.Endpoints;
 
-public class PlainTextEndpoint : Endpoint<EmptyRequest, EmptyResponse>
+public sealed class PlainTextEndpoint : Endpoint<EmptyRequest, EmptyResponse>
 {
     private static readonly byte[] payload = System.Text.Encoding.UTF8.GetBytes("Hello, World!");
 

+ 2 - 2
frameworks/CSharp/fastendpoints/fastendpoints.dockerfile

@@ -1,9 +1,9 @@
-FROM mcr.microsoft.com/dotnet/sdk:6.0.100 AS build
+FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
 WORKDIR /app
 COPY Benchmarks .
 RUN dotnet publish -c Release -o out
 
-FROM mcr.microsoft.com/dotnet/aspnet:6.0.0 AS runtime
+FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime
 WORKDIR /app
 COPY --from=build /app/out ./