Пример #1
0
        public void MutateReadme()
        {
            var basePath    = Path.Combine(Assembly.GetExecutingAssembly().Location, "..", "..", "..", "..", "..");
            var linecounter = new LineCounting();

            linecounter.ReplaceWebshieldsInFile(basePath, Path.Combine(basePath, "README.md"));
        }
Пример #2
0
        public void Run()
        {
            var       files = new LineCounting().GetFiles(@"C:\src\");
            Stopwatch w     = Stopwatch.StartNew();
            var       res   = new LineCounting().CountFiles(files);

            Console.WriteLine("Time: " + w.ElapsedMilliseconds);
            Console.WriteLine(new WebFormatter().CreateGithubShields(res.Total));
        }
Пример #3
0
        public void RunSrc()
        {
            var       files = new LineCounting().GetFiles(@"C:\src\");
            Stopwatch w     = Stopwatch.StartNew();
            var       res   = new LineCounting().CountFiles(files);

            Console.WriteLine("files: " + res.Files);
            Console.WriteLine("Time: " + w.ElapsedMilliseconds);
            Console.WriteLine(res.Print());
            Console.WriteLine($"total: code {res.Total.CodeLines} and test {res.Total.TestCodeLines} and doc {res.Total.DocumentationLines}");
        }
Пример #4
0
        private static Stats StatFolder(string path)
        {
            try
            {
                Console.WriteLine();
                Console.WriteLine();
                var w     = Stopwatch.StartNew();
                var files = new LineCounting().GetFiles(path);
                var res   = new LineCounting().CountFiles(files);
                PrintStats(res, w, path);
                return(res);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }

            return(null);
        }