コード例 #1
0
 // Token: 0x0600141A RID: 5146 RVA: 0x000740E4 File Offset: 0x000722E4
 public void Merge(PushNotificationContext pushNotificationContext)
 {
     this.OriginalTime = pushNotificationContext.OriginalTime;
     this.TenantId     = pushNotificationContext.TenantId;
     if (this.UnseenEmailCount == null)
     {
         this.UnseenEmailCount = pushNotificationContext.UnseenEmailCount;
     }
     if (this.BackgroundSyncType == BackgroundSyncType.None)
     {
         this.BackgroundSyncType = pushNotificationContext.BackgroundSyncType;
     }
 }
        // Token: 0x060013D6 RID: 5078 RVA: 0x000736A8 File Offset: 0x000718A8
        private void HandleNotificationEvent(IMapiEvent mapiEvent, IMailboxSession session, IStoreObject item)
        {
            PushNotificationContext pushNotificationContext = new PushNotificationContext
            {
                OriginalTime = ExDateTime.UtcNow
            };

            if (this.assistantCache.ShouldProcessUnseenEmailEvent(session, this.XSOFactory, mapiEvent) && this.PopulateSubscriptionsAndTenantId(mapiEvent, session, pushNotificationContext))
            {
                if (this.assistantCache.IsBackgroundSyncEnabled(mapiEvent.MailboxGuid))
                {
                    pushNotificationContext.BackgroundSyncType = BackgroundSyncType.Email;
                }
                pushNotificationContext.UnseenEmailCount = new int?(this.ResolveUnseenEmailCount(mapiEvent, pushNotificationContext.Subscriptions));
                PushNotificationHelper.LogMailboxNotificationResolution(mapiEvent.MailboxGuid, pushNotificationContext);
                this.NotificationBatchManager.Add(mapiEvent.MailboxGuid, pushNotificationContext);
            }
        }
コード例 #3
0
 // Token: 0x06001439 RID: 5177 RVA: 0x00074B21 File Offset: 0x00072D21
 internal static void LogMailboxNotificationResolution(Guid mailboxGuid, PushNotificationContext notificationContext)
 {
     PushNotificationsCrimsonEvents.MailboxNotificationResolved.Log <Guid, string>(mailboxGuid, notificationContext.ToString());
     ExTraceGlobals.PushNotificationAssistantTracer.TraceDebug <Guid, string>(0L, "A PushNotificationContext for Mailbox '{0}' is resolved: '{1}'.", mailboxGuid, notificationContext.ToString());
 }
        // Token: 0x060013D7 RID: 5079 RVA: 0x00073738 File Offset: 0x00071938
        private bool PopulateSubscriptionsAndTenantId(IMapiEvent mapiEvent, IMailboxSession session, PushNotificationContext pushNotificationContext)
        {
            PushNotificationContext pushNotificationContext2;

            if (this.NotificationBatchManager.TryGetPushNotification(mapiEvent.MailboxGuid, out pushNotificationContext2))
            {
                pushNotificationContext.Subscriptions = pushNotificationContext2.Subscriptions;
                pushNotificationContext.TenantId      = pushNotificationContext2.TenantId;
            }
            else
            {
                using (IPushNotificationStorage pushNotificationStorage = this.XSOFactory.FindPushNotificationStorage(session))
                {
                    if (pushNotificationStorage != null)
                    {
                        pushNotificationContext.TenantId      = pushNotificationStorage.TenantId;
                        pushNotificationContext.Subscriptions = this.ResolveSubscriptions(session, pushNotificationStorage);
                    }
                }
            }
            return(pushNotificationContext.Subscriptions != null && pushNotificationContext.Subscriptions.Count > 0);
        }