예제 #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;
    }
예제 #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);
        }