private static async Task <JiraProfileService> FromName(string profileName, string password) { var settings = await GetSettings(); var profilePath = GetAndCreateProfileFolder(settings, profileName); var db = ProfilePath.GetDatabase(settings, profileName, password); return(new JiraProfileService(db, profilePath)); }
private static FileInfo GetAndCreateProfileFolder(IFreeJiraSettings settings, string profileName) { var path = ProfilePath.GetProfilePath(settings, profileName); if (!path.Directory.Exists) { path.Directory.Create(); } return(path); }
/// <summary> /// Return list of available profiles /// </summary> /// <returns></returns> public static async Task <IEnumerable <string> > GetAvailableProfiles() { var settings = await GetSettings(); return(ProfilePath.GetAvailableProfiles(settings)); }