added packages and code in Program.cs to SignalIR
This commit is contained in:
parent
43b20f03dd
commit
a0d5df1c52
2 changed files with 21 additions and 6 deletions
|
@ -9,6 +9,8 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.11" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.11" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.11" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.11" PrivateAssets="all" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.2.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.11" />
|
||||||
<PackageReference Include="Syncfusion.Blazor.Maps" Version="23.1.38" />
|
<PackageReference Include="Syncfusion.Blazor.Maps" Version="23.1.38" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,13 @@ using Microsoft.AspNetCore.Components.Web;
|
||||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||||
using Interlinked.Core;
|
using Interlinked.Core;
|
||||||
using Syncfusion.Blazor;
|
using Syncfusion.Blazor;
|
||||||
|
using Microsoft.AspNetCore.ResponseCompression;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
|
||||||
|
internal class Program
|
||||||
|
{
|
||||||
|
private static async Task Main(string[] args)
|
||||||
|
{
|
||||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||||
builder.RootComponents.Add<App>("#app");
|
builder.RootComponents.Add<App>("#app");
|
||||||
builder.RootComponents.Add<HeadOutlet>("head::after");
|
builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||||
|
@ -10,4 +16,11 @@ IServiceCollection serviceCollection = builder.Services.AddSyncfusionBlazor();
|
||||||
|
|
||||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
||||||
|
|
||||||
|
builder.Services.AddResponseCompression(opts =>
|
||||||
|
{
|
||||||
|
opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(
|
||||||
|
new[] { "application/octet-stream" });
|
||||||
|
});
|
||||||
await builder.Build().RunAsync();
|
await builder.Build().RunAsync();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue