public Processor(IServicePersistence google, ServiceRSS rss, IServiceMail sendgrid, ServiceLogger logger) { this._google = google; this._rss = rss; this._sendgrid = sendgrid; this._logger = logger; }
public ServiceGoogleSheet(GoogleApiConfig config, ServiceLogger log) { this._log = log; GoogleCredential credential; string credentialsAsJson = JsonConvert.SerializeObject(config); credential = GoogleCredential.FromJson(credentialsAsJson) .CreateScoped(_scopes); this._spreadsheetId = config.SpreadsheetId; this._sheet = config.Sheet; this._applicationName = config.ApplicationName; // Create Google Sheets API service. _service = new SheetsService(new BaseClientService.Initializer() { HttpClientInitializer = credential, ApplicationName = _applicationName, }); }