/// <summary> /// 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. /// </summary> protected override void Initialize() { base.Initialize(); PackageInitializer.Initialize(this); // 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 Add New WCF Projects. var addWcfCommandID = new CommandID(GuidList.guidServiceFactory_PackageCmdSet, (int)PkgCmdIDList.cmdAddNewWcfProject); var addWcfMenuItem = new MenuCommand(AddWcfCallback, addWcfCommandID); // { Enabled = DteLanguage.IsCSharpOrVbProject(this, true) }; mcs.AddCommand(addWcfMenuItem); // Create the command for the Add New ASMX Projects. var addAsmxCommandID = new CommandID(GuidList.guidServiceFactory_PackageCmdSet, (int)PkgCmdIDList.cmdAddNewAsmxProject); var addAsmxMenuItem = new MenuCommand(AddAsmxCallback, addAsmxCommandID); mcs.AddCommand(addAsmxMenuItem); // Create the command for the PMT var addPmtCommandID = new CommandID(GuidList.guidServiceFactory_PackageCmdSet, (int)PkgCmdIDList.cmdAddPmt); var addPmtMenuItem = new MenuCommand(AddPmtCallback, addPmtCommandID); mcs.AddCommand(addPmtMenuItem); // Create the command for the CA var addSemanticCACommandID = new CommandID(GuidList.guidServiceFactory_PackageCmdSet, (int)PkgCmdIDList.cmdSemanticCA); var addSemanticCAMenuItem = new MenuCommand(AddSemanticCaCallback, addSemanticCACommandID); mcs.AddCommand(addSemanticCAMenuItem); // Create the command for the Security CA var addSecurityCACommandID = new CommandID(GuidList.guidServiceFactory_PackageCmdSet, (int)PkgCmdIDList.cmdSecurityCA); var addSecurityCAMenuItem = new MenuCommand(AddSecurityCaCallback, addSecurityCACommandID); mcs.AddCommand(addSecurityCAMenuItem); } }
/// <summary> /// 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. /// </summary> protected override void Initialize() { base.Initialize(); PackageInitializer.Initialize(this); }