protected override void ExecuteCore(SelectedItemCollection selection) { Command cmd = new ShutDownHostCommand(MainWindowCommandInterface, selection); if (cmd.CanExecute()) { cmd.Execute(); } else { cmd = new ShutDownVMCommand(MainWindowCommandInterface, selection); if (cmd.CanExecute()) { cmd.Execute(); } } }
protected override void ExecuteCore(SelectedItemCollection selection) { Command cmd = new ShutDownHostCommand(MainWindowCommandInterface, selection); if (cmd.CanExecute()) { cmd.Execute(); } else { cmd = new ShutDownVMCommand(MainWindowCommandInterface, selection); if (cmd.CanExecute()) { cmd.Execute(); } } }