private void OnNextPromiseResult(PromiseResult promiseResult) { var id = Int64.Parse(promiseResult.Id); if (pendingPromises.Has(id)) { var pendingPromise = pendingPromises.Get(id); pendingPromise.Continuation(promiseResult); } }
public bool OnProcessMessage(CefProcessMessage message) { if (message.Name != Messages.RpcRequestMessage) { return(false); } var response = (RpcRequest <CefValue>)objectSerializer.Deserialize(message.Arguments.GetValue(0), typeof(RpcRequest <CefValue>)); var handled = false; if (response?.CallbackExecution != null) { HandledCallbackExecution(response); handled = true; } else if (response?.DeleteCallback != null) { if (callbackRegistry.Has(response.DeleteCallback.FunctionId)) { callbackRegistry.Get(response.DeleteCallback.FunctionId); } handled = true; } else if (response?.MethodResult != null) { HandleMethodResult(response); handled = true; } else if (response?.DynamicObjectResult != null) { HandleBindingResult(response); } return(handled); }