static void Main(string[] args) { Stream InputStrem = Console.OpenStandardInput(); Stream Outputstream = Console.OpenStandardOutput(); StreamReader Reader = new StreamReader(InputStrem); StreamWriter Writer = new StreamWriter(Outputstream); //Writer.AutoFlush = true; Console.SetOut(Writer); ModelStore Store = ModelStore.LoadFrom(Reader); if (Store == null) { Writer.WriteLine("Data error."); Writer.Flush(); return; } Controler.ReadAdnDoRequests(Reader, Writer, Store); }
static void Main(string[] args) { ModelStore model = new ModelStore(); Controller prikazy = new Controller(model); if (ModelStore.LoadFrom(Console.In, model) == null) { Console.WriteLine("Data error."); return; } while (true) { string line = Console.ReadLine(); if (line == null) { break; } prikazy.All(line); } }