csnewman / BlazorSignalR

SignalR Core C# client Blazor compatibility
MIT License
64 stars 21 forks source link

Update to blazor 3.1.0 preview 3 #39

Closed LunicLynx closed 4 years ago

LunicLynx commented 4 years ago

Update to blazor 3.1.0 preview 3

Updated the references for 3.1.0 preview 3.

Please review BlazorHttpConnection.cs the type WebAssemblyHttpMessageHandler is not available anymore. I looked at how blazor is getting this type now see here:

https://github.com/aspnet/AspNetCore/blob/e683b087c5c395bfa279940aadd3ee8b57b7d886/src/Components/Blazor/Blazor/src/Http/WebAssemblyHttpMessageHandlerOptions.cs#L37

I think my fix is the closest we can get at the moment. It might break in a future version without creating a build error though.

csnewman commented 4 years ago

Not a massive fan of the quantity of reflection getting used in recent versions. However, Its the best we can do. Thanks for this! I'll get a release out soon.

LunicLynx commented 4 years ago

Yeah me neither. It would be possible to reference WebAssembly.Net.Http directly, but I did not find the version blazor is using. And they also don’t have a direct reference (not sure why). This looked like the best compromise for now...

h3x4d3c1m4l commented 4 years ago

Very close: aspnet/Blazor#1958!