예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ReloadProjectWithReferencesCommand"/> 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 ReloadProjectWithReferencesCommand(SmartProjectReloaderCommandPackage package)
        {
            this.package = package ?? throw new ArgumentNullException("package");

            OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null)
            {
                var menuCommandID = new CommandID(CommandSet, CommandId);
                var menuItem      = new MenuCommand(this.MenuItemCallback, menuCommandID);
                commandService.AddCommand(menuItem);
            }
        }
예제 #2
0
 /// <summary>
 /// Initializes the singleton instance of the command.
 /// </summary>
 /// <param name="package">Owner package, not null.</param>
 public static void Initialize(SmartProjectReloaderCommandPackage package)
 {
     Instance = new ReloadProjectWithReferencesCommand(package);
 }
예제 #3
0
 /// <summary>
 /// Initializes the singleton instance of the command.
 /// </summary>
 /// <param name="package">Owner package, not null.</param>
 public static void Initialize(SmartProjectReloaderCommandPackage package)
 {
     Instance = new UnloadAllProjectsCommand(package);
 }