// Token: 0x06002E9A RID: 11930 RVA: 0x0010A3F8 File Offset: 0x001085F8
        private void CopyOrMove(bool isCopy)
        {
            OwaStoreObjectId[] array             = (OwaStoreObjectId[])base.GetParameter("id");
            OwaStoreObjectId   owaStoreObjectId  = (OwaStoreObjectId)base.GetParameter("fId");
            OwaStoreObjectId   owaStoreObjectId2 = (OwaStoreObjectId)base.GetParameter("destId");

            if (!isCopy && owaStoreObjectId != null && Utilities.IsDefaultFolderId(base.UserContext.MailboxSession, owaStoreObjectId.StoreObjectId, DefaultFolderType.DeletedItems) && !Utilities.IsDefaultFolderId(base.UserContext.MailboxSession, owaStoreObjectId2.StoreObjectId, DefaultFolderType.DeletedItems))
            {
                foreach (OwaStoreObjectId owaStoreObjectId3 in array)
                {
                    ConversationUtilities.CancelIgnoreConversation(base.UserContext, owaStoreObjectId3, false);
                }
            }
            if (ConversationUtilities.ContainsConversationItem(base.UserContext, array))
            {
                OwaStoreObjectId[] localItemIds = ConversationUtilities.GetLocalItemIds(base.UserContext, array, owaStoreObjectId);
                if (localItemIds.Length == 0)
                {
                    return;
                }
                base.CopyOrMoveItems(isCopy, localItemIds);
            }
            else
            {
                base.CopyOrMoveItems(isCopy, null);
            }
            OwaStoreObjectId expId = (OwaStoreObjectId)base.GetParameter("expId");

            this.InternalExpandConversation(expId);
        }
        // Token: 0x06002E97 RID: 11927 RVA: 0x0010A150 File Offset: 0x00108350
        private void MarkAsReadOrUnread(bool isRead)
        {
            OwaStoreObjectId[] array = (OwaStoreObjectId[])base.GetParameter("id");
            if (ConversationUtilities.ContainsConversationItem(base.UserContext, array))
            {
                List <OwaStoreObjectId> list  = new List <OwaStoreObjectId>();
                List <OwaStoreObjectId> list2 = new List <OwaStoreObjectId>();
                foreach (OwaStoreObjectId owaStoreObjectId in array)
                {
                    if (base.UserContext.SentItemsFolderId.Equals(owaStoreObjectId.ParentFolderId))
                    {
                        list.Add(owaStoreObjectId);
                    }
                    else
                    {
                        list2.Add(owaStoreObjectId);
                    }
                }
                List <OwaStoreObjectId>        list3  = new List <OwaStoreObjectId>();
                Func <IStorePropertyBag, bool> filter = (IStorePropertyBag propertyBag) => ItemUtility.GetProperty <bool>(propertyBag, MessageItemSchema.IsRead, isRead) != isRead;
                if (list2.Count > 0)
                {
                    list3.AddRange(ConversationUtilities.GetAllItemIds(base.UserContext, list2.ToArray(), new PropertyDefinition[]
                    {
                        MessageItemSchema.IsRead
                    }, filter, new StoreObjectId[]
                    {
                        base.UserContext.SentItemsFolderId
                    }));
                }
                if (list.Count > 0)
                {
                    list3.AddRange(ConversationUtilities.GetAllItemIds(base.UserContext, list.ToArray(), new PropertyDefinition[]
                    {
                        MessageItemSchema.IsRead
                    }, filter, new StoreObjectId[0]));
                }
                array = list3.ToArray();
            }
            if (array.Length > 500)
            {
                throw new OwaInvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Marking {0} item(s) as read or unread in a single request is not supported", new object[]
                {
                    array.Length
                }));
            }
            JunkEmailStatus junkEmailStatus = JunkEmailStatus.NotJunk;

            if (base.IsParameterSet("JS"))
            {
                junkEmailStatus = (JunkEmailStatus)base.GetParameter("JS");
            }
            if (array.Length > 0)
            {
                Utilities.MarkItemsAsRead(base.UserContext, array, junkEmailStatus, !isRead);
            }
        }
예제 #3
0
 // Token: 0x06002C69 RID: 11369 RVA: 0x000F7858 File Offset: 0x000F5A58
 private List <OwaStoreObjectId> GetItemsToAttachIds()
 {
     OwaStoreObjectId[] array = (OwaStoreObjectId[])base.GetParameter("ExIds");
     if (ConversationUtilities.ContainsConversationItem(base.UserContext, array))
     {
         OwaStoreObjectId localFolderId = (OwaStoreObjectId)base.GetParameter("FId");
         array = ConversationUtilities.GetLocalItemIds(base.UserContext, array, localFolderId);
     }
     if (array != null)
     {
         return(new List <OwaStoreObjectId>(array));
     }
     return(null);
 }
 // Token: 0x06002D28 RID: 11560 RVA: 0x000FDCF8 File Offset: 0x000FBEF8
 private OwaStoreObjectId[] GetItemIdsFromParameter()
 {
     OwaStoreObjectId[] array = (OwaStoreObjectId[])base.GetParameter("id");
     if (ConversationUtilities.ContainsConversationItem(base.UserContext, array))
     {
         OwaStoreObjectId localFolderId = (OwaStoreObjectId)base.GetParameter("fId");
         array = ConversationUtilities.GetLocalItemIds(base.UserContext, array, localFolderId);
     }
     if (array.Length > 500)
     {
         throw new OwaInvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Setting move policy on {0} item(s) in a single request is not supported", new object[]
         {
             array.Length
         }));
     }
     return(array);
 }