Skip to content

Commit 2aab91c

Browse files
Update some CSharp frameworks to latest
1 parent 43edfc1 commit 2aab91c

File tree

12 files changed

+59
-55
lines changed

12 files changed

+59
-55
lines changed
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
2+
33
<PropertyGroup>
4-
5-
<TargetFramework>net5.0</TargetFramework>
6-
<LangVersion>9.0</LangVersion>
7-
4+
5+
<TargetFramework>net9.0</TargetFramework>
6+
<LangVersion>13.0</LangVersion>
7+
88
<AssemblyTitle>EmbedIO Benchmarks</AssemblyTitle>
99
<Description>Test suite to be executed with TechEmpower FrameworkBenchmarks.</Description>
10-
11-
<StartupObject>Benchmarks.Program</StartupObject>
10+
11+
<StartupObject>Benchmarks.Program</StartupObject>
1212
<OutputType>Exe</OutputType>
13-
13+
1414
<ServerGarbageCollection>true</ServerGarbageCollection>
1515
<TieredCompilation>false</TieredCompilation>
16-
16+
1717
</PropertyGroup>
18-
18+
1919
<ItemGroup>
20-
<PackageReference Include="EmbedIO" Version="3.4.3" />
20+
<PackageReference Include="EmbedIO" Version="3.5.2" />
2121
</ItemGroup>
22-
23-
</Project>
22+
23+
</Project>

frameworks/CSharp/embedio/Benchmarks/Program.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
using EmbedIO;
2-
using Swan.Logging;
3-
using System;
1+
using System;
42
using System.Text;
53
using System.Threading;
64
using System.Threading.Tasks;
75

6+
using EmbedIO;
7+
8+
using Swan.Logging;
9+
810
namespace Benchmarks
911
{
1012

@@ -21,7 +23,7 @@ public class JsonResult
2123

2224
public static class Program
2325
{
24-
private static readonly ManualResetEvent _WaitEvent = new ManualResetEvent(false);
26+
private static readonly ManualResetEvent WaitEvent = new(false);
2527

2628
public static async Task<int> Main(string[] args)
2729
{
@@ -60,12 +62,12 @@ public static async Task<int> Main(string[] args)
6062
{
6163
AppDomain.CurrentDomain.ProcessExit += (_, __) =>
6264
{
63-
_WaitEvent.Set();
65+
WaitEvent.Set();
6466
};
6567

6668
await server.RunAsync();
6769

68-
_WaitEvent.WaitOne();
70+
WaitEvent.WaitOne();
6971

7072
return 0;
7173
}

frameworks/CSharp/embedio/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ See the [project website](https://github.com/unosquare/embedio) for more informa
66

77
**Language**
88

9-
* C# 9.0
9+
* C# 13.0
1010

1111
**Platforms**
1212

13-
* .NET 5
13+
* .NET 9
1414

1515
**Web Servers**
1616

1717
* [EmbedIO](https://github.com/unosquare/embedio)
1818

19-
## Paths & Source for Tests
19+
## Paths \& Source for Tests
2020

2121
* [Plaintext](Benchmarks/Program.cs): "/plaintext"
2222
* [JSON](Benchmarks/Program.cs): "/json"

frameworks/CSharp/embedio/embedio.dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
22
WORKDIR /source
33

44
# copy csproj and restore as distinct layers
@@ -7,10 +7,10 @@ RUN dotnet restore -r linux-musl-x64
77

88
# copy and publish app and libraries
99
COPY Benchmarks/ .
10-
RUN dotnet publish -c release -o /app -r linux-musl-x64
10+
RUN dotnet publish -c release -o /app -r linux-musl-x64 --no-restore --self-contained
1111

1212
# final stage/image
13-
FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine
13+
FROM mcr.microsoft.com/dotnet/runtime-deps:9.0-alpine
1414
WORKDIR /app
1515
COPY --from=build /app .
1616

frameworks/CSharp/genhttp/Benchmarks/Benchmarks.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626

2727
<ItemGroup>
2828

29-
<PackageReference Include="GenHTTP.Core" Version="9.6.2" />
30-
<PackageReference Include="GenHTTP.Modules.Webservices" Version="9.6.2" />
29+
<PackageReference Include="GenHTTP.Core" Version="9.8.0" />
30+
<PackageReference Include="GenHTTP.Modules.Webservices" Version="9.8.0" />
3131

32-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.1" />
33-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.3" />
32+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.10" />
33+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
3434

3535
</ItemGroup>
3636

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
2+
33
<PropertyGroup>
4-
5-
<TargetFramework>net5.0</TargetFramework>
6-
<LangVersion>9.0</LangVersion>
7-
4+
5+
<TargetFramework>net9.0</TargetFramework>
6+
<LangVersion>13.0</LangVersion>
7+
88
<AssemblyTitle>EmbedIO Benchmarks</AssemblyTitle>
99
<Description>Test suite to be executed with TechEmpower FrameworkBenchmarks.</Description>
10-
11-
<StartupObject>Benchmarks.Program</StartupObject>
10+
11+
<StartupObject>Benchmarks.Program</StartupObject>
1212
<OutputType>Exe</OutputType>
13-
13+
1414
<ServerGarbageCollection>true</ServerGarbageCollection>
1515
<TieredCompilation>false</TieredCompilation>
16-
16+
1717
</PropertyGroup>
18-
18+
1919
<ItemGroup>
20-
<PackageReference Include="NetCoreServer" Version="5.0.7" />
21-
<PackageReference Include="System.Text.Json" Version="5.0.0" />
20+
<PackageReference Include="NetCoreServer" Version="8.0.7" />
21+
<PackageReference Include="System.Text.Json" Version="9.0.10" />
2222
</ItemGroup>
23-
24-
</Project>
23+
24+
</Project>

frameworks/CSharp/netcoreserver/Benchmarks/HttpBenchmarkSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected override void OnReceivedRequest(HttpRequest request)
2727
}
2828
else
2929
{
30-
SendResponseAsync(Response.MakeErrorResponse("Not found", 404));
30+
SendResponseAsync(Response.MakeErrorResponse(404, "Not found"));
3131
}
3232
}
3333

frameworks/CSharp/netcoreserver/Benchmarks/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Benchmarks
88
public static class Program
99
{
1010

11-
private static readonly ManualResetEvent _WaitEvent = new ManualResetEvent(false);
11+
private static readonly ManualResetEvent WaitEvent = new(false);
1212

1313
public static int Main(string[] args)
1414
{
@@ -18,12 +18,12 @@ public static int Main(string[] args)
1818
{
1919
AppDomain.CurrentDomain.ProcessExit += (_, __) =>
2020
{
21-
_WaitEvent.Set();
21+
WaitEvent.Set();
2222
};
2323

2424
server.Start();
2525

26-
_WaitEvent.WaitOne();
26+
WaitEvent.WaitOne();
2727

2828
return 0;
2929
}

frameworks/CSharp/netcoreserver/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ See the [project website](https://github.com/chronoxor/NetCoreServer) for more i
66

77
**Language**
88

9-
* C# 9.0
9+
* C# 13.0
1010

1111
**Platforms**
1212

13-
* .NET 5
13+
* .NET 9
1414

1515
**Web Servers**
1616

1717
* [NetCoreServer](https://github.com/chronoxor/NetCoreServer)
1818

19-
## Paths & Source for Tests
19+
## Paths \& Source for Tests
2020

2121
* [Plaintext](Benchmarks/HttpBenchmarkSession.cs): "/plaintext"
2222
* [JSON](Benchmarks/HttpBenchmarkSession.cs): "/json"

frameworks/CSharp/netcoreserver/netcoreserver.dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
22
WORKDIR /source
33

44
# copy csproj and restore as distinct layers
@@ -7,10 +7,10 @@ RUN dotnet restore -r linux-musl-x64
77

88
# copy and publish app and libraries
99
COPY Benchmarks/ .
10-
RUN dotnet publish -c release -o /app -r linux-musl-x64
10+
RUN dotnet publish -c release -o /app -r linux-musl-x64 --no-restore --self-contained
1111

1212
# final stage/image
13-
FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine
13+
FROM mcr.microsoft.com/dotnet/runtime-deps:9.0-alpine
1414
WORKDIR /app
1515
COPY --from=build /app .
1616

0 commit comments

Comments
 (0)