public static void Run(OptionPageGrid page)
        {
            var basePath             = GetSolutionPath();
            var xmlDocFileNames      = string.IsNullOrEmpty(page.XmlDocFileNames) ? GetProjectXmlDocFileNames() : page.XmlDocFileNames;
            var globalSourceXmlFiles = page.GlobalSourceXmlFiles;
            var excludeTypes         = page.ExcludeTypes;
            var buildOutputPane      = GetBuildOutputPane();

            buildOutputPane.Activate();
            InheritDocUtil.Run(basePath: basePath, xmlDocFileNamePatterns: xmlDocFileNames, globalSourceXmlFiles: globalSourceXmlFiles, excludeTypes: excludeTypes, overwriteExisting: page.OverwriteExisting, logger: (logLevel, message) => {
                if ((int)logLevel >= (int)page.LogLevel)
                {
                    buildOutputPane.OutputString($"InheritDoc.{logLevel}:{message}\r\n");
                }
            });
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="InheritDocPackage"/> class.
        /// </summary>
        public InheritDocPackage()
        {
            // Inside this method you can place any initialization code that does not require
            // any Visual Studio service because at this point the package object is created but
            // not sited yet inside Visual Studio environment. The place to do all the other
            // initialization is the Initialize method.

            OptionPageGrid page = (OptionPageGrid)GetDialogPage(typeof(OptionPageGrid));

            this.buildEventProxy = new BuildEventProxy(this, () => {
                if (page.RunWhen == OptionRunWhen.Automatic)
                {
                    Run(page);
                }
            });
        }
        /// <summary>
        /// This function is the callback used to execute the command when the menu item is clicked.
        /// See the constructor to see how the menu item is associated with this function using
        /// OleMenuCommandService service and MenuCommand class.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Event args.</param>
        private void OnClick(object sender, EventArgs e)
        {
            OptionPageGrid page = (OptionPageGrid)this.package.GetDialogPage(typeof(OptionPageGrid));

            InheritDocPackage.Run(page);
        }