Esempio n. 1
0
        public void InvokeAction(WebSocketConnectionBase connection, string action, JObject args)
        {
            Connection = connection;
            ActionName = action;
            ActionArgs = args;

            try
            {
                BeforeActionInvoke();
                _actionInvoker.InvokeAction(this, action);
                AfterActionInvoke();
            }
            catch (WebSocketRequestException e)
            {
                SendErrorResponse(e.Message);
            }
            catch (Exception)
            {
                SendErrorResponse("Server error");
                throw;
            }
        }