예제 #1
0
        private void doAnalysisBackground(object sender, DoWorkEventArgs e)
        {
            var  worker   = sender as BackgroundWorker;
            bool canceled = false;

            for (_currentAnalysisindexPath = 0;
                 _currentAnalysisindexPath < Analyser.Config.Paths.Count();
                 _currentAnalysisindexPath++)
            {
                var di = new DirectoryInfo(Analyser.Config.Paths[_currentAnalysisindexPath]);
                //find files sizes
                canceled = Analyser.AnalyseFolder(di, false, worker, e, true);

                if (canceled)
                {
                    return;
                }
            }


            Analyser.Stats.DeletedFiles = Analyser.Dset.Tables[0].Select("status=0").Length;
            Analyser.Stats.NewFiles     = Analyser.Dset.Tables[0].Select("status=" + ((int)Analyser.status.New)).Length;

            //find files with same size and get hash

            if (Analyser.Config.Duplicate)
            {
                Analyser.AnalyseFileSet(worker, e);
            }

            canceled = e.Cancel;

            worker.ReportProgress(0, new WaitingFormProperties(Resources.Languages.Resources.Txt_Analyse_des_résultats));
            EndAnalyse(canceled);
        }
예제 #2
0
        static void Main(string[] args)
        {
            Analyser analyser = new Analyser();
            //var projects = analyser.AnalyseFolder(@"C:\Users\roelofb\source\repos\Dependancy.ProjectAnalyser");
            //var projects = analyser.AnalyseFolder(@"C:\DevOps\CODE\SA\APIs\Captiv8.API");
            //var projects = analyser.AnalyseFolder(@"C:\DevOps\CODE\SA\WCFServices");
            var projects = analyser.AnalyseFolder(@"C:\DevOps\CODE\SA\WCFServices\CreditDecisionService");

            Renderer renderer = new Renderer();

            renderer.RenderMermaidDependencyGraph(projects, @"C:\Users\roelofb\source\repos\Dependancy.ProjectAnalyser\test2.html");
            renderer.RenderMermaidServiceReferenceGraph(projects, @"C:\Users\roelofb\source\repos\Dependancy.ProjectAnalyser\service2.html");

            //Console.ReadLine();
        }