コード例 #1
0
        /// <summary>
        /// Writes a line of output to the output window.
        /// </summary>
        /// <param name="output">The text to output.</param>
        public void AddOutput(string output)
        {
            Param.RequireNotNull(output, "output");

            if (InvisibleForm.Instance.InvokeRequired)
            {
                AddOutputEventHandler outputDelegate = new AddOutputEventHandler(this.AddOutput);
                InvisibleForm.Instance.Invoke(outputDelegate, output);
            }
            else
            {
                EnvDTE.OutputWindowPane pane = VSWindows.GetInstance(this).OutputPane;
                if (pane != null)
                {
                    pane.OutputLine(output);
                }
            }
        }