public Controller(FactoryAppender factoryAppender, FactoryLayout factoryLayout, IWriter writer, IReader reader) { this.factoryAppender = factoryAppender; this.factoryLayout = factoryLayout; this.writer = writer; this.reader = reader; }
public static void Main() { var factoryAppender = new FactoryAppender(); var factoryLayout = new FactoryLayout(); IWriter consoleWriter = new ConsoleWriter(); IReader consoleReader = new ConsoleReader(); var controller = new Controller(factoryAppender, factoryLayout, consoleWriter, consoleReader); controller.Run(); }
static void Main(string[] args) { var dados = Program.getMockupDados(); /// recebe os dados /// verifica o tipo para araregar o layout adequado /// salva o arquivo FactoryLayout .GetLayout(dados) .Export(@"D:\arquivo1.txt"); }