// Token: 0x06001463 RID: 5219 RVA: 0x0007C7A0 File Offset: 0x0007A9A0 internal void ProcessNotification(TextWriter writer, QueryNotification notification, out bool successfullyProcessed) { if (writer == null) { throw new ArgumentNullException("writer"); } if (notification == null) { throw new ArgumentNullException("notification"); } successfullyProcessed = true; if (this.isDisposed || this.missedNotifications || this.needReinitSubscriptions) { string message = string.Format("Ignoring folder content change notification for user {0}, isDisposed:{1}, missedNotifications:{2}, needReinitSubscriptions:{3}", new object[] { this.MailboxSessionDisplayName, this.isDisposed, this.missedNotifications, this.needReinitSubscriptions }); ExTraceGlobals.NotificationsCallTracer.TraceDebug((long)this.GetHashCode(), message); return; } try { QueryNotificationType eventType = notification.EventType; Culture.InternalSetAsyncThreadCulture(this.userContext.UserCulture); switch (eventType) { case QueryNotificationType.RowAdded: this.ProcessRowAddedNotification(writer, notification); break; case QueryNotificationType.RowDeleted: this.ProcessRowDeletedNotification(writer, notification); break; case QueryNotificationType.RowModified: this.ProcessRowModifiedNotification(writer, notification); break; default: throw new ArgumentException("Invalid queryNotificationType :" + eventType); } } catch (Exception ex) { if (!this.isDisposed && !this.missedNotifications && !this.needReinitSubscriptions) { ExTraceGlobals.NotificationsCallTracer.TraceDebug <string>((long)this.GetHashCode(), "Unexpected exception in FolderContentChangeNotificationHandler:ProcessNotification. Exception: {0}", ex.Message); if (Globals.SendWatsonReports) { ExTraceGlobals.CoreTracer.TraceDebug(0L, "Sending watson report"); ExWatson.AddExtraData(this.GetExtraWatsonData()); ExWatson.SendReport(ex, ReportOptions.None, null); } successfullyProcessed = false; this.missedNotifications = true; } } }
internal void HandleReminderNotification(Notification notif) { QueryNotification queryNotification = notif as QueryNotification; StringBuilder stringBuilder = null; if (queryNotification == null || !this.FProcessEventType(queryNotification.EventType)) { return; } bool flag = false; lock (this) { if (this.isDisposed || this.missedNotifications || this.needReinitSubscriptions) { return; } } try { this.userContext.Lock(); Culture.InternalSetAsyncThreadCulture(this.userContext.UserCulture, this.userContext); OwaMapiNotificationHandler.UpdateMailboxSessionBeforeAccessing(this.mailboxSession, this.userContext); lock (this) { bool flag4 = (this.flags & ClientSubscriptionFlags.Reminders) == ClientSubscriptionFlags.Reminders; if (flag4) { stringBuilder = new StringBuilder(); using (StringWriter stringWriter = new StringWriter(stringBuilder, CultureInfo.InvariantCulture)) { OwaMapiNotificationHandler.ProcessReminders(this.userContext, stringWriter); stringWriter.Write("setRmPllInt(" + 28800000L + "); "); } } } if (this.userContext.LockedByCurrentThread()) { Utilities.DisconnectStoreSession(this.mailboxSession); this.userContext.Unlock(); } if (stringBuilder != null) { this.emailPayload.AddRemindersPayload(stringBuilder); } this.emailPayload.PickupData(); } catch (OwaLockTimeoutException ex) { ExTraceGlobals.CoreCallTracer.TraceDebug <string>((long)this.GetHashCode(), "User context lock timed out for notification thread. Exception: {0}", ex.Message); flag = true; } catch (Exception ex2) { ExTraceGlobals.CoreCallTracer.TraceDebug <string>((long)this.GetHashCode(), "Unexpected exception in HandleHierarchyNotification on the notification thread. Exception: {0}", ex2.Message); flag = true; } finally { if (flag) { lock (this) { this.missedNotifications = true; } } if (this.userContext.LockedByCurrentThread()) { Utilities.DisconnectStoreSessionSafe(this.mailboxSession); this.userContext.Unlock(); } } }