コード例 #1
0
        public ApiResponse ProcessRequest(CefRequest request, IDictionary <string, string> parameters)
        {
            using (var handle = _eventProcessor.EnqueueEventForMainThread(new OpenMenuEvent()))
            {
                handle.WaitOne();
            }

            return(new ApiResponse(
                       null,
                       200
                       ));
        }
コード例 #2
0
ファイル: LoadGameAction.cs プロジェクト: asimonf/RetroLite
        public ApiResponse ProcessRequest(CefRequest request, IDictionary <string, string> parameters)
        {
            var gameId = parameters["id"];

            var game = _stateManager.GetGameById(gameId);

            if (null == game)
            {
                return(new ApiResponse(null, 404));
            }

            using (var handle = _eventProcessor.EnqueueEventForMainThread(new LoadGameEvent(game)))
            {
                handle.WaitOne();
            }

            return(new ApiResponse(null, 204));
        }