// Token: 0x060010E3 RID: 4323 RVA: 0x00045B78 File Offset: 0x00043D78 public static CalendarViewQueryResumptionPoint SafeGetResumptionPoint(string version, string recurringPhase, string instanceKey, string sortKeyValue) { CalendarViewQueryResumptionPoint result = null; bool resumeToRecurringMeetings; if (version == CalendarViewQueryResumptionPoint.CurrentVersion && bool.TryParse(recurringPhase, out resumeToRecurringMeetings)) { result = CalendarViewQueryResumptionPoint.CreateInstance(resumeToRecurringMeetings, CalendarSyncState.SafeGetInstanceKey(instanceKey), CalendarSyncState.SafeGetDateTimeValue(sortKeyValue)); } return(result); }
// Token: 0x060010F0 RID: 4336 RVA: 0x00046A50 File Offset: 0x00044C50 private SyncCalendarResponse AssembleResponse(CalendarViewQueryResumptionPoint queryResumptionPoint, ExDateTime?oldWindowEnd, List <SyncCalendarItemType> updatedItemsList, List <SyncCalendarItemType> recurrenceMastersWithInstances, List <SyncCalendarItemType> recurrenceMastersWithoutInstances, IDictionary <StoreId, SyncCalendarItemType> unchangedRecurrenceMastersWithInstances, List <StoreId> deletedItemsList, bool includesLastItemInRange) { return(new SyncCalendarResponse { QueryResumptionPoint = queryResumptionPoint, OldWindowEnd = oldWindowEnd, DeletedItems = deletedItemsList, UpdatedItems = updatedItemsList, RecurrenceMastersWithInstances = recurrenceMastersWithInstances, RecurrenceMastersWithoutInstances = recurrenceMastersWithoutInstances, UnchangedRecurrenceMastersWithInstances = new List <SyncCalendarItemType>(unchangedRecurrenceMastersWithInstances.Values), IncludesLastItemInRange = includesLastItemInRange }); }
// Token: 0x060010DA RID: 4314 RVA: 0x00045ABB File Offset: 0x00043CBB public CalendarSyncState(string base64IcsSyncState, CalendarViewQueryResumptionPoint queryResumptionPoint, ExDateTime?oldWindowEndTime) { this.IcsSyncState = base64IcsSyncState; this.QueryResumptionPoint = queryResumptionPoint; this.OldWindowEnd = oldWindowEndTime; }
public AirSyncCalendarSyncState(string base64IcsSyncState, CalendarViewQueryResumptionPoint queryResumptionPoint, ExDateTime?oldWindowEndTime) : base(base64IcsSyncState, queryResumptionPoint, oldWindowEndTime) { }
// Token: 0x060010EA RID: 4330 RVA: 0x00045E10 File Offset: 0x00044010 public SyncCalendarResponse Execute(out IFolderSyncState newSyncState, out IList <KeyValuePair <StoreId, LocalizedException> > caughtExceptions) { ExTraceGlobals.SyncCalendarTracer.TraceDebug((long)this.GetHashCode(), "XsoSyncCalendar.Execute: Start"); Stopwatch stopwatch = Stopwatch.StartNew(); caughtExceptions = new List <KeyValuePair <StoreId, LocalizedException> >(); MailboxSyncProviderFactory mailboxSyncProviderFactory = new MailboxSyncProviderFactory(this.session, this.folderId); HashSet <StoreId> syncItemsHashSet = new HashSet <StoreId>(); List <SyncCalendarItemType> updatedItemsList = new List <SyncCalendarItemType>(); List <SyncCalendarItemType> recurrenceMastersWithInstances = new List <SyncCalendarItemType>(); List <SyncCalendarItemType> recurrenceMastersWithoutInstances = new List <SyncCalendarItemType>(); Dictionary <StoreId, SyncCalendarItemType> unchangedRecurrenceMastersWithInstances = new Dictionary <StoreId, SyncCalendarItemType>(); List <StoreId> deletedItemsList = new List <StoreId>(); bool flag = true; CalendarViewQueryResumptionPoint calendarViewQueryResumptionPoint = null; using (ISyncProvider syncProvider = mailboxSyncProviderFactory.CreateSyncProvider(null)) { newSyncState = this.syncState.CreateFolderSyncState(this.folderId, syncProvider); ExDateTime value; if (CalendarSyncState.IsEmpty(this.syncState) || this.syncState.OldWindowEnd == null || this.windowStart >= this.syncState.OldWindowEnd.Value) { ExTraceGlobals.SyncCalendarTracer.TraceDebug((long)this.GetHashCode(), "XsoSyncCalendar.InternalExecute: Requesting catch-up sync state from ICS"); newSyncState.Watermark = syncProvider.GetMaxItemWatermark(newSyncState.Watermark); value = this.windowStart; } else { value = this.syncState.OldWindowEnd.Value; } if (newSyncState.Watermark != null) { int num = this.maxChangesReturned; int num2 = 0; int num3 = 0; if (this.windowEnd > value) { calendarViewQueryResumptionPoint = this.DoQuerySync(syncItemsHashSet, updatedItemsList, recurrenceMastersWithInstances, unchangedRecurrenceMastersWithInstances, value, this.windowEnd, num, caughtExceptions, out num2); flag = !calendarViewQueryResumptionPoint.IsEmpty; num = this.CalculateRemainingItemsCount(num, num2); ExTraceGlobals.SyncCalendarTracer.TraceDebug <int, int, bool>((long)this.GetHashCode(), "XsoSyncCalendar.DoQuerySync added {0} items to the sync response. Remaining Items: {1}; More Available: {2}", num2, num, flag); } if (num != 0) { flag = this.DoIcsSync(syncItemsHashSet, updatedItemsList, recurrenceMastersWithInstances, recurrenceMastersWithoutInstances, unchangedRecurrenceMastersWithInstances, deletedItemsList, newSyncState.Watermark, syncProvider, num, caughtExceptions, out num3); ExTraceGlobals.SyncCalendarTracer.TraceDebug <int, bool>((long)this.GetHashCode(), "XsoSyncCalendar.DoIcsSync added {0} items to the sync response. More Available: {1}", num3, flag); } else { ExTraceGlobals.SyncCalendarTracer.TraceDebug <int, int>((long)this.GetHashCode(), "XsoSyncCalendar; Skipping ICS sync, since we've reached the max items requested (Requested: {0}; Actual: {1}).", this.maxChangesReturned, num2); } ExTraceGlobals.SyncCalendarTracer.TraceDebug <int, int>((long)this.GetHashCode(), "XsoSyncCalendar; Finished fetching items. Total items synced: {0}; Max requested: {1}", num2 + num3, this.maxChangesReturned); } else { flag = false; ExTraceGlobals.SyncCalendarTracer.TraceDebug((long)this.GetHashCode(), "XsoSyncCalendar; Nothing to sync. The specified folder is empty."); } } SyncCalendarResponse result = this.AssembleResponse(flag ? calendarViewQueryResumptionPoint : null, flag ? this.syncState.OldWindowEnd : new ExDateTime?(this.windowEnd), updatedItemsList, recurrenceMastersWithInstances, recurrenceMastersWithoutInstances, unchangedRecurrenceMastersWithInstances, deletedItemsList, !flag); stopwatch.Stop(); ExTraceGlobals.SyncCalendarTracer.TraceDebug((long)this.GetHashCode(), "XsoSyncCalendar.InternalExecute: End " + stopwatch.ElapsedMilliseconds); return(result); }