File tree Expand file tree Collapse file tree 2 files changed +13
-44
lines changed Expand file tree Collapse file tree 2 files changed +13
-44
lines changed Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft. All rights reserved.
22// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
4- using Microsoft . AspNetCore ;
5- using Microsoft . AspNetCore . Hosting ;
4+ using Microsoft . AspNetCore . Builder ;
5+ using Microsoft . Extensions . DependencyInjection ;
6+ using Microsoft . Azure . SignalR . Samples . Whiteboard ;
67
7- namespace Microsoft . Azure . SignalR . Samples . Whiteboard ;
8+ var builder = WebApplication . CreateBuilder ( args ) ;
9+ builder . Services . AddSingleton < Diagram > ( ) ;
10+ builder . Services . AddMvc ( ) ;
11+ builder . Services . AddSignalR ( ) . AddAzureSignalR ( ) ;
812
9- public class Program
10- {
11- public static void Main ( string [ ] args )
12- {
13- CreateWebHostBuilder ( args ) . Build ( ) . Run ( ) ;
14- }
13+ var app = builder . Build ( ) ;
14+ app . UseRouting ( ) ;
15+ app . UseFileServer ( ) ;
16+ app . MapControllers ( ) ;
17+ app . MapHub < DrawHub > ( "/draw" ) ;
1518
16- public static IWebHostBuilder CreateWebHostBuilder ( string [ ] args ) =>
17- WebHost . CreateDefaultBuilder ( args )
18- . UseStartup < Startup > ( ) ;
19- }
19+ app . Run ( ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments