SonarLint.VisualStudio.Progress.Controller.ErrorNotification.VsMessageBoxNotifier.VsMessageBoxNotifier C# (CSharp) Method

VsMessageBoxNotifier() public method

Constructor for VsMessageBoxNotifier
public VsMessageBoxNotifier ( IServiceProvider serviceProvider, string title, string messageFormat, bool logWholeMessage ) : Microsoft.VisualStudio.Shell
serviceProvider IServiceProvider instance. Required.
title string Required message box title
messageFormat string Required. Expected to have only one placeholder
logWholeMessage bool Whether to shown the exception message or the whole exception
return Microsoft.VisualStudio.Shell
        public VsMessageBoxNotifier(IServiceProvider serviceProvider, string title, string messageFormat, bool logWholeMessage)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException(nameof(serviceProvider));
            }

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

            if (string.IsNullOrWhiteSpace(messageFormat))
            {
                throw new ArgumentNullException(nameof(messageFormat));
            }

            this.serviceProvider = serviceProvider;
            this.messageTitle = title;
            this.messageFormat = messageFormat;
            this.logWholeMessage = logWholeMessage;
        }