public CalculationGraphWithEvents(ICalculationGraph decoratedGraph, Action <IStat> statAddedAction, Action <IStat> statRemovedAction) { _decoratedGraph = decoratedGraph; _statAddedAction = statAddedAction; _statRemovedAction = statRemovedAction; }
private static CalculationGraphWithEvents CreateSut( ICalculationGraph decoratedGraph, Action <IStat>?statAddedAction = null, Action <IStat>?statRemovedAction = null) { var sut = new CalculationGraphWithEvents(decoratedGraph); if (statAddedAction != null) { sut.StatAdded += statAddedAction; } if (statRemovedAction != null) { sut.StatRemoved += statRemovedAction; } return(sut); }
private static PrunableCalculationGraph CreateSut(ICalculationGraph decoratedGraph) => new PrunableCalculationGraph(decoratedGraph, MockDeterminesNodeRemoval());
public PrunableCalculationGraph(ICalculationGraph decoratedGraph, IDeterminesNodeRemoval nodeRemovalDeterminer) { _decoratedGraph = decoratedGraph; _nodeRemovalDeterminer = nodeRemovalDeterminer; }
public CalculationGraphPruner(ICalculationGraph calculationGraph, IGraphPruningRuleSet ruleSet) => (_calculationGraph, _ruleSet) = (calculationGraph, ruleSet);
private static CalculationGraphPruner CreateSut( ICalculationGraph decoratedGraph, IGraphPruningRuleSet ruleSet) => new CalculationGraphPruner(decoratedGraph, ruleSet);
private static CalculationGraphPruner CreateSut(ICalculationGraph decoratedGraph) => CreateSut(decoratedGraph, new DefaultPruningRuleSet(MockDeterminesNodeRemoval()));
public CalculationGraphWithEvents(ICalculationGraph decoratedGraph) => _decoratedGraph = decoratedGraph;
private static CalculationGraphWithEvents CreateSut( ICalculationGraph decoratedGraph, Action <IStat> statAddedAction = null, Action <IStat> statRemovedAction = null) { return(new CalculationGraphWithEvents(decoratedGraph, statAddedAction, statRemovedAction ?? (_ => { }))); }