public bool CanPreprocess(IPreprocessable preprocessable)
        {
            string sourceFilePath = preprocessable.RootFilePath;
            string projectContext = GetNodeEvaluationKey(preprocessable);

            return(CanPreprocess(sourceFilePath, projectContext));
        }
        public void ShowPreprocessed(IPreprocessable preprocessable)
        {
            if (preprocessable == null)
            {
                return;
            }

            ShowPreprocessed(preprocessable.RootFilePath, GetNodeEvaluationKey(preprocessable));
        }
        public void ShowPreprocessed(IPreprocessable preprocessable)
        {
            if (preprocessable == null)
            {
                return;
            }

            ShowPreprocessed(preprocessable.RootFilePath, GetProjectEvaluationContext(preprocessable));
        }
Exemplo n.º 4
0
        private double GetSearchTime(IPreprocessable preprocessable, Rectangle window, int circleCount)
        {
            var stopwatch = new Stopwatch();

            for (int i = 0; i < circleCount; i++)
            {
                stopwatch.Start();
                preprocessable.SearchAfterProprocessing(window);
                stopwatch.Stop();
            }

            var millisecondsInLong = stopwatch.ElapsedMilliseconds;

            return(((double)millisecondsInLong) / circleCount);
        }
Exemplo n.º 5
0
        private double GetPreprocessingTime(IPreprocessable preprocessable, Rectangle window, Point[] points, int circleCount)
        {
            var stopwatch = new Stopwatch();

            for (int i = 0; i < circleCount; i++)
            {
                stopwatch.Start();
                preprocessable.Preprocess(points);
                stopwatch.Stop();
            }

            var millisecondsInLong = stopwatch.ElapsedMilliseconds;

            return(((double)millisecondsInLong) / circleCount);
        }
 private void Preprocess(IPreprocessable preprocessable)
 {
     preprocessedFileManager.ShowPreprocessed(preprocessable);
 }
 private void Preprocess(IPreprocessable project) => preprocessedFileManager.ShowPreprocessed(project);
 private void Preprocess(IPreprocessable project)
 {
     preprocessedFileManager.ShowPreprocessed(project.RootFilePath);
 }
Exemplo n.º 9
0
 // 依赖注入
 public MilvusController(IDBOperator @operator, IPreprocessable preprocessor)
 {
     _operator     = @operator;
     _preprocessor = preprocessor;
 }