SonarLint.VisualStudio.Progress.Controller.ErrorNotification.VsMessageBoxNotifier.VsMessageBoxNotifier C# (CSharp) Méthode

VsMessageBoxNotifier() public méthode

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
Résultat 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;
        }