public Responseo BeginProcess(Commando command)
        {
            switch (command.Action)
            {
            case CommandAction.MouseMove:
                var(deltaX, deltaY) = command.GetInts();
                MoveMouse(deltaX, deltaY);
                return(Responseo.CreateResponse(command, CommandDispatchResult.Ack));

            case CommandAction.MouseSet:
                var(xPosition, yPosition) = command.GetInts();
                SetMouse(xPosition, yPosition);
                return(Responseo.CreateResponse(command, CommandDispatchResult.Ack));

            case CommandAction.MouseClick:
                var clickButton = command.GetEnum <MouseButton>();
                ClickMouse(clickButton);
                return(Responseo.CreateResponse(command, CommandDispatchResult.Ack));

            case CommandAction.MouseWheel:
                var(wheelDirection, wheelAmount) = command.GetEnumInt <MouseWheelDirection>();
                WheelMouse(wheelDirection, wheelAmount);
                return(Responseo.CreateResponse(command, CommandDispatchResult.Ack));

            default:
                return(Responseo.CreateResponse(command, CommandDispatchResult.Nack));
            }
        }
 public Responseo BeginProcess(Commando command)
 {
     if (!CanProcess(command.Action))
     {
         throw new NotSupportedException("Command not supported");
     }
     _ = messenger.SendAsync(command.ToString());
     return(Responseo.CreateResponse(command, CommandDispatchResult.Ack));
 }
 public Responseo Process(Commando command)
 {
     if (hostProcessor.CanProcess(command.Action))
     {
         hostProcessor.BeginProcess(command);
         return(Responseo.CreateResponse(command, CommandDispatchResult.Ack));
     }
     else if (BrowserProcessor == null)
     {
         return(Responseo.CreateResponse(command, CommandDispatchResult.NoHandler));
     }
     else if (BrowserProcessor.CanProcess(command.Action))
     {
         return(BrowserProcessor.BeginProcess(command));
     }
     else
     {
         return(Responseo.CreateResponse(command, CommandDispatchResult.NoHandler));
     }
 }