From ccbff06090b1b17ca4348235cae395a3054eb705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20Ko=C5=BEelj?= Date: Tue, 17 Jan 2023 14:12:42 +0100 Subject: [PATCH] Add connected startup support --- .../ClientStartup.cs | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/Connected.Components.Showcase/ClientStartup.cs diff --git a/src/Connected.Components.Showcase/ClientStartup.cs b/src/Connected.Components.Showcase/ClientStartup.cs new file mode 100644 index 0000000..0cac1bb --- /dev/null +++ b/src/Connected.Components.Showcase/ClientStartup.cs @@ -0,0 +1,25 @@ +using Connected.Startup; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Connected.Services; + +namespace Connected.Components.Showcase; + +public class ClientStartup : IStartup +{ + public static IServiceProvider Services { get; private set; } = default!; + + public async Task Configure(WebAssemblyHost host) + { + Services = host.Services; + + await Task.CompletedTask; + } + + public async Task ConfigureServices(IServiceCollection services) + { + services.AddUIComponentServices(); + + await Task.CompletedTask; + } +}