public bool Select <TSelect>(Action <MemoryNode <TSelect> > callback) where TSelect : class { if (typeof(TSelect) == typeof(Tuple <T1, T2>) && _node == null) { _next.MatchJoinNode <T1>(t1 => { _next.MatchJoinNode <T2>(t2 => { _configurator.MatchOuterJoinNode(t1, t2, outerJoin => { // finally! _node = outerJoin; }); }); }); } var node = _node as MemoryNode <TSelect>; if (node != null) { callback(node); return(true); } return(false); }
public override bool Visit <T>(DelegateConsequence <T> consequence, Func <SemanticModelVisitor, bool> next) { _conditionCompiler.MatchJoinNode <T>(joinNode => { DelegateProductionNode <T> node = _configurator.Delegate(consequence.Callback); joinNode.AddActivation(node); }); return(base.Visit(consequence, next)); }