Exemple #1
0
        //FieldStat --coverage-path="../../../Data/Coverage Data/coverage_output" FieldStat.exe
        static void Main(string[] args)
        {
            MonoCovOptions options = new MonoCovOptions();
            options.ProcessArgs(args);

            // List of assemblies/executables or a directory containing executables.
            args = options.RemainingArguments;

            if (args.Length == 0 && options.applicationRepository == "")
            {
                options.DoHelp();
            }
            Console.WriteLine("app-repos: " + options.applicationRepository);
            Console.WriteLine("coveragePath: " + options.coveragePath);
            Console.WriteLine("filters: " + options.filters);
            Console.WriteLine("no-coderank: " + options.nocodeRank);
            Console.WriteLine("outputDir: " + options.outputDirectory);
            Console.WriteLine("args: " + string.Join(",", options.RemainingArguments));

            ParameterData data = new ParameterData();
            ExportData export = new ExportData(data.Results, options.outputDirectory);

            if (options.applicationRepository != "")
                data.LoadApplicationRepository(options.applicationRepository);
            else
                data.LoadAssemblies(args);

            if (options.filters != "")
                data.LoadFilters(options.filters.Split(';'));

            data.LoadCoverage(options.coveragePath);

            data.ComputeResults();
            export.ExportResults();
        }
Exemple #2
0
        private void btnCoverageLoad_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Multiselect = true;
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                m_parameterData.LoadCoverage(ofd.FileNames);
            }
        }
Exemple #3
0
        //FieldStat --coverage-path="../../../Data/Coverage Data/coverage_output" FieldStat.exe
        static void RunConsole(string[] args)
        {
            MonoCovOptions options = new MonoCovOptions();

            options.ProcessArgs(args);

            // List of assemblies/executables or a directory containing executables.
            args = options.RemainingArguments;

            if (args.Length == 0 && options.applicationRepository == "")
            {
                options.DoHelp();
            }
            Console.WriteLine("app-repos: " + options.applicationRepository);
            Console.WriteLine("coveragePath: " + options.coveragePath);
            Console.WriteLine("filters: " + options.filters);
            Console.WriteLine("no-coderank: " + options.nocodeRank);
            Console.WriteLine("outputDir: " + options.outputDirectory);
            Console.WriteLine("args: " + string.Join(",", options.RemainingArguments));

            ParameterData data   = new ParameterData();
            ExportData    export = new ExportData(data.Results, options.outputDirectory);

            if (options.applicationRepository != "")
            {
                data.LoadApplicationRepository(options.applicationRepository);
            }
            else
            {
                data.LoadAssemblies(args);
            }

            if (options.filters != "")
            {
                data.LoadFilters(options.filters.Split(';'));
            }

            data.LoadCoverage(options.coveragePath);

            data.ComputeResults();
            export.ExportResults();
        }