Example #1
0
        // Token: 0x06000832 RID: 2098 RVA: 0x00039E88 File Offset: 0x00038088
        protected override bool HasSubscriptionInternal(MailboxSession mailboxSession, StoreObjectId folderId)
        {
            bool result;

            using (SharingSubscriptionManager sharingSubscriptionManager = new SharingSubscriptionManager(mailboxSession))
            {
                result = (sharingSubscriptionManager.GetByLocalFolderId(folderId) != null);
            }
            return(result);
        }
Example #2
0
        private static SharingSubscriptionData GetSubscriptionData(MailboxSession mailboxSession, StoreObjectId sharingFolderId)
        {
            SharingSubscriptionData result;

            using (SharingSubscriptionManager sharingSubscriptionManager = new SharingSubscriptionManager(mailboxSession))
            {
                SharingSubscriptionData byLocalFolderId = sharingSubscriptionManager.GetByLocalFolderId(sharingFolderId);
                if (byLocalFolderId == null)
                {
                    SharingEngine.Tracer.TraceError <StoreObjectId>(0L, "{0}: No subscription for this folder", sharingFolderId);
                    throw new SubscriptionNotFoundException();
                }
                SharingEngine.Tracer.TraceDebug <StoreObjectId, SharingSubscriptionData>(0L, "{0}: Found subscription: {1}", sharingFolderId, byLocalFolderId);
                result = byLocalFolderId;
            }
            return(result);
        }
Example #3
0
 private void UpdateSubscriptionData(MailboxSession mailboxSession, Uri sharingUrl)
 {
     using (SharingSubscriptionManager sharingSubscriptionManager = new SharingSubscriptionManager(mailboxSession))
     {
         SharingSubscriptionData sharingSubscriptionData = this.subscription;
         int num = 0;
         for (;;)
         {
             sharingSubscriptionData.SharingUrl = sharingUrl;
             num++;
             bool throwIfConflict = num > 3;
             sharingSubscriptionData = sharingSubscriptionManager.CreateOrUpdate(sharingSubscriptionData, throwIfConflict);
             if (StringComparer.OrdinalIgnoreCase.Equals(sharingSubscriptionData.SharingUrl, sharingUrl))
             {
                 break;
             }
             sharingSubscriptionData = sharingSubscriptionManager.GetByLocalFolderId(sharingSubscriptionData.LocalFolderId);
         }
     }
 }