Пример #1
0
        /// <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 initialization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            _DTE  = (EnvDTE.DTE)GetService(typeof(EnvDTE.DTE));
            _DTE2 = (EnvDTE80.DTE2)GetService(typeof(EnvDTE.DTE));
            var ow = _DTE2.ToolWindows.OutputWindow;

            Assembly     asm         = Assembly.GetAssembly(typeof(VSPackageBizTalkBuildAndDeploy));
            string       asmLocation = asm.Location;
            AssemblyName asmName     = asm.GetName();
            string       addinname   = string.Format("{0} - Version {1}", asmName.Name, asmName.Version);
            var          owp         = GetBizTalkBuildAndDeployPane(ow);

            owp.OutputString(string.Format("Loaded from {0}", asmLocation));
            owp.OutputString(Environment.NewLine);
            owp.OutputString(string.Format("Hello BizTalk World! from {0}", addinname));
            owp.OutputString(Environment.NewLine);
            owp.OutputString(Environment.NewLine);

            Helpers.BizTalk.BizTalkHelper.Package = this;
            CreateBizTalkBuildAndDeployScript.Initialize(this, _DTE2, owp);
            ExecuteBizTalkBuildAndDeployScript.Initialize(this, _DTE2, owp);
            ImportSSO.Initialize(this, owp);
            ExportSSO.Initialize(this, owp);

            try
            {
                Helpers.Options.OptionPageGrid page = (Helpers.Options.OptionPageGrid)GetDialogPage(typeof(Helpers.Options.OptionPageGrid));
                if (string.IsNullOrWhiteSpace(page.TasksPath))
                {
                    FileInfo fi = new FileInfo(asmLocation);
                    page.TasksPath = fi.DirectoryName + @"\MSBuild";
                }
            }
            catch { }

            owp.OutputString(Environment.NewLine);
        }
Пример #2
0
 /// <summary>
 /// Initializes the singleton instance of the command.
 /// </summary>
 /// <param name="package">Owner package, not null.</param>
 /// <param name="owp">OutputWindowPane</param>
 public static void Initialize(Package package, OutputWindowPane owp)
 {
     Instance      = new ExportSSO(package);
     Instance._owp = owp;
 }