public void Execute(ICollection <string> args) { var currentProj = storageHelper.GetProjectName().Replace("[", "").Replace("]", "").Trim(); foreach (var project in storageHelper.GetProjects()) { if (project.Name == currentProj) { ch.WriteLine("* " + project.Name); continue; } ch.WriteLine(" " + project.Name); } }
public void Project(ICollection <string> args) { if (!(args.Count > 0)) { ch.WriteLine("Enter project name", ConsoleColor.Red); return; } foreach (var project in storageHelper.GetProjects()) { if (project.Name == args.ToList()[0]) { storageHelper.SetCd(project.Path); ch.WriteLine("You are in " + project.Name + " repository now", ConsoleColor.Green); return; } } ch.WriteLine("This project doesn't exist", ConsoleColor.Red); }