static void WithInjectedRule() { //I'd usually let an IOC container do this. var rules = new IRule[] { new FizzRule(), new BuzzRule(), new ZoomRule() }; var looper = new FizzBuzzLooper(new FizzBuzzRenderer(rules)); looper.Loop(100,200); }
static void StandardWay() { var looper = new FizzBuzzLibrary.FizzBuzzLooper(new FizzBuzzRenderer()); looper.Loop(); }