Remove empty lines not needed for MagnificLoopExample
This commit is contained in:
@@ -26,19 +26,17 @@ namespace StrategyPattern.LoopWithoutLoop
|
|||||||
|
|
||||||
public class LoopStep
|
public class LoopStep
|
||||||
{
|
{
|
||||||
Action<int> printNumber;
|
Action<int> printNumberStrategy;
|
||||||
public LoopStep(Action<int> printNumber)
|
public LoopStep(Action<int> printNumberStrategy)
|
||||||
{
|
{
|
||||||
this.printNumber = printNumber;
|
this.printNumberStrategy = printNumberStrategy;
|
||||||
}
|
}
|
||||||
public LoopStep[] Loops { get; set; }
|
public LoopStep[] Loops { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public virtual void Loop(int currentIndex, int n)
|
public virtual void Loop(int currentIndex, int n)
|
||||||
{
|
{
|
||||||
var loopStep = GetNextStep(currentIndex, n);
|
var loopStep = GetNextStep(currentIndex, n);
|
||||||
loopStep.printNumber(currentIndex);
|
loopStep.printNumberStrategy(currentIndex);
|
||||||
loopStep.Loop(++currentIndex, n);
|
loopStep.Loop(++currentIndex, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user