Пример #1
0
        /// <summary>
        /// Processes all analysis reports and features for the provided <paramref name="productName">product</paramref> at the provided <paramref name="version"/>
        /// and stores the results of the analysis.
        /// </summary>
        /// <param name="productName">Name of the product to process.</param>
        /// <param name="version">Version of the product to process.</param>
        public async Task AnalyzeAndPersistResultsAsync(string productName, string version)
        {
            // Because we will analyze the entire product, remove the old results
            await _analysisReportManager.DeleteDbInvocationsAsync(productName, version);

            // Collect all features for the provided product/version combination
            IEnumerable <DbFeature> features = await _featureManager.GetDbFeaturesByProductAndVersionAsync(productName, version);

            // Collect all analysisreports for the provided product/version combination
            IEnumerable <AnalysisReport> reports = _analysisReportManager.GetAnalysisReportsByProductAndVersionAsync(productName, version);

            if (reports.Any())
            {
                // Analyze the features based on the provided report
                await AnalyzeAndPersistAsync(productName, version, features, reports);
            }
        }