From 2916f4b09b0cf9e2075bee3fb934949dbae956ab Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Wed, 26 Aug 2020 12:56:56 -0700 Subject: [PATCH] Fixed server interop reliability tests (#25244) --- src/Components/Ignitor/src/BlazorClient.cs | 6 +++--- src/Components/Ignitor/src/CapturedJSInteropCall.cs | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Components/Ignitor/src/BlazorClient.cs b/src/Components/Ignitor/src/BlazorClient.cs index 5353659f36..b19ab8b3dd 100644 --- a/src/Components/Ignitor/src/BlazorClient.cs +++ b/src/Components/Ignitor/src/BlazorClient.cs @@ -353,7 +353,7 @@ namespace Ignitor _hubConnection = builder.Build(); HubConnection.On("JS.AttachComponent", OnAttachComponent); - HubConnection.On("JS.BeginInvokeJS", OnBeginInvokeJS); + HubConnection.On("JS.BeginInvokeJS", OnBeginInvokeJS); HubConnection.On("JS.EndInvokeDotNet", OnEndInvokeDotNet); HubConnection.On("JS.RenderBatch", OnRenderBatch); HubConnection.On("JS.Error", OnError); @@ -401,9 +401,9 @@ namespace Ignitor NextAttachComponentReceived?.Completion?.TrySetResult(call); } - private void OnBeginInvokeJS(int asyncHandle, string identifier, string argsJson) + private void OnBeginInvokeJS(int asyncHandle, string identifier, string argsJson, int resultType, long targetInstanceId) { - var call = new CapturedJSInteropCall(asyncHandle, identifier, argsJson); + var call = new CapturedJSInteropCall(asyncHandle, identifier, argsJson, resultType, targetInstanceId); Operations?.JSInteropCalls.Enqueue(call); JSInterop?.Invoke(call); diff --git a/src/Components/Ignitor/src/CapturedJSInteropCall.cs b/src/Components/Ignitor/src/CapturedJSInteropCall.cs index 4af491a58a..0dc8b0fa11 100644 --- a/src/Components/Ignitor/src/CapturedJSInteropCall.cs +++ b/src/Components/Ignitor/src/CapturedJSInteropCall.cs @@ -5,15 +5,19 @@ namespace Ignitor { public class CapturedJSInteropCall { - public CapturedJSInteropCall(int asyncHandle, string identifier, string argsJson) + public CapturedJSInteropCall(int asyncHandle, string identifier, string argsJson, int resultType, long targetInstanceId) { AsyncHandle = asyncHandle; Identifier = identifier; ArgsJson = argsJson; + ResultType = resultType; + TargetInstanceId = targetInstanceId; } public int AsyncHandle { get; } public string Identifier { get; } public string ArgsJson { get; } + public int ResultType { get; } + public long TargetInstanceId { get; } } }