Exemple #1
0
        public LazyItemEvaluator(IEvaluatorData <P, I, M, D> data, IItemFactory <I, I> itemFactory, LoggingContext loggingContext, EvaluationProfiler evaluationProfiler, EvaluationContext evaluationContext)
        {
            _outerEvaluatorData = data;
            _outerExpander      = new Expander <P, I>(_outerEvaluatorData, _outerEvaluatorData, evaluationContext.FileSystem);
            _evaluatorData      = new EvaluatorData(_outerEvaluatorData, itemType => GetItems(itemType));
            _expander           = new Expander <P, I>(_evaluatorData, _evaluatorData, evaluationContext.FileSystem);
            _itemFactory        = itemFactory;
            _loggingContext     = loggingContext;
            _evaluationProfiler = evaluationProfiler;

            FileSystem          = evaluationContext.FileSystem;
            EngineFileUtilities = evaluationContext.EngineFileUtilities;
        }
Exemple #2
0
            /// <summary>
            /// Constructs a new evaluation frame and pushes it to the tracker stack
            /// </summary>
            public EvaluationFrame(EvaluationProfiler evaluationProfiler, EvaluationLocation location)
            {
                _evaluationProfiler = evaluationProfiler;
                Location            = location;

                _inclusiveTime.Start();
                _exclusiveTime.Start();

                if (_evaluationProfiler._evaluationStack.Count > 0)
                {
                    _evaluationProfiler._evaluationStack.Peek()._exclusiveTime.Stop();
                }

                _evaluationProfiler._evaluationStack.Push(this);
            }