public PMAPIExample(string username, string password) { try { SuT.PMAPI.PMAPITokenGenerator tokenGenerator = new SuT.PMAPI.PMAPITokenGenerator(username, password); client = new SuT.PMAPI.PMAPIClient(new TokenAuthenticator(tokenGenerator.getToken())); } catch (SuT.PMAPI.PMAPITokenAuthorizationException exception) { Console.WriteLine("ERROR: Unable to authenticate, please check your details and try again."); Environment.Exit(1); } }
public PMAPIExample(string username, string password) { try { SuT.PMAPI.PMAPITokenGenerator tokenGenerator = new SuT.PMAPI.PMAPITokenGenerator(username, password); client = new SuT.PMAPI.PMAPIClient(new TokenAuthenticator(tokenGenerator.getToken())); } catch(SuT.PMAPI.PMAPITokenAuthorizationException exception) { Console.WriteLine("ERROR: Unable to authenticate, please check your details and try again."); Environment.Exit(1); } }