public override ReferenceReader Initialize() { LoadCache(); if (!IsAllDataCached() || CardMakerInstance.ForceDataCacheRefresh) { var zSpreadsheet = new GoogleSpreadsheet(CardMakerInstance.GoogleInitializerFactory); try { zSpreadsheet.MakeSimpleSpreadsheetRequest(); } catch (GoogleApiException e) { if (GoogleApi.IsAuthorizationError(e)) { CardMakerInstance.GoogleCredentialsInvalid = true; } } catch (Exception e) { Logger.AddLogLine("Google Access Error: {0}".FormatString(e.Message)); } } return(this); }
public GoogleReferenceReader() { LoadCache(); if (!IsAllDataCached() || CardMakerInstance.ForceDataCacheRefresh) { var zSpreadsheet = new GoogleSpreadsheet(CardMakerInstance.GoogleInitializerFactory); try { zSpreadsheet.MakeSimpleSpreadsheetRequest(); } catch (GoogleApiException e) { if (GoogleApi.IsAuthorizationError(e)) { CardMakerInstance.GoogleCredentialsInvalid = true; } } } }