Example #1
0
        private void ProcessGraphElementFamily <T>(GraphElementFamily <T> family,
                                                   AddGraphElement <T> add, ApplyProperty <T> applyProperty)
        {
            var identifiers           = Create(family, add);
            var conditionalProperties = family.ConditionalProperties.Select(x => x).ToList();

            conditionalProperties.Reverse();
            foreach (var conditionalProperty in conditionalProperties)
            {
                switch (conditionalProperty.Condition.Mode)
                {
                case ConditionMode.AllStackFrames:
                    ApplyPropertyAllStackFrames(identifiers, conditionalProperty, applyProperty);
                    break;

                case ConditionMode.CurrentStackFrame:
                    ApplyPropertyCurrentStackFrame(identifiers, conditionalProperty, applyProperty);
                    break;

                case ConditionMode.AllStackFramesArgsOnly:
                    ApplyPropertyAllStackFramesArgsOnly(identifiers, conditionalProperty, applyProperty);
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
        }
Example #2
0
        private List <Identifier> Create <T>(GraphElementFamily <T> family, AddGraphElement <T> add)
        {
            var identifiers =
                GetIdentifiersForCondition(Identifier.GetIdentifiers(family.Name, family.Ranges, _debuggerOperations),
                                           family.ValidationTemplate);

            identifiers.ForEach(x => add(family, x));
            return(identifiers);
        }