Exemple #1
0
        public ExecutionResult ExecuteRequest(BaseDataToken data)
        {
            if (data is FinanceDataToken)
            {
                var execResult = _actionDict[data.ActionName]((FinanceDataToken)data);
                if (execResult.Succeed)
                {
                    Task.Run(() => { _routeContainer.MailHandler.SendMail(_routeContainer.RouteMessage, execResult, data.Name); });
                }

                return(execResult);
            }
            else
            {
                throw new ArgumentException("Data is invalid");
            }
        }
Exemple #2
0
 public ExecutionResult GetUserInfo(BaseDataToken data)
 {
     _routeContainer.MailHandler.SendMail(_routeContainer.RouteMessage, new ExecutionResult(true, "Good Good"), data.Name);
     return(new ExecutionResult(true, _moneyList[data.Name].ToString()));
 }