protected bool RegisterHandler(string commandName, _dispCommandEvents_BeforeExecuteEventHandler handler) { Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread(); CommandEvents events = mPlugin.FindCommandEvents(commandName); if (null == events) { return(false); } events.BeforeExecute += handler; return(true); }
protected void RegisterHandler(string commandName, _dispCommandEvents_BeforeExecuteEventHandler handler) { CommandEvents events = mPlugin.FindCommandEvents(commandName); if (null == events) { return; } events.BeforeExecute += handler; mEvents.Add(events); }