/// <summary> /// Set current profile as default /// </summary> /// <returns></returns> public async Task SetAsDefault() { var settings = FreeJiraSettings.FromInterface(await GetSettings()); settings.DefaultProfile = GetProfile().ProfileName; await FreeJiraSettings.UpdateSettings(settings); }
public async Task TestName() { var settings = await FreeJiraSettings.GetSettings(); Assert.NotNull(settings); Assert.NotNull(settings.Folder); Assert.True(settings.Folder.Exists); }
public static async Task <int> Main(string[] args) { var settings = await FreeJiraSettings.GetSettings(); if (args.Contains("--server") || (settings.StartupMode == StartupMode.Server) && !args.Contains("--terminal")) { CreateHostBuilder(args, settings.ServerPort).Build().Run(); return(0); } else { return(await Terminal.TerminalHandler.HandleArgs(args)); } }
public static async Task <bool> SetDefaultProfile(string profileName) { var exist = (await GetAvailableProfiles()) .Any(p => p == profileName); if (!exist) { return(false); } var settings = FreeJiraSettings.FromInterface(await GetSettings()); settings.DefaultProfile = profileName; await FreeJiraSettings.UpdateSettings(settings); return(true); }
private static Task <IFreeJiraSettings> GetSettings() => FreeJiraSettings.GetSettings();