Skip to content
代码片段 群组 项目
未验证 提交 bbd78f1a 编辑于 作者: Pranav K's avatar Pranav K
浏览文件

Fixup

上级 766ce386
No related branches found
No related tags found
无相关合并请求
...@@ -27,18 +27,10 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.HotReload ...@@ -27,18 +27,10 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.HotReload
{ {
_hotReloadAgent = new HotReloadAgent(m => Debug.WriteLine(m)); _hotReloadAgent = new HotReloadAgent(m => Debug.WriteLine(m));
try // Attempt to read previously applied hot reload deltas. dotnet-watch and VS will serve the script that can provide results from local-storage and
{ // the injected middleware if present.
// Attempt to read previously applied hot reload deltas. dotnet-watch and VS will serve the script that can provide results from local-storage and var jsObjectReference = (IJSUnmarshalledObjectReference)(await DefaultWebAssemblyJSRuntime.Instance.InvokeAsync<IJSObjectReference>("import", "./_framework/blazor-hotreload.js"));
// the injected middleware if present. await jsObjectReference.InvokeUnmarshalled<Task<int>>("receiveHotReload");
var jsObjectReference = (IJSUnmarshalledObjectReference)(await DefaultWebAssemblyJSRuntime.Instance.InvokeAsync<IJSObjectReference>("import", "./_framework/blazor-hotreload.js"));
await jsObjectReference.InvokeUnmarshalled<Task<int>>("receiveHotReload");
}
catch (Exception ex)
{
// The middleware may be unavailable in some cases - https://github.com/dotnet/aspnetcore/issues/34962. This is not a reason to fail, so swallow the exception and continue.
Debug.WriteLine(ex);
}
} }
/// <summary> /// <summary>
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册