37 references to IpcCommon
Microsoft.AspNetCore.Components.WebView (28)
IpcReceiver.cs (8)
35
if (
IpcCommon
.TryDeserializeIncoming(message, out var messageType, out var args))
37
if (messageType ==
IpcCommon
.IncomingMessageType.AttachPage)
51
case
IpcCommon
.IncomingMessageType.BeginInvokeDotNet:
54
case
IpcCommon
.IncomingMessageType.EndInvokeJS:
57
case
IpcCommon
.IncomingMessageType.ReceiveByteArrayFromJS:
60
case
IpcCommon
.IncomingMessageType.OnRenderCompleted:
63
case
IpcCommon
.IncomingMessageType.OnLocationChanged:
66
case
IpcCommon
.IncomingMessageType.OnLocationChanging:
IpcSender.cs (20)
32
var message =
IpcCommon
.Serialize(
IpcCommon
.OutgoingMessageType.RenderBatch, batchId, Convert.ToBase64String(arrayBuilder.Buffer, 0, arrayBuilder.Count));
39
DispatchMessageWithErrorHandling(
IpcCommon
.Serialize(
IpcCommon
.OutgoingMessageType.Navigate, uri, options));
44
DispatchMessageWithErrorHandling(
IpcCommon
.Serialize(
IpcCommon
.OutgoingMessageType.Refresh, forceReload));
49
DispatchMessageWithErrorHandling(
IpcCommon
.Serialize(
IpcCommon
.OutgoingMessageType.AttachToDocument, componentId, selector));
54
DispatchMessageWithErrorHandling(
IpcCommon
.Serialize(
55
IpcCommon
.OutgoingMessageType.BeginInvokeJS,
67
DispatchMessageWithErrorHandling(
IpcCommon
.Serialize(
IpcCommon
.OutgoingMessageType.EndInvokeDotNet, callId, success, invocationResultOrError));
72
DispatchMessageWithErrorHandling(
IpcCommon
.Serialize(
IpcCommon
.OutgoingMessageType.SendByteArrayToJS, id, data));
77
DispatchMessageWithErrorHandling(
IpcCommon
.Serialize(
IpcCommon
.OutgoingMessageType.SetHasLocationChangingListeners, hasListeners));
82
DispatchMessageWithErrorHandling(
IpcCommon
.Serialize(
IpcCommon
.OutgoingMessageType.EndLocationChanging, callId, shouldContinueNavigation));
88
var message =
IpcCommon
.Serialize(
IpcCommon
.OutgoingMessageType.NotifyUnhandledException, exception.Message, exception.StackTrace);
Microsoft.AspNetCore.Components.WebView.Test (9)
Infrastructure\AssertHelpers.cs (6)
15
Assert.True(
IpcCommon
.TryDeserializeOutgoing(message, out var messageType, out var args));
16
Assert.Equal(
IpcCommon
.OutgoingMessageType.BeginInvokeJS, messageType);
23
Assert.True(
IpcCommon
.TryDeserializeOutgoing(message, out var messageType, out var args));
24
Assert.Equal(
IpcCommon
.OutgoingMessageType.AttachToDocument, messageType);
32
Assert.True(
IpcCommon
.TryDeserializeOutgoing(message, out var messageType, out var args));
33
Assert.Equal(
IpcCommon
.OutgoingMessageType.RenderBatch, messageType);
Infrastructure\TestWebViewManager.cs (3)
30
internal void ReceiveIpcMessage(
IpcCommon
.IncomingMessageType messageType, params object[] args)
33
MessageReceived(new Uri(AppBaseUri, "/page"),
IpcCommon
.Serialize(messageType, args));
38
ReceiveIpcMessage(
IpcCommon
.IncomingMessageType.AttachPage, "http://example/", "http://example/testStartUrl");