private void PrintOutput(IIoEngine reader) { foreach (Animal animal in animals) { reader.WriteLine(animal.ToString()); } }
public StudentSystem(IIoEngine ioEngine) { this.students = new StudentsDatabase(); this.commands = new Dictionary <string, ICommand>(); this.commands.Add("Create", new CreateCommand()); this.commands.Add("Show", new ShowCommand(ioEngine)); this.ioEngine = ioEngine; }
public StudentSystem(IIoEngine ioEngine) { this.students = new StudentsDatabase(); this.commands = new Dictionary <string, ICommand> { { "Create", new CreateCommand() }, { "Show", new ShowCommand(ioEngine) }, { "Delete", new DeleteCommand() } }; this.ioEngine = ioEngine; }
public Engine(IIoEngine ioEngine) { this.ioEngine = ioEngine; this.animals = new List <Animal>(); }
public ShowCommand(IIoEngine engine) { this.engine = engine; }
public ShowCommand(IIoEngine ioEngine) { this.ioEngine = ioEngine; }