From 57c8905d6fe7cf460b80ee78c058f70e076112a5 Mon Sep 17 00:00:00 2001 From: David Driscoll Date: Thu, 30 Jun 2022 23:39:36 -0400 Subject: [PATCH] initial work on webhosting (#1179) * initial work on webhosting * initial work on webhosting --- Directory.Packages.props | 1 + LaunchPad.sln | 15 +++ Readme.md | 4 + sample/Directory.Build.props | 5 + .../Sample.BlazorServer.csproj | 2 +- sample/Sample.Command/Sample.Command.csproj | 2 +- sample/Sample.Core/DataConvention.cs | 5 +- sample/Sample.Core/Domain/RocketDbContext.cs | 13 ++ sample/Sample.Core/Sample.Core.csproj | 2 +- sample/Sample.Grpc/Sample.Grpc.csproj | 2 +- sample/Sample.Pages/Sample.Pages.csproj | 2 +- sample/Sample.Restful/Program.cs | 71 ++++++++-- sample/Sample.Restful/Sample.Restful.csproj | 5 +- sample/Sample.Restful/Startup.cs | 73 ----------- sample/Sample.Worker/Sample.Worker.csproj | 2 +- .../ConventionTestWebHost.cs | 122 +++++++++++++++--- ...t.Surgery.LaunchPad.EntityFramework.csproj | 4 +- ...ocket.Surgery.LaunchPad.Web.Hosting.csproj | 14 ++ .../Sample.BlazorServer.Tests.csproj | 2 +- .../Sample.Command.Tests.csproj | 2 +- .../Sample.Core.Tests.csproj | 2 +- .../Sample.Grpc.Tests.csproj | 2 +- .../Sample.Pages.Tests.csproj | 2 +- .../ApiDescriptionData.cs | 4 +- test/Sample.Restful.Tests/FoundationTests.cs | 2 +- .../Sample.Restful.Tests/HandleWebHostBase.cs | 36 +----- .../RestfulConventionTests.cs | 58 ++++----- .../Sample.Restful.Tests.csproj | 2 +- test/Sample.Restful.Tests/TestWebHost.cs | 36 +++--- .../Sample.Worker.Tests.csproj | 2 +- 30 files changed, 289 insertions(+), 205 deletions(-) delete mode 100644 sample/Sample.Restful/Startup.cs create mode 100644 src/Web.Hosting/Rocket.Surgery.LaunchPad.Web.Hosting.csproj diff --git a/Directory.Packages.props b/Directory.Packages.props index 95e68fb9c..212f0061b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -96,6 +96,7 @@ + diff --git a/LaunchPad.sln b/LaunchPad.sln index 20d0db1de..77c04d062 100644 --- a/LaunchPad.sln +++ b/LaunchPad.sln @@ -125,6 +125,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.BlazorWasm", "sample EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.BlazorWasm.Tests", "test\Sample.BlazorWasm.Tests\Sample.BlazorWasm.Tests.csproj", "{A2C670CA-EFDD-468E-BEA1-D6D5A97270C4}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rocket.Surgery.LaunchPad.Web.Hosting", "src\Web.Hosting\Rocket.Surgery.LaunchPad.Web.Hosting.csproj", "{10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -729,6 +731,18 @@ Global {A2C670CA-EFDD-468E-BEA1-D6D5A97270C4}.Release|x64.Build.0 = Release|Any CPU {A2C670CA-EFDD-468E-BEA1-D6D5A97270C4}.Release|x86.ActiveCfg = Release|Any CPU {A2C670CA-EFDD-468E-BEA1-D6D5A97270C4}.Release|x86.Build.0 = Release|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Debug|x64.ActiveCfg = Debug|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Debug|x64.Build.0 = Debug|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Debug|x86.ActiveCfg = Debug|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Debug|x86.Build.0 = Debug|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Release|Any CPU.Build.0 = Release|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Release|x64.ActiveCfg = Release|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Release|x64.Build.0 = Release|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Release|x86.ActiveCfg = Release|Any CPU + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -787,5 +801,6 @@ Global {A64647FF-BCBA-4B13-BC99-CDE23C1D3CE8} = {8FFDF555-DB50-45F9-9A2D-6410F39151C3} {B786542C-3EE7-4B6C-9C5B-23E5CA4FE07C} = {5D11C19B-E8E4-4CE3-9C8A-1D368578EBCB} {A2C670CA-EFDD-468E-BEA1-D6D5A97270C4} = {DF33E0FB-9790-4654-B60F-8AB22E0CC3D1} + {10D4A16B-F9F0-4D88-8705-7AB36E20D8EF} = {8FFDF555-DB50-45F9-9A2D-6410F39151C3} EndGlobalSection EndGlobal diff --git a/Readme.md b/Readme.md index 90ea06438..f979b466e 100644 --- a/Readme.md +++ b/Readme.md @@ -44,6 +44,7 @@ A common set of libraries used to build console and web applications. | Rocket.Surgery.LaunchPad.Spatial | [![nuget-version-ze4kfhfg7xqg-badge]![nuget-downloads-ze4kfhfg7xqg-badge]][nuget-ze4kfhfg7xqg] | | Rocket.Surgery.LaunchPad.Spatial.NewtonsoftJson | [![nuget-version-qmfh1x0xpofq-badge]![nuget-downloads-qmfh1x0xpofq-badge]][nuget-qmfh1x0xpofq] | | Rocket.Surgery.LaunchPad.Testing | [![nuget-version-bhdja8ikzcgq-badge]![nuget-downloads-bhdja8ikzcgq-badge]][nuget-bhdja8ikzcgq] | +| Rocket.Surgery.LaunchPad.Web.Hosting | [![nuget-version-r6lkw/f1bsvg-badge]![nuget-downloads-r6lkw/f1bsvg-badge]][nuget-r6lkw/f1bsvg] | # Whats next? @@ -132,6 +133,9 @@ TBD [nuget-bhdja8ikzcgq]: https://www.nuget.org/packages/Rocket.Surgery.LaunchPad.Testing/ [nuget-version-bhdja8ikzcgq-badge]: https://img.shields.io/nuget/v/Rocket.Surgery.LaunchPad.Testing.svg?color=004880&logo=nuget&style=flat-square "NuGet Version" [nuget-downloads-bhdja8ikzcgq-badge]: https://img.shields.io/nuget/dt/Rocket.Surgery.LaunchPad.Testing.svg?color=004880&logo=nuget&style=flat-square "NuGet Downloads" +[nuget-r6lkw/f1bsvg]: https://www.nuget.org/packages/Rocket.Surgery.LaunchPad.Web.Hosting/ +[nuget-version-r6lkw/f1bsvg-badge]: https://img.shields.io/nuget/v/Rocket.Surgery.LaunchPad.Web.Hosting.svg?color=004880&logo=nuget&style=flat-square "NuGet Version" +[nuget-downloads-r6lkw/f1bsvg-badge]: https://img.shields.io/nuget/dt/Rocket.Surgery.LaunchPad.Web.Hosting.svg?color=004880&logo=nuget&style=flat-square "NuGet Downloads"