internal void SetVerbosity(AnnotatedCodeLocationImportance importance) { if (TopLevelNodes != null) { foreach (CallTreeNode child in TopLevelNodes) { child.SetVerbosity(importance); } } }
private void Init(int id, int step, PhysicalLocation physicalLocation, string fullyQualifiedLogicalName, string logicalLocationKey, string module, int threadId, string message, AnnotatedCodeLocationKind kind, TaintKind taintKind, string target, IEnumerable<string> values, object state, string targetKey, bool essential, AnnotatedCodeLocationImportance importance, string snippet, IEnumerable<Annotation> annotations, IDictionary<string, SerializedPropertyInfo> properties) { Id = id; Step = step; if (physicalLocation != null) { PhysicalLocation = new PhysicalLocation(physicalLocation); } FullyQualifiedLogicalName = fullyQualifiedLogicalName; LogicalLocationKey = logicalLocationKey; Module = module; ThreadId = threadId; Message = message; Kind = kind; TaintKind = taintKind; Target = target; if (values != null) { var destination_0 = new List<string>(); foreach (var value_0 in values) { destination_0.Add(value_0); } Values = destination_0; } State = state; TargetKey = targetKey; Essential = essential; Importance = importance; Snippet = snippet; if (annotations != null) { var destination_1 = new List<Annotation>(); foreach (var value_1 in annotations) { if (value_1 == null) { destination_1.Add(null); } else { destination_1.Add(new Annotation(value_1)); } } Annotations = destination_1; } if (properties != null) { Properties = new Dictionary<string, SerializedPropertyInfo>(properties); } }
internal void SetVerbosity(AnnotatedCodeLocationImportance importance) { Visibility visibility = Visibility.Visible; AnnotatedCodeLocationImportance myImportance = (Location?.Importance).GetValueOrDefault(AnnotatedCodeLocationImportance.Unimportant); switch (importance) { case AnnotatedCodeLocationImportance.Essential: if (myImportance != AnnotatedCodeLocationImportance.Essential) { visibility = Visibility.Collapsed; } break; case AnnotatedCodeLocationImportance.Important: if (myImportance == AnnotatedCodeLocationImportance.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); } } }
/// <summary> /// Initializes a new instance of the <see cref="AnnotatedCodeLocation" /> class from the supplied values. /// </summary> /// <param name="id"> /// An initialization value for the <see cref="P: Id" /> property. /// </param> /// <param name="step"> /// An initialization value for the <see cref="P: Step" /> property. /// </param> /// <param name="physicalLocation"> /// An initialization value for the <see cref="P: PhysicalLocation" /> property. /// </param> /// <param name="fullyQualifiedLogicalName"> /// An initialization value for the <see cref="P: FullyQualifiedLogicalName" /> property. /// </param> /// <param name="logicalLocationKey"> /// An initialization value for the <see cref="P: LogicalLocationKey" /> property. /// </param> /// <param name="module"> /// An initialization value for the <see cref="P: Module" /> property. /// </param> /// <param name="threadId"> /// An initialization value for the <see cref="P: ThreadId" /> property. /// </param> /// <param name="message"> /// An initialization value for the <see cref="P: Message" /> property. /// </param> /// <param name="kind"> /// An initialization value for the <see cref="P: Kind" /> property. /// </param> /// <param name="taintKind"> /// An initialization value for the <see cref="P: TaintKind" /> property. /// </param> /// <param name="target"> /// An initialization value for the <see cref="P: Target" /> property. /// </param> /// <param name="values"> /// An initialization value for the <see cref="P: Values" /> property. /// </param> /// <param name="state"> /// An initialization value for the <see cref="P: State" /> property. /// </param> /// <param name="targetKey"> /// An initialization value for the <see cref="P: TargetKey" /> property. /// </param> /// <param name="essential"> /// An initialization value for the <see cref="P: Essential" /> property. /// </param> /// <param name="importance"> /// An initialization value for the <see cref="P: Importance" /> property. /// </param> /// <param name="snippet"> /// An initialization value for the <see cref="P: Snippet" /> property. /// </param> /// <param name="annotations"> /// An initialization value for the <see cref="P: Annotations" /> property. /// </param> /// <param name="properties"> /// An initialization value for the <see cref="P: Properties" /> property. /// </param> public AnnotatedCodeLocation(int id, int step, PhysicalLocation physicalLocation, string fullyQualifiedLogicalName, string logicalLocationKey, string module, int threadId, string message, AnnotatedCodeLocationKind kind, TaintKind taintKind, string target, IEnumerable<string> values, object state, string targetKey, bool essential, AnnotatedCodeLocationImportance importance, string snippet, IEnumerable<Annotation> annotations, IDictionary<string, SerializedPropertyInfo> properties) { Init(id, step, physicalLocation, fullyQualifiedLogicalName, logicalLocationKey, module, threadId, message, kind, taintKind, target, values, state, targetKey, essential, importance, snippet, annotations, properties); }