File tree Expand file tree Collapse file tree 6 files changed +13
-20
lines changed Expand file tree Collapse file tree 6 files changed +13
-20
lines changed Original file line number Diff line number Diff line change 1- FROM mcr.microsoft.com/dotnet/sdk:8 .0 AS build
1+ FROM mcr.microsoft.com/dotnet/sdk:9 .0 AS build
22WORKDIR /src
33COPY src .
44RUN apt-get update \
@@ -7,7 +7,7 @@ RUN apt-get update \
77WORKDIR "/src/Benchmark"
88RUN dotnet publish "Benchmark.csproj" -c Release -o /app/publish
99
10- FROM mcr.microsoft.com/dotnet/aspnet:8 .0 AS final
10+ FROM mcr.microsoft.com/dotnet/aspnet:9 .0 AS final
1111WORKDIR /app
1212EXPOSE 8080
1313COPY --from=build /app/publish .
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >net8 .0</TargetFramework >
4+ <TargetFramework >net9 .0</TargetFramework >
55 <Nullable >enable</Nullable >
66 <ImplicitUsings >enable</ImplicitUsings >
77 <DockerDefaultTargetOS >Linux</DockerDefaultTargetOS >
1818 </ItemGroup >
1919
2020 <ItemGroup >
21- <PackageReference Include =" Reaper.Core" Version =" 0.1.0-alpha.0.6 " />
22- <PackageReference Include =" Reaper.SourceGenerator" Version =" 0.1.0-alpha.0.6 " />
21+ <PackageReference Include =" Reaper.Core" Version =" 0.1.0-alpha.0.43 " />
22+ <PackageReference Include =" Reaper.SourceGenerator" Version =" 0.1.0-alpha.0.43 " />
2323 </ItemGroup >
2424
2525</Project >
Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ public class JsonResponse
1111[ ReaperRoute ( HttpVerbs . Get , "/json" ) ]
1212public class JsonEndpoint : ReaperEndpointXR < JsonResponse >
1313{
14- public override Task < JsonResponse > HandleAsync ( )
14+ public override Task ExecuteAsync ( )
1515 {
1616 Context . Response . ContentLength = 27 ;
17- return Task . FromResult ( new JsonResponse { Message = "Hello, World!" } ) ;
17+ Result = new JsonResponse { Message = "Hello, World!" } ;
18+ return Task . CompletedTask ;
1819 }
1920}
Original file line number Diff line number Diff line change @@ -6,11 +6,12 @@ namespace Benchmark;
66[ ReaperRoute ( HttpVerbs . Get , "/plaintext" ) ]
77public class PlainTextEndpoint : ReaperEndpointXR < string >
88{
9- public override Task < string > HandleAsync ( )
9+ public override Task ExecuteAsync ( )
1010 {
1111 Context . Response . StatusCode = 200 ;
1212 Context . Response . ContentType = "text/plain" ;
1313 Context . Response . ContentLength = 13 ;
14- return Task . FromResult ( "Hello, World!" ) ;
14+ Result = "Hello, World!" ;
15+ return Task . CompletedTask ;
1516 }
1617}
Original file line number Diff line number Diff line change 1- using System . Text . Json . Serialization ;
2- using Benchmark ;
31using Reaper ;
42
53var builder = WebApplication . CreateSlimBuilder ( args ) ;
64builder . Logging . ClearProviders ( ) ;
75builder . Logging . Configure ( o => o . ActivityTrackingOptions = ActivityTrackingOptions . None ) ;
8- builder . Services . ConfigureHttpJsonOptions ( o =>
9- {
10- o . SerializerOptions . TypeInfoResolverChain . Insert ( 0 , SourceGenerationContext . Default ) ;
11- } ) ;
126builder . UseReaper ( ) ;
137
148var app = builder . Build ( ) ;
159
1610app . UseReaperMiddleware ( ) ;
1711app . MapReaperEndpoints ( ) ;
1812
19- app . Run ( ) ;
20-
21- [ JsonSerializable ( typeof ( JsonResponse ) ) ]
22- internal partial class SourceGenerationContext : JsonSerializerContext { }
13+ app . Run ( ) ;
Original file line number Diff line number Diff line change 55 "Microsoft.AspNetCore" : " Warning"
66 }
77 }
8- }
8+ }
You can’t perform that action at this time.
0 commit comments