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; }
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); }