private MessageBridgeResponse(string json) { var retval = JsonSerializer.Deserialize <JsonBody>(json); IsSuccess = retval.IsSuccess; ExceptionMessage = retval.ExceptionMessage; Arguments = MessageValue.FromJson(retval.Arguments)?.GetArray() ?? (MessageArrayValue)MessageValue.CreateArray(); }
private MessageBridgeRequest(string name, int browserId, long frameId, int contextId) { Name = name; BrowserId = browserId; FrameId = frameId; ContextId = contextId; Arguments = new MessageArrayValue(); }
private MessageBridgeRequest(string json) { var retval = JsonSerializer.Deserialize <JsonBody>(json); Name = retval.Name; BrowserId = retval.BrowserId; FrameId = retval.FrameId; ContextId = retval.ContextId; BrowserId = retval.BrowserId; FrameId = retval.FrameId; Arguments = MessageValue.FromJson(retval.Arguments)?.GetArray() ?? (MessageArrayValue)MessageValue.CreateArray(); }
private BridgeMessage(string name, bool isFromJson) { if (isFromJson) { var request = JsonSerializer.Deserialize <JsonBody>(name); Name = request.Name; var retval = MessageValue.FromJson(request.Arguments); if (retval.ValueType == MessageValueType.Array) { Arguments = retval.GetArray(); } else { Arguments = new MessageArrayValue(); } } else { Name = name; Arguments = new MessageArrayValue(); } }
public abstract void OnBrowserSideMessageReceived(string message, CefFrame frame, MessageArrayValue arguments);
private MessageBridgeResponse() { Arguments = new MessageArrayValue(); }