public void Add(Type key, PredicatePair value) { if (!this.dictionary.ContainsKey(key)) { this.dictionary[key] = new List <PredicatePair>(); } this.dictionary[key].Add(value); }
protected override Expression VisitConditional(ConditionalExpression node) { PredicatePair predicatePair = this.GetPredicateToInsert(node); if (predicatePair != null) { this.appliedPairs.Add(predicatePair); bool shouldApplyDecorator = predicatePair.ContextualPredicate(this.target); var expression = shouldApplyDecorator ? node.IfTrue : node.IfFalse; return(this.Visit(expression)); } return(base.VisitConditional(node)); }
public void Add(Type key, PredicatePair value) { if (!this.dictionary.ContainsKey(key)) { this.dictionary[key] = new List<PredicatePair>(); } this.dictionary[key].Add(value); }