public void SetMutator(Expression pathToTarget, MutatorConfiguration mutator)
        {
            var pathToTraverse = pathToTarget.ResolveInterfaceMembers();
            var mutatorToAdd   = Condition == null ? mutator : mutator.If(Condition);

            reporter?.Report(null, pathToTraverse, mutatorToAdd);
            Root.Traverse(pathToTraverse, true).AddMutator(mutatorToAdd);
        }
 public Report(Expression simplifiedPath, Expression path, MutatorConfiguration mutator)
 {
     SimplifiedPath = simplifiedPath;
     Path           = path;
     Mutator        = mutator;
 }
 public void Report(Expression simplifiedPath, Expression path, MutatorConfiguration mutator)
 {
     Reports.Add(new Report(simplifiedPath, path, mutator));
 }
 public void SetMutator(LambdaExpression pathToValue, MutatorConfiguration mutator)
 {
     root.AddMutatorSmart(pathToValue.ResolveInterfaceMembers(), mutator.If(Condition));
 }
 public void SetMutator <TValue>(Expression <Func <TRoot, TValue> > pathToValue, MutatorConfiguration mutator)
 {
     SetMutator((LambdaExpression)pathToValue, mutator);
 }
예제 #6
0
 public void SetMutator(Expression pathToTarget, MutatorConfiguration mutator)
 {
     root.Traverse(pathToTarget.ResolveInterfaceMembers(), true).AddMutator(Condition == null ? mutator : mutator.If(Condition));
 }