Exemplo n.º 1
0
    public Result<bool?> VerifyUser(string username, string password)
    {
      Result<bool?> retResult = Result<bool?>.Undefined(null);
      try
      {
        var verified = VerifyUserImpl(username, password);
        retResult = Result<bool?>.Success(verified);
      }
      catch (Exception ex)
      {
        var wrapperEx = new Exceptions.VerifyUserFailedException(ex, username);
        retResult = Result<bool?>.FailureWithInfo(null, wrapperEx);
      }

      return retResult;
    }
Exemplo n.º 2
0
        public Result <bool?> VerifyUser(string username, string password)
        {
            Result <bool?> retResult = Result <bool?> .Undefined(null);

            try
            {
                var verified = VerifyUserImpl(username, password);
                retResult = Result <bool?> .Success(verified);
            }
            catch (Exception ex)
            {
                var wrapperEx = new Exceptions.VerifyUserFailedException(ex, username);
                retResult = Result <bool?> .FailureWithInfo(null, wrapperEx);
            }

            return(retResult);
        }