UpdateServices() public méthode

Updates the services.
public UpdateServices ( IVsEnvironmentHelper vsenvironmenthelperIn, IVSSStatusBar statusBar, IServiceProvider provider ) : void
vsenvironmenthelperIn IVsEnvironmentHelper The vsenvironmenthelper in.
statusBar IVSSStatusBar The status bar.
provider IServiceProvider The provider.
Résultat void
        /// <summary>
        /// Generates the sub menus.
        /// </summary>
        /// <param name="id">The identifier.</param>
        private void GenerateSubMenus(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return;
            }

            foreach (var item in this.SubItems)
            {
                if (item.CommandText.Equals(id))
                {
                    return;
                }
            }

            var menu = new IssueTrackerMenu(this.rest, this.model, this.manager, this.translator, this, false)
            {
                CommandText = id,
                IsEnabled   = false
            };

            menu.UpdateServices(this.vshelper, null, null);
            menu.AssociateWithNewProject(this.config, this.associatedProject, this.sourceDir, this.sourceModel, this.issueTrackerPlugin);

            var subMenu = new IssueTrackerMenu(this.rest, this.model, this.manager, this.translator, menu, false)
            {
                CommandText = "show info", IsEnabled = true
            };

            subMenu.UpdateServices(this.vshelper, null, null);
            subMenu.AssociateWithNewProject(this.config, this.associatedProject, this.sourceDir, this.sourceModel, this.issueTrackerPlugin);

            var subMenu2 = new IssueTrackerMenu(this.rest, this.model, this.manager, this.translator, menu, false)
            {
                CommandText = "attach", IsEnabled = true
            };

            subMenu2.UpdateServices(this.vshelper, null, null);
            subMenu2.AssociateWithNewProject(this.config, this.associatedProject, this.sourceDir, this.sourceModel, this.issueTrackerPlugin);

            menu.SubItems.Add(subMenu);
            menu.SubItems.Add(subMenu2);

            this.SubItems.Add(menu);
        }
        /// <summary>
        /// Generates the sub menus.
        /// </summary>
        /// <param name="id">The identifier.</param>
        private void GenerateSubMenus(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return;
            }

            foreach (var item in this.SubItems)
            {
                if (item.CommandText.Equals(id))
                {
                    return;
                }
            }

            var menu = new IssueTrackerMenu(this.rest, this.model, this.manager, this.translator, this, false)
            {
                CommandText = id,
                IsEnabled = false
            };

            menu.UpdateServices(this.vshelper, null, null);
            menu.AssociateWithNewProject(this.config, this.associatedProject, this.sourceDir, this.sourceModel, this.issueTrackerPlugin);

            var subMenu = new IssueTrackerMenu(this.rest, this.model, this.manager, this.translator, menu, false) { CommandText = "show info", IsEnabled = true };
            subMenu.UpdateServices(this.vshelper, null, null);
            subMenu.AssociateWithNewProject(this.config, this.associatedProject, this.sourceDir, this.sourceModel, this.issueTrackerPlugin);

            var subMenu2 = new IssueTrackerMenu(this.rest, this.model, this.manager, this.translator, menu, false) { CommandText = "attach", IsEnabled = true };
            subMenu2.UpdateServices(this.vshelper, null, null);
            subMenu2.AssociateWithNewProject(this.config, this.associatedProject, this.sourceDir, this.sourceModel, this.issueTrackerPlugin);

            menu.SubItems.Add(subMenu);
            menu.SubItems.Add(subMenu2);

            this.SubItems.Add(menu);
        }