From 69c39937b357d9fadd564ab77e798f98ef9ca890 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Mon, 26 Feb 2018 10:15:42 +0000 Subject: [PATCH] Update StandaloneApp's Program.cs to make it more obvious how to configure DI services --- samples/StandaloneApp/Program.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/samples/StandaloneApp/Program.cs b/samples/StandaloneApp/Program.cs index 1244342d11..dea7a06e10 100644 --- a/samples/StandaloneApp/Program.cs +++ b/samples/StandaloneApp/Program.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Blazor.Browser.Rendering; +using Microsoft.AspNetCore.Blazor.Browser.Services; namespace StandaloneApp { @@ -9,7 +10,12 @@ namespace StandaloneApp { public static void Main(string[] args) { - new BrowserRenderer().AddComponent("app"); + var serviceProvider = new BrowserServiceProvider(configure => + { + // Add any custom services here + }); + + new BrowserRenderer(serviceProvider).AddComponent("app"); } } }