forked from CopyText/TextCopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
30 lines (27 loc) · 814 Bytes
/
Program.cs
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
using System;
using System.Net.Http;
using System.Threading.Tasks;
using BlazorSample;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using TextCopy;
public class Program
{
public static Task Main()
{
#region BlazorStartup
var builder = WebAssemblyHostBuilder.CreateDefault();
var serviceCollection = builder.Services;
#region InjectClipboard
serviceCollection.InjectClipboard();
#endregion
builder.RootComponents.Add<App>("app");
#endregion
serviceCollection.AddTransient(
provider => new HttpClient
{
BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)
});
return builder.Build().RunAsync();
}
}