/// <summary> /// Print all available profiles /// </summary> /// <returns></returns> private static async Task ListProfiles() { var defaultProfile = await JiraProfileService.GetDefaultProfileName(); foreach (var p in await JiraProfileService.GetAvailableProfiles()) { string isDefault() => defaultProfile == p ? " * " : ""; Console.WriteLine(" -> " + p + isDefault()); } }
private static async Task PrintDefaultProfile() { var profileName = await JiraProfileService.GetDefaultProfileName(); Console.WriteLine(profileName); }
public static async Task <string?> GetProfileNameOrDefault(string?profileName) { return(string.IsNullOrEmpty(profileName) ? await JiraProfileService.GetDefaultProfileName() : profileName); }