Example #1
0
 internal void SetVerbosity(ThreadFlowLocationImportance importance)
 {
     foreach (CallTree callTree in this)
     {
         callTree.SetVerbosity(importance);
     }
 }
Example #2
0
        private void Init(int step, Location location, Stack stack, string kind, string module, IDictionary <string, string> state, int nestingLevel, int executionOrder, DateTime timestamp, ThreadFlowLocationImportance 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;
            if (state != null)
            {
                State = new Dictionary <string, string>(state);
            }

            NestingLevel   = nestingLevel;
            ExecutionOrder = executionOrder;
            Timestamp      = timestamp;
            Importance     = importance;
            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
 internal void SetVerbosity(ThreadFlowLocationImportance importance)
 {
     if (TopLevelNodes != null)
     {
         foreach (CallTreeNode child in TopLevelNodes)
         {
             child.SetVerbosity(importance);
         }
     }
 }
Example #4
0
 internal void SetVerbosity(ThreadFlowLocationImportance importance)
 {
     if (this.TopLevelNodes != null)
     {
         foreach (AnalysisStepNode child in this.TopLevelNodes)
         {
             child.SetVerbosity(importance);
         }
     }
 }
        internal void SetVerbosity(ThreadFlowLocationImportance importance)
        {
            Visibility visibility = Visibility.Visible;
            ThreadFlowLocationImportance myImportance = this.Location?.Importance ?? ThreadFlowLocationImportance.Unimportant;

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

                break;

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

                break;

            default:
                visibility = Visibility.Visible;
                break;
            }

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

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

            if (this.Children != null)
            {
                foreach (AnalysisStepNode child in this.Children)
                {
                    child.SetVerbosity(importance);
                }
            }
        }
        internal void SetVerbosity(ThreadFlowLocationImportance importance)
        {
            Visibility visibility = Visibility.Visible;
            ThreadFlowLocationImportance myImportance = (Location?.Importance).GetValueOrDefault(ThreadFlowLocationImportance.Unimportant);

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

            case ThreadFlowLocationImportance.Important:
                if (myImportance == ThreadFlowLocationImportance.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);
                }
            }
        }
Example #7
0
        private void Init(int index, Location location, Stack stack, IEnumerable <string> kinds, string module, IDictionary <string, string> state, int nestingLevel, int executionOrder, DateTime executionTimeUtc, ThreadFlowLocationImportance importance, IDictionary <string, SerializedPropertyInfo> properties)
        {
            Index = index;
            if (location != null)
            {
                Location = new Location(location);
            }

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

            if (kinds != null)
            {
                var destination_0 = new List <string>();
                foreach (var value_0 in kinds)
                {
                    destination_0.Add(value_0);
                }

                Kinds = destination_0;
            }

            Module = module;
            if (state != null)
            {
                State = new Dictionary <string, string>(state);
            }

            NestingLevel     = nestingLevel;
            ExecutionOrder   = executionOrder;
            ExecutionTimeUtc = executionTimeUtc;
            Importance       = importance;
            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
        protected virtual void Init(int index, Location location, Stack stack, IEnumerable <string> kinds, IEnumerable <ReportingDescriptorReference> taxa, string module, IDictionary <string, MultiformatMessageString> state, int nestingLevel, int executionOrder, DateTime executionTimeUtc, ThreadFlowLocationImportance importance, WebRequest webRequest, WebResponse webResponse, IDictionary <string, SerializedPropertyInfo> properties)
        {
            Index = index;
            if (location != null)
            {
                Location = new Location(location);
            }

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

            if (kinds != null)
            {
                var destination_0 = new List <string>();
                foreach (var value_0 in kinds)
                {
                    destination_0.Add(value_0);
                }

                Kinds = destination_0;
            }

            if (taxa != null)
            {
                var destination_1 = new List <ReportingDescriptorReference>();
                foreach (var value_1 in taxa)
                {
                    if (value_1 == null)
                    {
                        destination_1.Add(null);
                    }
                    else
                    {
                        destination_1.Add(new ReportingDescriptorReference(value_1));
                    }
                }

                Taxa = destination_1;
            }

            Module = module;
            if (state != null)
            {
                State = new Dictionary <string, MultiformatMessageString>();
                foreach (var value_2 in state)
                {
                    State.Add(value_2.Key, new MultiformatMessageString(value_2.Value));
                }
            }

            NestingLevel     = nestingLevel;
            ExecutionOrder   = executionOrder;
            ExecutionTimeUtc = executionTimeUtc;
            Importance       = importance;
            if (webRequest != null)
            {
                WebRequest = new WebRequest(webRequest);
            }

            if (webResponse != null)
            {
                WebResponse = new WebResponse(webResponse);
            }

            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ThreadFlowLocation" /> class from the supplied values.
 /// </summary>
 /// <param name="index">
 /// An initialization value for the <see cref="P:Index" /> 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="kinds">
 /// An initialization value for the <see cref="P:Kinds" /> property.
 /// </param>
 /// <param name="taxa">
 /// An initialization value for the <see cref="P:Taxa" /> 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="executionTimeUtc">
 /// An initialization value for the <see cref="P:ExecutionTimeUtc" /> property.
 /// </param>
 /// <param name="importance">
 /// An initialization value for the <see cref="P:Importance" /> property.
 /// </param>
 /// <param name="webRequest">
 /// An initialization value for the <see cref="P:WebRequest" /> property.
 /// </param>
 /// <param name="webResponse">
 /// An initialization value for the <see cref="P:WebResponse" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P:Properties" /> property.
 /// </param>
 public ThreadFlowLocation(int index, Location location, Stack stack, IEnumerable <string> kinds, IEnumerable <ReportingDescriptorReference> taxa, string module, IDictionary <string, MultiformatMessageString> state, int nestingLevel, int executionOrder, DateTime executionTimeUtc, ThreadFlowLocationImportance importance, WebRequest webRequest, WebResponse webResponse, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(index, location, stack, kinds, taxa, module, state, nestingLevel, executionOrder, executionTimeUtc, importance, webRequest, webResponse, properties);
 }
        public static AnnotatedCodeLocationImportanceVersionOne CreateAnnotatedCodeLocationImportance(ThreadFlowLocationImportance v2ThreadFlowLocationImportance)
        {
            switch (v2ThreadFlowLocationImportance)
            {
            case ThreadFlowLocationImportance.Essential:
                return(AnnotatedCodeLocationImportanceVersionOne.Essential);

            case ThreadFlowLocationImportance.Important:
                return(AnnotatedCodeLocationImportanceVersionOne.Important);

            case ThreadFlowLocationImportance.Unimportant:
                return(AnnotatedCodeLocationImportanceVersionOne.Unimportant);

            default:
                return(AnnotatedCodeLocationImportanceVersionOne.Important);
            }
        }
Example #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ThreadFlowLocation" /> 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="timestamp">
 /// An initialization value for the <see cref="P: Timestamp" /> 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 ThreadFlowLocation(int step, Location location, Stack stack, string kind, string module, IDictionary <string, string> state, int nestingLevel, int executionOrder, DateTime timestamp, ThreadFlowLocationImportance importance, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(step, location, stack, kind, module, state, nestingLevel, executionOrder, timestamp, importance, properties);
 }
Example #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ThreadFlowLocation" /> class from the supplied values.
 /// </summary>
 /// <param name="index">
 /// An initialization value for the <see cref="P:Index" /> 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="kinds">
 /// An initialization value for the <see cref="P:Kinds" /> 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="executionTimeUtc">
 /// An initialization value for the <see cref="P:ExecutionTimeUtc" /> 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 ThreadFlowLocation(int index, Location location, Stack stack, IEnumerable <string> kinds, string module, IDictionary <string, string> state, int nestingLevel, int executionOrder, DateTime executionTimeUtc, ThreadFlowLocationImportance importance, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(index, location, stack, kinds, module, state, nestingLevel, executionOrder, executionTimeUtc, importance, properties);
 }