public bool Connect() { try { var res = true; if (File.Exists(AuthInfoPath)) { _authInfo = GAPIBaseObject.LoadFromFile <GAPIClientAuthorizationInfo>(AuthInfoPath); } else { Logger.Info($"Missing {AuthInfoPath}"); res = false; } if (File.Exists(JournalPath)) { _uploadedJournal = GAPIBaseObject.LoadFromFile <UploadedJournal>(JournalPath); } else { Logger.Debug($"Missing {JournalPath}"); } if (res) { _accountConnection = new GAPIAccountConnection(_authInfo); _accountConnection.Connect(); } return(res); } catch (Exception ex) { Logger.Error(ex); throw; } }
public PhotoUpload() { Logger.Debug("Starting PhotoUploader process"); _authInfo = new GAPIClientAuthorizationInfo(); }