public static void DisplayInfo() { try { foreach (string str in SelfHelpManager.GetScriptInfo()) { PrintCentered(str); } } catch (Exception ex) { Debug.WriteLine(ex); } }
public static void ClearCredentials() { try { var res = SelfHelpManager.ClearCredentials().Result; printTaskResult(res.ToString(), res.IsSuccess); } catch (Exception ex) { PrintErrorCentered(ex.Message); } }
public static void UpdateDeploymentVersionNumber(int VersionNumber) { try { var res = SelfHelpManager.UpdateDeploymentVersionNumber(VersionNumber).Result; printTaskResult(res.ToString(), res.IsSuccess); } catch (Exception ex) { PrintErrorCentered(ex.Message); } }
public static void CreateManifestFile() { try { var res = SelfHelpManager.CreateNewAppsScriptManifestJSONFile().Result; printTaskResult(res.ToString(), res.IsSuccess); } catch (Exception ex) { PrintErrorCentered(ex.Message); } }
public static void CreateSourceCodeFile(string Name, SelfHelpManager.FILE_TYPES F, bool Sync) { try { var res = SelfHelpManager.AddNewSourceFile(Name, F, Sync).Result; printTaskResult(res.ToString(), res.IsSuccess); } catch (Exception ex) { PrintErrorCentered(ex.Message); } }
public static void DownloadSelfHelpSourceCode() { try { var res = SelfHelpManager.DownloadSelfHelpSourceFiles().Result; printTaskResult(res.ToString(), res.IsSuccess); } catch (Exception ex) { PrintErrorCentered(ex.Message); } }
public static void DownloadFilesVersion(int VersionNumber) { try { var res = SelfHelpManager.DownloadFiles(VersionNumber).Result; printTaskResult(res.ToString(), res.IsSuccess); } catch (Exception ex) { PrintErrorCentered(ex.Message); } }
public static void CreateGASProject(string Name) { try { var res = SelfHelpManager.CreateNewGASProject(Name).Result; printTaskResult(res.ToString(), res.IsSuccess); } catch (Exception ex) { PrintErrorCentered(ex.Message); } }
public static void InitializeLibrary() { try { var res = SelfHelpManager.Initialize(SourceCode).Result; printTaskResult(res.ToString(), res.IsSuccess); DisplayInfo(); } catch (Exception ex) { PrintErrorCentered(ex.Message); } }
public static bool CreateNewVersionAndUpdateDeployment(string Description) { try { var res = SelfHelpManager.CreateNewVersionAndUpdateDeployment(Description).Result; printTaskResult(res.ToString(), res.IsSuccess); return(res.IsSuccess); } catch (Exception ex) { PrintErrorCentered(ex.Message); return(false); } }
public static bool VersionBackupThenUploadFiles() { try { var res = SelfHelpManager.PreVersionAndSyncChanges().Result; printTaskResult(res.ToString(), res.IsSuccess); return(res.IsSuccess); } catch (Exception ex) { PrintErrorCentered(ex.Message); return(false); } }
public static void GetWatchers() { if (AutoSync && watchers == null) { watchers = SelfHelpManager.GetWatchers(); watchers?.ForEach(fw => { fw.NotifyFilter = System.IO.NotifyFilters.LastWrite; fw.Changed += fw_Changed; fw.EnableRaisingEvents = true; }); } }
/// <summary> /// Lists the versions of your project /// </summary> /// <returns>Boolean representing the success of this execution.</returns> public static bool ListProjectVersions() { try { var result = SelfHelpManager.ListVersions().Result; if (result.IsSuccess) { versions = result.MyResult; result.MyResult?.ForEach(v => PrintCentered(string.Format(" Version #{0}, Create Time {1}, Description {2}", v.VersionNumber, v.CreateTime, v.Description))); return(true); } else { PrintErrorCentered(result.AdditionalInformation); return(false); } } catch (Exception ex) { PrintErrorCentered(ex.Message); return(false); } }