Ejemplo n.º 1
0
        private static void OnBaseCommandEventHandler(object sender, EventArgs e)
        {
            var command     = sender as BaseCommand;
            var commandName = command.GetType().Name;

            OutputWindow.Info($"Execute command {commandName}.");

            try
            {
                command.OnExecute();
            }
            catch (Exception ex)
            {
                MessageBox.Error(VSPackage.ErrorMessageTitle, ex.Message);
                OutputWindow.Error($"Failed to execute command {commandName}.", ex);
            }
        }