internal void SetVerbosity(CodeFlowLocationImportance importance)
 {
     foreach (CallTree callTree in this)
     {
         callTree.SetVerbosity(importance);
     }
 }
Exemple #2
0
 internal void SetVerbosity(CodeFlowLocationImportance importance)
 {
     if (TopLevelNodes != null)
     {
         foreach (CallTreeNode child in TopLevelNodes)
         {
             child.SetVerbosity(importance);
         }
     }
 }
Exemple #3
0
        internal void SetVerbosity(CodeFlowLocationImportance importance)
        {
            Visibility visibility = Visibility.Visible;
            CodeFlowLocationImportance myImportance = (Location?.Importance).GetValueOrDefault(CodeFlowLocationImportance.Unimportant);

            switch (importance)
            {
            case CodeFlowLocationImportance.Essential:
                if (myImportance != CodeFlowLocationImportance.Essential)
                {
                    visibility = Visibility.Collapsed;
                }
                break;

            case CodeFlowLocationImportance.Important:
                if (myImportance == CodeFlowLocationImportance.Unimportant)
                {
                    visibility = Visibility.Collapsed;
                }
                break;

            default:
                visibility = Visibility.Visible;
                break;
            }

            if (visibility == Visibility.Visible)
            {
                CallTreeNode current = this;

                while (current != null)
                {
                    current.Visibility = Visibility.Visible;
                    current            = current.Parent;
                }
            }
            else
            {
                Visibility = Visibility.Collapsed;
            }

            if (Children != null)
            {
                foreach (CallTreeNode child in Children)
                {
                    child.SetVerbosity(importance);
                }
            }
        }
        private void Init(int step, Location location, Stack stack, string kind, string module, object state, int nestingLevel, int executionOrder, CodeFlowLocationImportance importance, IDictionary <string, SerializedPropertyInfo> properties)
        {
            Step = step;
            if (location != null)
            {
                Location = new Location(location);
            }

            if (stack != null)
            {
                Stack = new Stack(stack);
            }

            Kind           = kind;
            Module         = module;
            State          = state;
            NestingLevel   = nestingLevel;
            ExecutionOrder = executionOrder;
            Importance     = importance;
            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CodeFlowLocation" /> class from the supplied values.
 /// </summary>
 /// <param name="step">
 /// An initialization value for the <see cref="P: Step" /> property.
 /// </param>
 /// <param name="location">
 /// An initialization value for the <see cref="P: Location" /> property.
 /// </param>
 /// <param name="stack">
 /// An initialization value for the <see cref="P: Stack" /> property.
 /// </param>
 /// <param name="kind">
 /// An initialization value for the <see cref="P: Kind" /> property.
 /// </param>
 /// <param name="module">
 /// An initialization value for the <see cref="P: Module" /> property.
 /// </param>
 /// <param name="state">
 /// An initialization value for the <see cref="P: State" /> property.
 /// </param>
 /// <param name="nestingLevel">
 /// An initialization value for the <see cref="P: NestingLevel" /> property.
 /// </param>
 /// <param name="executionOrder">
 /// An initialization value for the <see cref="P: ExecutionOrder" /> property.
 /// </param>
 /// <param name="importance">
 /// An initialization value for the <see cref="P: Importance" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P: Properties" /> property.
 /// </param>
 public CodeFlowLocation(int step, Location location, Stack stack, string kind, string module, object state, int nestingLevel, int executionOrder, CodeFlowLocationImportance importance, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(step, location, stack, kind, module, state, nestingLevel, executionOrder, importance, properties);
 }