-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathProgram.cs
More file actions
37 lines (30 loc) · 785 Bytes
/
Program.cs
File metadata and controls
37 lines (30 loc) · 785 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
36
37
// 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;
#else
using Windows.UI.Xaml;
#endif
namespace CommunityToolkit.App.Wasm;
public class Program
{
#if WINAPPSDK
static async Task Main(string[] args)
{
var host = UnoPlatformHostBuilder.Create()
.App(() => new CommunityToolkit.App.Shared.App())
.UseWebAssembly()
.Build();
await host.RunAsync();
}
#else
private static CommunityToolkit.App.Shared.App? _app;
static int Main(string[] args)
{
Application.Start(_ => _app = new CommunityToolkit.App.Shared.App());
return 0;
}
#endif
}