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); }
private void OnNotification(object sender, DllExportNotificationEventArgs e) { EventHandler <DllExportNotificationEventArgs> notification = this.Notification; if (notification == null) { return; } notification(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); }