コード例 #1
0
        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();
        }
コード例 #2
0
        private MessageBridgeRequest(string name, int browserId, long frameId, int contextId)
        {
            Name      = name;
            BrowserId = browserId;
            FrameId   = frameId;
            ContextId = contextId;

            Arguments = new MessageArrayValue();
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
            }
        }
コード例 #5
0
 public abstract void OnBrowserSideMessageReceived(string message, CefFrame frame, MessageArrayValue arguments);
コード例 #6
0
 private MessageBridgeResponse()
 {
     Arguments = new MessageArrayValue();
 }