mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 17:00:03 +08:00
22 lines
629 B
C#
22 lines
629 B
C#
using System;
|
|
using System.Net.Http;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace MQTTnet.Test.BlazorApp.Client
|
|
{
|
|
public static class Program
|
|
{
|
|
public static Task Main(string[] args)
|
|
{
|
|
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|
builder.RootComponents.Add<App>("app");
|
|
|
|
builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
|
|
|
return builder.Build().RunAsync();
|
|
}
|
|
}
|
|
}
|