/// <summary>
        /// Tries to initiate the correct parsers for the given reports.
        /// </summary>
        /// <param name="reportFiles">The report files to parse.</param>
        /// <param name="sourceDirectories">The source directories.</param>
        /// <returns>
        /// The IParser instance.
        /// </returns>
        public static IParser CreateParser(IEnumerable<string> reportFiles, IEnumerable<string> sourceDirectories)
        {
            if (reportFiles == null)
            {
                throw new ArgumentNullException("reportFiles");
            }

            var classSearcherFactory = new ClassSearcherFactory();
            var globalClassSearcher = classSearcherFactory.CreateClassSearcher(sourceDirectories.ToArray());

            var multiReportParser = new MultiReportParser();

            foreach (var report in reportFiles)
            {
                foreach (var parser in GetParsersOfFile(report, classSearcherFactory, globalClassSearcher))
                {
                    multiReportParser.AddParser(parser);
                }
            }

            return multiReportParser;
        }
        /// <summary>
        /// Tries to initiate the correct parsers for the given reports.
        /// </summary>
        /// <param name="reportFiles">The report files to parse.</param>
        /// <param name="sourceDirectories">The source directories.</param>
        /// <returns>
        /// The IParser instance.
        /// </returns>
        internal static IParser CreateParser(IEnumerable <string> reportFiles, IEnumerable <string> sourceDirectories)
        {
            if (reportFiles == null)
            {
                throw new ArgumentNullException(nameof(reportFiles));
            }

            var classSearcherFactory = new ClassSearcherFactory();
            var globalClassSearcher  = classSearcherFactory.CreateClassSearcher(sourceDirectories.ToArray());

            var multiReportParser = new MultiReportParser();

            foreach (var report in reportFiles)
            {
                foreach (var parser in GetParsersOfFile(report, classSearcherFactory, globalClassSearcher))
                {
                    multiReportParser.AddParser(parser);
                }
            }

            return(multiReportParser);
        }
        public static void MyClassInitialize(TestContext testContext)
        {
            FileManager.CopyTestClasses();

            var multiReportParser = new MultiReportParser();
            multiReportParser.AddParser(new PartCover22Parser(XDocument.Load(filePath1)));
            multiReportParser.AddParser(new PartCover22Parser(XDocument.Load(filePath1)));
            assembliesWithoutPreprocessing = multiReportParser.Assemblies;

            var classSearcherFactory = new ClassSearcherFactory();
            var globalClassSearcher = classSearcherFactory.CreateClassSearcher("C:\\test");
            multiReportParser = new MultiReportParser();

            var report = XDocument.Load(filePath1);
            new PartCover22ReportPreprocessor(report, classSearcherFactory, globalClassSearcher).Execute();
            multiReportParser.AddParser(new PartCover22Parser(report));

            report = XDocument.Load(filePath2);
            new PartCover23ReportPreprocessor(report, classSearcherFactory, globalClassSearcher).Execute();
            multiReportParser.AddParser(new PartCover23Parser(report));
            assembliesWithPreprocessing = multiReportParser.Assemblies;
        }