예제 #1
0
        public void Run()
        {
            if (m_data.m_perConsoleData.Count == 1)
            {
                var console = m_data.m_perConsoleData.First();

                m_rulesEngine.ClearAllRules();
                m_rulesEngine.AddRules(m_rules);

                m_rulesEngine.RunRulesOnData(console.Key, console.Value);

                Parallel.ForEach(m_reports, report => report.RunReport(OutputDirectory, m_rulesEngine.GetResults(console.Key), m_data.m_endpointToService, m_IsLatestBinary, m_latestBinaryVersion));
            }
            else
            {
                foreach (var console in m_data.m_perConsoleData)
                {
                    m_rulesEngine.ClearAllRules();
                    m_rulesEngine.AddRules(m_rules);

                    m_rulesEngine.RunRulesOnData(console.Key, console.Value);

                    String consolePath = Path.Combine(OutputDirectory, console.Key);

                    if (!Directory.Exists(consolePath))
                    {
                        Directory.CreateDirectory(consolePath);
                    }

                    Parallel.ForEach(m_reports, report => report.RunReport(consolePath, m_rulesEngine.GetResults(console.Key), m_data.m_endpointToService, m_IsLatestBinary, m_latestBinaryVersion));
                }
            }
        }