File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Licensed under terms of MIT license (see LICENSE-MIT)
22// Copyright 2021 Atif Aziz, Dinh Doan Van Bien
33
4- namespace DocoptNet . Playground
5- {
6- using System ;
7- using System . Net . Http ;
8- using System . Threading . Tasks ;
9- using Microsoft . AspNetCore . Components . WebAssembly . Hosting ;
10- using Microsoft . Extensions . DependencyInjection ;
4+ using System ;
5+ using System . Net . Http ;
6+ using Microsoft . AspNetCore . Components . WebAssembly . Hosting ;
7+ using Microsoft . Extensions . DependencyInjection ;
118
12- static class Program
13- {
14- public static async Task Main ( string [ ] args )
15- {
16- var builder = WebAssemblyHostBuilder . CreateDefault ( args ) ;
17- builder . RootComponents . Add < App > ( "#app" ) ;
18- var baseUrl = new Uri ( builder . HostEnvironment . BaseAddress ) ;
19- builder . Services . AddScoped ( sp => new HttpClient { BaseAddress = baseUrl } ) ;
20- await builder . Build ( ) . RunAsync ( ) ;
21- }
22- }
23- }
9+ var builder = WebAssemblyHostBuilder . CreateDefault ( args ) ;
10+ builder . RootComponents . Add < DocoptNet . Playground . App > ( "#app" ) ;
11+ var baseUrl = new Uri ( builder . HostEnvironment . BaseAddress ) ;
12+ builder . Services . AddScoped ( _ => new HttpClient { BaseAddress = baseUrl } ) ;
13+ await builder . Build ( ) . RunAsync ( ) ;
You can’t perform that action at this time.
0 commit comments