internal ITransformationRuleDependency DependMany(Predicate <Computation> filter, Func <Computation, IEnumerable <object[]> > selector, GeneralTransformationRule transformation, Action <object, IEnumerable> persistor, bool executeBefore, bool needOutput) { if (transformation == null) { throw new ArgumentNullException("transformation"); } if (selector == null) { throw new ArgumentNullException("selector"); } var dependency = new MultipleDependency() { Filter = filter, Selector = selector, Persistor = persistor, BaseTransformation = this, DependencyTransformation = transformation, ExecuteBefore = executeBefore, NeedOutput = needOutput }; Dependencies.Add(dependency); return(dependency); }
public void InitTestContext() { ruleT1 = new TestRuleT1(); ruleDependent = new OtherRuleT1(); transformation = new MockTransformation(ruleT1, ruleDependent); transformation.Initialize(); context = new MockContext(transformation); dependency = new MultipleDependency(); dependency.BaseTransformation = ruleT1; dependency.DependencyTransformation = ruleDependent; dependency.ExecuteBefore = true; c_Test = new MockComputation(new object[] { "a" }, ruleT1, context, "b"); c_Dependent = new MockComputation(new object[] { new Dummy() }, ruleDependent, context, new Dummy()); context.Computations.Add(c_Test); context.Computations.Add(c_Dependent); }
internal ITransformationRuleDependency DependMany(Predicate<Computation> filter, Func<Computation, IEnumerable<object[]>> selector, GeneralTransformationRule transformation, Action<object, IEnumerable> persistor, bool executeBefore, bool needOutput) { if (transformation == null) throw new ArgumentNullException("transformation"); if (selector == null) throw new ArgumentNullException("selector"); var dependency = new MultipleDependency() { Filter = filter, Selector = selector, Persistor = persistor, BaseTransformation = this, DependencyTransformation = transformation, ExecuteBefore = executeBefore, NeedOutput = needOutput }; Dependencies.Add(dependency); return dependency; }