public void Notify(
            int severity,
            string code,
            string fileName,
            SourceCodePosition?startPosition,
            SourceCodePosition?endPosition,
            string message,
            params object[] values)
        {
            DllExportNotificationEventArgs e = new DllExportNotificationEventArgs()
            {
                Severity      = severity,
                Code          = code,
                Context       = this.Context,
                FileName      = fileName,
                StartPosition = startPosition,
                EndPosition   = endPosition
            };

            e.Message = values.NullSafeCall <object[], int>((Func <int>)(() => values.Length)) == 0 ? message : string.Format((IFormatProvider)CultureInfo.InvariantCulture, message, values);
            if (string.IsNullOrEmpty(e.Message))
            {
                return;
            }
            this.Notify(e);
        }
Example #2
0
        private void OnNotification(object sender, DllExportNotificationEventArgs e)
        {
            EventHandler <DllExportNotificationEventArgs> eventHandler = this.Notification;

            if (eventHandler == null)
            {
                return;
            }
            eventHandler(sender, e);
        }
        public void Notify(DllExportNotificationEventArgs e)
        {
            NotificationContext notificationContext = this.Context;

            if ((object)notificationContext == null)
            {
                notificationContext = new NotificationContext((string)null, (object)this);
            }
            this.OnNotification((object)notificationContext, e);
        }
Example #4
0
 public void Notify(DllExportNotificationEventArgs e)
 {
     this.OnNotification((object)(this.Context ?? new NotificationContext((string)null, (object)this)), e);
 }