From 003ec6590808e7ecf80ac1b68d5a2337810c51ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Sun, 5 May 2024 12:15:27 +0200 Subject: [PATCH] Add reflection and kestrel-minimal --- .github/workflows/sizestats.yml | 2 ++ src/hello-minimal/hello-minimal.csproj | 1 - src/kestrel-minimal/Program.cs | 8 ++++++++ src/kestrel-minimal/kestrel-minimal.csproj | 15 +++++++++++++++ src/reflection/Program.cs | 5 +++++ src/reflection/reflection.csproj | 10 ++++++++++ 6 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 src/kestrel-minimal/Program.cs create mode 100644 src/kestrel-minimal/kestrel-minimal.csproj create mode 100644 src/reflection/Program.cs create mode 100644 src/reflection/reflection.csproj diff --git a/.github/workflows/sizestats.yml b/.github/workflows/sizestats.yml index 6404719..aa57949 100644 --- a/.github/workflows/sizestats.yml +++ b/.github/workflows/sizestats.yml @@ -109,6 +109,8 @@ jobs: - hello-minimal - webapiaot - avalonia.app + - reflection + - kestrel-minimal include: - os: linux osrid: linux diff --git a/src/hello-minimal/hello-minimal.csproj b/src/hello-minimal/hello-minimal.csproj index 0d5315c..d9c0517 100644 --- a/src/hello-minimal/hello-minimal.csproj +++ b/src/hello-minimal/hello-minimal.csproj @@ -3,7 +3,6 @@ Exe net9.0 - hello_minimal enable enable true diff --git a/src/kestrel-minimal/Program.cs b/src/kestrel-minimal/Program.cs new file mode 100644 index 0000000..b4369f5 --- /dev/null +++ b/src/kestrel-minimal/Program.cs @@ -0,0 +1,8 @@ +var host = new WebHostBuilder() + .UseKestrelCore() + .Configure(app => + { + app.Run(context => context.Response.WriteAsync("Hello World")); + }) + .Build(); +host.Run(); diff --git a/src/kestrel-minimal/kestrel-minimal.csproj b/src/kestrel-minimal/kestrel-minimal.csproj new file mode 100644 index 0000000..93981a7 --- /dev/null +++ b/src/kestrel-minimal/kestrel-minimal.csproj @@ -0,0 +1,15 @@ + + + + net9.0 + enable + enable + true + true + Size + false + true + false + + + diff --git a/src/reflection/Program.cs b/src/reflection/Program.cs new file mode 100644 index 0000000..e917af2 --- /dev/null +++ b/src/reflection/Program.cs @@ -0,0 +1,5 @@ +using System; +using System.Reflection; +using System.Runtime.Versioning; + +Console.WriteLine(typeof(object).Assembly.GetCustomAttribute().FrameworkDisplayName); diff --git a/src/reflection/reflection.csproj b/src/reflection/reflection.csproj new file mode 100644 index 0000000..1ce1024 --- /dev/null +++ b/src/reflection/reflection.csproj @@ -0,0 +1,10 @@ + + + + Exe + net9.0 + true + true + + +