public static Settings GetGitSettings() { var settings = new Settings(); settings.ServerUrl = RegistrySettings.ReadValue("Github server url", "GithubUrl"); settings.Organization = RegistrySettings.ReadValue("Github organization", "Organization"); settings.Username = RegistrySettings.ReadValue("Github username", "Username"); settings.Password = RegistrySettings.ReadValue("Github password", "Password", true); settings.RootDir = RegistrySettings.ReadValue("Root directory", "RootDir"); return(settings); }
public static void CheckAllProjectDependencies() { var rootDir = RegistrySettings.ReadValue("Root directory", "RootDir"); var csprojFiles = Directory.EnumerateFiles(rootDir, "*.csproj", SearchOption.AllDirectories).ToList(); var tasks = new List <Task>(); foreach (var csprojFile in csprojFiles) { tasks.Add( Task.Run(() => { CheckProjectDependencies(csprojFile); }) ); } Task.WaitAll(tasks.ToArray()); Console.WriteLine("Press any key to return to menu."); Console.ReadKey(); }
public static void NugetUpdateAllProjects() { var rootDir = RegistrySettings.ReadValue("Root directory", "RootDir"); var csprojFiles = Directory.EnumerateFiles(rootDir, "*.csproj", SearchOption.AllDirectories).ToList(); var tasks = new List <Task>(); List <string> changedProjects = new List <string>(); foreach (var csprojFile in csprojFiles) { tasks.Add( Task.Run(() => { if (UpdateNuget(csprojFile, "Panacea.")) { changedProjects.Add(csprojFile); } }) ); } Task.WaitAll(tasks.ToArray()); Console.WriteLine(string.Join(Environment.NewLine, changedProjects)); Console.WriteLine("Press any key to return to menu."); Console.ReadKey(); }