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

VsActivityLogNotifier() public method

Constructor for VsActivityLogNotifier
public VsActivityLogNotifier ( IServiceProvider serviceProvider, string entrySource, string messageFormat, bool logWholeMessage ) : SonarLint.VisualStudio.Progress.Threading
serviceProvider IServiceProvider instance. Required.
entrySource string >Required activity log entry source
messageFormat string >Required. Expected to have only one placeholder
logWholeMessage bool Whether to shown the exception message or the whole exception
return SonarLint.VisualStudio.Progress.Threading
        public VsActivityLogNotifier(IServiceProvider serviceProvider, string entrySource, string messageFormat, bool logWholeMessage)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException(nameof(serviceProvider));
            }

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

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

            this.serviceProvider = serviceProvider;
            this.entrySource = entrySource;
            this.messageFormat = messageFormat;
            this.logWholeMessage = logWholeMessage;
        }