public RegisterUser RegisterUser(string userName, string password, string email) { this.CheckAppKey(); if (!userName.HasValue() || !password.HasValue() || !email.HasValue()) { throw new ArgumentException("Username, Password or Email cannot be empty."); } else { try { var req = YifyAPI.GetRegisterUserRequest(this.appKey, userName, password, email); var res = YifyAPI.SendPostRequest(req); var rgu = _parser.ParseRegisterUserResponse(res); this.userKey = rgu.UserKey; return(rgu); } catch (Exception ex) { throw new YifyException("An error occurred. See inner exception for more details", ex); } } }