Пример #1
0
        public int Run(string[] parameters)
        {
            Debug.Listeners.Add(new ConsoleTraceListener());

            if (!this.VerifyParametersSpecified(parameters))
            {
                return(0);
            }

            var assemblyPaths = this.GetFileNames(parameters).ToList();

            if (!this.VerifyAssembliesFound(parameters, assemblyPaths))
            {
                return(0);
            }

            var assemblies = this.LoadAssemblies(assemblyPaths);

            var watch = new Stopwatch();

            watch.Start();
            var statistics = Unused.Statistics(assemblies);

            watch.Stop();

            this.CreateOutputDirectoryIfRequired();

            var format = new PlainTextSummary(outputDirectory);

            format.Write(statistics, watch.Elapsed);

            return(0);
        }