Boo.BooLangStudio.BooLangStudioPackage.Initialize C# (CSharp) Méthode

Initialize() protected méthode

Initialization of the package; this method is called right after the package is sited, so this is the place where you can put all the initilaization code that rely on services provided by VisualStudio.
protected Initialize ( ) : void
Résultat void
        protected override void Initialize()
        {
            Trace.WriteLine (string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
            // registering project factory...
            this.RegisterProjectFactory(new BooLangProjectFactory(this));
            base.Initialize();

            // Add our command handlers for menu (commands must exist in the .vsct file)
            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
            if (null != mcs)
            {
                // Create the command for the menu item.
                //CommandID menuCommandOrganizeMembers = new CommandID(GuidList.guidBooLangServiceCmdSet, (int)PkgCmdIDList.cmdidExample);
                //MenuCommand menuItemOrganizeMembers = new MenuCommand(OrganizeMembersCallback, menuCommandOrganizeMembers);
                //mcs.AddCommand(menuItemOrganizeMembers);
            }

            _service = new Boo.BooLangService.BooLangService();
            _service.SetSite(this);
            IServiceContainer container = (IServiceContainer)this;
            container.AddService(typeof(Boo.BooLangService.BooLangService), _service, true);
        }