private Watermark[] BuildWatermarkArray(Guid assistantId) { ExTraceGlobals.EventControllerTracer.TraceDebug <EventControllerPrivate, Guid, int>((long)this.GetHashCode(), "{0}: Building Watermark Array for {1}. Dispatcher count: {2}", this, assistantId, this.dispatchers.Count); List <Watermark> list = new List <Watermark>(this.dispatchers.Count + 1); long highestEventPolled = base.HighestEventPolled; ExTraceGlobals.EventControllerTracer.TraceDebug <EventControllerPrivate, long>((long)this.GetHashCode(), "{0}: HighestWatermarkPolled: {1}", this, highestEventPolled); foreach (MailboxDispatcher mailboxDispatcher in this.MailboxDispatchers) { EventDispatcherPrivate assistantDispatcher = mailboxDispatcher.GetAssistantDispatcher(assistantId); Watermark currentWatermark = assistantDispatcher.GetCurrentWatermark(ref highestEventPolled); if (currentWatermark != null) { ExTraceGlobals.EventControllerTracer.TraceDebug <EventControllerPrivate, Guid, long>((long)this.GetHashCode(), "{0}: Saving watermark: mailbox: {1}, counter: {2}", this, currentWatermark.MailboxGuid, currentWatermark.EventCounter); list.Add(currentWatermark); } else { ExTraceGlobals.EventControllerTracer.TraceDebug <EventControllerPrivate, Guid>((long)this.GetHashCode(), "{0}: Not updating watermark for mailbox: {1}", this, assistantDispatcher.MailboxGuid); } } ExTraceGlobals.EventControllerTracer.TraceDebug <EventControllerPrivate, long>((long)this.GetHashCode(), "{0}: DatabaseWatermark is {1}", this, highestEventPolled); if (highestEventPolled != base.DatabaseBookmark[assistantId]) { ExTraceGlobals.EventControllerTracer.TraceDebug <EventControllerPrivate, long>((long)this.GetHashCode(), "{0}: Saving DatabaseWatermark: {1}", this, highestEventPolled); list.Add(Watermark.GetDatabaseWatermark(highestEventPolled)); } else { ExTraceGlobals.EventControllerTracer.TraceDebug <EventControllerPrivate>((long)this.GetHashCode(), "{0}: DatabaseWatermark has not changed -- not saving", this); } return(list.ToArray()); }
// Token: 0x06000222 RID: 546 RVA: 0x0000C0E0 File Offset: 0x0000A2E0 protected override void UpdateWatermarksForAssistant(Guid assistantId) { long watermark = this.dispatcher.GetWatermark(base.HighestEventPolled); if (watermark != base.DatabaseBookmark[assistantId]) { ExTraceGlobals.EventControllerTracer.TraceDebug <EventControllerPublic, long>((long)this.GetHashCode(), "{0}: Saving database watermark at {1}", this, watermark); base.EventAccess.SaveWatermarks(assistantId, new Watermark[] { Watermark.GetDatabaseWatermark(watermark) }); base.DatabaseBookmark[assistantId] = watermark; } }