public WatchNotify(string googleUserName, string googlePassword, IEmailService mailService) { if (String.IsNullOrEmpty(googleUserName) || String.IsNullOrEmpty(googlePassword)) throw new ArgumentException("Please provide google credentials"); GoogleUserName = googleUserName; GooglePassword = googlePassword; MySpreadsheetService = new SpreadsheetsService("AuctionWatchNotify"); MySpreadsheetService.setUserCredentials(GoogleUserName, GooglePassword); if (!mailService.CheckConnection()) throw new ArgumentException("Please pass in a working email service account"); MyEmailService = mailService; }
public WatchNotify(string googleUserName, string googlePassword, IEmailService mailService) { if (String.IsNullOrEmpty(googleUserName) || String.IsNullOrEmpty(googlePassword)) { throw new ArgumentException("Please provide google credentials"); } GoogleUserName = googleUserName; GooglePassword = googlePassword; MySpreadsheetService = new SpreadsheetsService("AuctionWatchNotify"); MySpreadsheetService.setUserCredentials(GoogleUserName, GooglePassword); if (!mailService.CheckConnection()) { throw new ArgumentException("Please pass in a working email service account"); } MyEmailService = mailService; }