/// <summary> /// Initializes a new instance of the <see cref="VSPackageMain"/> class. /// </summary> public VSPackageMain() { instance = this; // Inside this method you can place any initialization code that does not require // any Visual Studio service because at this point the package object is created but // not sited yet inside Visual Studio environment. The place to do all the other // initialization is the Initialize method. }
/// <summary> /// Initializes a new instance of the <see cref="ExecuteDoxygenMenuItem"/> class. /// Adds our command handlers for menu (commands must exist in the command table file) /// </summary> /// <param name="package">Owner package, not null.</param> private ExecuteDoxygenMenuItem(VSPackageMain package) { if (package == null) { throw new ArgumentNullException("package"); } this.package = package; OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; if (commandService != null) { var menuCommandID = new CommandID(CommandSet, CommandId); var menuItem = new MenuCommand(this.ExecuteDoxygenCallback, menuCommandID); commandService.AddCommand(menuItem); } }
/// <summary> /// Initializes the singleton instance of the command. /// </summary> /// <param name="package">Owner package, not null.</param> public static void Initialize(VSPackageMain package) { Instance = new ExecuteDoxygenMenuItem(package); }