Update StandaloneApp's Program.cs to make it more obvious how to configure DI services

This commit is contained in:
Steve Sanderson 2018-02-26 10:15:42 +00:00
parent c0bf73234c
commit 69c39937b3
1 changed files with 7 additions and 1 deletions

View File

@ -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>("app");
var serviceProvider = new BrowserServiceProvider(configure =>
{
// Add any custom services here
});
new BrowserRenderer(serviceProvider).AddComponent<App>("app");
}
}
}