Exemple #1
0
        public BaseResult <LogonResult> Logon(LogonRequest logon)
        {
            var validator = new LogonRequestValidator();
            var results   = validator.Validate(logon);

            if (results.IsValid)
            {
                return(_gameManager.Execute(logon));
            }
            else
            {
                return(BaseResult <LogonResult> .Fail(errors : results.Errors.Select(e => e.ErrorMessage)));
            }
        }
 public BaseResult<LogonResult> Logon(LogonRequest logon)
 {
     var validator = new LogonRequestValidator();
     var results = validator.Validate(logon);
     if (results.IsValid)
     {
         return _gameManager.Execute(logon);
         
     }
     else
     {
         return BaseResult<LogonResult>.Fail(errors:results.Errors.Select(e => e.ErrorMessage));
     }
 }