Пример #1
0
        void IDkmCustomVisualizer.UseDefaultEvaluationBehavior(DkmVisualizedExpression expression, out bool useDefaultEvaluationBehavior, out DkmEvaluationResult defaultEvaluationResult)
        {
            BasicVisualizer visualizer = null;

            defaultEvaluationResult      = null;
            useDefaultEvaluationBehavior = true;
            if (expression.VisualizerId != Guids.CustomVisualizer.ForceDefault &&
                VisualizerRegistrar.TryCreateVisualizer(expression, out visualizer))
            {
                // If this visualizer has custom fields, or displays default fields non-inline, don't use
                // the default evaluation behavior.
                ChildDisplayFlags flags = visualizer.ChildDisplayFlags;
                if (flags.HasFlag(ChildDisplayFlags.HasCustomFields) ||
                    !flags.HasFlag(ChildDisplayFlags.DefaultFieldsInline))
                {
                    useDefaultEvaluationBehavior = false;
                }
            }

            if (useDefaultEvaluationBehavior)
            {
                string name     = null;
                string fullName = null;
                Utility.GetExpressionName(expression, out name, out fullName);
                fullName += ",!";
                defaultEvaluationResult = CppExpressionEvaluator.Evaluate(expression, fullName);
            }
        }
Пример #2
0
        private void CreateDefaultEnumContext()
        {
            if (defEnumContext_ != null)
            {
                return;
            }

            string name     = null;
            string fullName = null;

            Utility.GetExpressionName(expression_, out name, out fullName);
            DkmEvaluationResult defaultEvaluationResult = CppExpressionEvaluator.Evaluate(expression_, fullName + ",!");

            DkmEvaluationResult[] defInitialChildren;
            expression_.GetChildrenCallback(defaultEvaluationResult, 0, expression_.InspectionContext, out defInitialChildren, out defEnumContext_);

            foreach (DkmEvaluationResult evalResult in defInitialChildren)
            {
                evalResult.Close();
            }
        }