private void RunSolutionAnalyzer()
        {
            mIssues.Clear();

            //TODO: once this analyzer is taking long time due to many checks, run it using parallel
            //ObservableList<BusinessFlow> BFs = App.LocalRepository.GetAllBusinessFlows();
            ObservableList <BusinessFlow> BFs = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <BusinessFlow>();

            // Run it in another task so UI gets updates
            Task t = Task.Factory.StartNew(() =>
            {
                List <AnalyzerItemBase> issues        = AnalyzeSolution.Analyze(mSolution);
                List <string> usedVariablesInSolution = new List <string>();
                AddIssues(issues);

                foreach (BusinessFlow BF in BFs)
                {
                    List <string> tempList = RunBusinessFlowAnalyzer(BF, false);
                    usedVariablesInSolution.AddRange(tempList);
                }
                ReportUnusedVariables(mSolution, usedVariablesInSolution);

                SetAnalayzeProceesAsCompleted();
            });
        }
Exemple #2
0
        public void RunSolutionAnalyzer(Solution solution, ObservableList <AnalyzerItemBase> issuesList)
        {
            foreach (AnalyzerItemBase issue in AnalyzeSolution.Analyze(solution))
            {
                AddIssue(issuesList, issue);
            }

            //TODO: once this analyzer is taking long time due to many checks, run it using parallel
            ObservableList <BusinessFlow> BFs     = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <BusinessFlow>();
            List <string> usedVariablesInSolution = new List <string>();

            //foreach (BusinessFlow BF in BFs)
            Parallel.ForEach(BFs, new ParallelOptions {
                MaxDegreeOfParallelism = 5
            }, BF =>
            {
                List <string> tempList = RunBusinessFlowAnalyzer(BF, issuesList);
                MergeVariablesList(usedVariablesInSolution, tempList);
            });
            ReportUnusedVariables(solution, usedVariablesInSolution, issuesList);
        }
Exemple #3
0
        private void RunSolutionAnalyzer()
        {
            mIssues.Clear();

            //TODO: once this analyzer is taking long time due to many checks, run it using parallel
            //ObservableList<BusinessFlow> BFs = App.LocalRepository.GetAllBusinessFlows();
            ObservableList <BusinessFlow> BFs = App.LocalRepository.GetSolutionBusinessFlows();

            // Run it in another task so UI gets updates
            Task t = Task.Factory.StartNew(() =>
            {
                List <AnalyzerItemBase> issues = AnalyzeSolution.Analyze(mSolution);
                AddIssues(issues);

                foreach (BusinessFlow BF in BFs)
                {
                    RunBusinessFlowAnalyzer(BF, false);
                }

                SetAnalayzeProceesAsCompleted();
            });
        }