예제 #1
0
        public override void Execute(Dispatcher service)
        {
            Console.Write("Altering version for Project " + Project);

            var search = MainDirectory;

            if (Directory.Exists(Path.Combine(MainDirectory, Project)))
            {
                search = Path.Combine(MainDirectory, Project);
            }
            string[] files = Directory.GetFiles(search, "*" + Project + ".csproj", SearchOption.AllDirectories);
            foreach (string path in files)
            {
                ProjectFile f = new ProjectFile(path, new PhysicalFileReader());
                f.SetVersion(this);
                f.Save();
            }
            service.GotoColumn(7);
            using (ColorSetter.Set(ConsoleColor.Cyan))
            {
                Console.Write("-> v" + LongVersion + "\t");
            }
            using (ColorSetter.Set(ConsoleColor.Green))
            {
                Console.Write("SUCCESS");
            }

            Console.WriteLine();
        }
예제 #2
0
 public ColorSetter Set(ConsoleColor yellow)
 {
     return(ColorSetter.Set(yellow));
 }