-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathProgram.cs
More file actions
35 lines (28 loc) · 757 Bytes
/
Program.cs
File metadata and controls
35 lines (28 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using CommunityToolkit.App.Shared;
#if WINAPPSDK
using Uno.UI.Hosting;
#endif
namespace ProjectTemplateExperiment.Samples.Wasm;
public class Program
{
#if WINAPPSDK
static async Task Main(string[] args)
{
var host = UnoPlatformHostBuilder.Create()
.App(() => new App())
.UseWebAssembly()
.Build();
await host.RunAsync();
}
#else
private static App? _app;
static int Main(string[] args)
{
Application.Start(_ => _app = new App());
return 0;
}
#endif
}