static void Main(string[] args) { IRepository <Emploee> repo = new EmploeeRepository(@"..\..\..\..\Emploees.txt"); IPrinter printer = new ConsolePrinter(); IEmploeeSearchService empSrevice = new EmploeeSearchService(repo); IRunner empRunner = new EmploeeSearchRunner(printer, empSrevice); var cuttingRunner = CuttingOerationInitialize(printer); var menu = new Dictionary <string, IRunner>() { { "1", empRunner }, { "2", cuttingRunner } }; Console.WriteLine("choose task (1/2)"); var temp = Console.ReadLine(); try { menu.Where(x => x.Key == temp).FirstOrDefault().Value.Start(); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
static void Main(string[] args) { IRepository <Emploee> repo = new EmploeeRepository(@"..\..\..\..\Emploees.txt"); IPrinter printer = new ConsolePrinter(); IEmploeeSearchService empSrevice = new EmploeeSearchService(repo); IRunner empRunner = new EmploeeSearchRunner(printer, empSrevice); empRunner.Start(); }