SonarLint.VisualStudio.Integration.VsShellUtils.WriteToSonarLintOutputPane C# (CSharp) Method

WriteToSonarLintOutputPane() public static method

Writes a message to the SonarLint output pane. Will append a new line after the message.
public static WriteToSonarLintOutputPane ( IServiceProvider serviceProvider, string messageFormat ) : void
serviceProvider IServiceProvider
messageFormat string
return void
        public static void WriteToSonarLintOutputPane(IServiceProvider serviceProvider, string messageFormat, params object[] args)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException(nameof(serviceProvider));
            }

            if (messageFormat == null)
            {
                throw new ArgumentNullException(nameof(messageFormat));
            }

            IVsOutputWindowPane sonarLintPane = GetOrCreateSonarLintOutputPane(serviceProvider);
            if (sonarLintPane != null)
            {
                WriteLineToPane(sonarLintPane, messageFormat, args);
            }
        }

Usage Example

示例#1
0
 private void OutputMessage(string messageFormat, params object[] args)
 {
     VsShellUtils.WriteToSonarLintOutputPane(this.host, messageFormat, args);
 }
All Usage Examples Of SonarLint.VisualStudio.Integration.VsShellUtils::WriteToSonarLintOutputPane