static void Main(string[] allInputString) { dbi298845_prangersEntities database = new dbi298845_prangersEntities(); countrycode countrycode = GetOrCreateDefaultCountryCode(database); // Create the router to route the commands through. CommandRouter commandRouter = new CommandRouter(database, countrycode); // Register all possible commands. commandRouter.Register(new CommandImportPostalCode()); commandRouter.Register(new CommandImportStore()); commandRouter.Register(new CommandImportBottom()); commandRouter.Register(new CommandImportProduct()); commandRouter.Register(new CommandImportIngredient()); commandRouter.Register(new CommandImportPizzaIngredient()); commandRouter.Register(new CommandParseMapping()); commandRouter.Register(new CommandImportOrder()); // Execute the command commandRouter.Execute(allInputString); Console.ReadKey(); }
private void startClicked(object sender, RoutedEventArgs e) { CommandRouter.Execute(MainViewModel.StartCommand); }
private void selectionChanged(object sender, SelectionChangedEventArgs e) { CommandRouter.Execute(MainViewModel.SelectCommand, (string)e.AddedItems.FirstOrDefault()); }
private void openClicked(object sender, RoutedEventArgs e) { CommandRouter.Execute(MainViewModel.OpenCommand); }