// Token: 0x06002E93 RID: 11923 RVA: 0x0010A058 File Offset: 0x00108258
        protected override OwaStoreObjectId GetSeekId()
        {
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("SId");

            if (owaStoreObjectId == null)
            {
                return(null);
            }
            if (!owaStoreObjectId.IsConversationId && this.IsConversationView)
            {
                ConversationId conversationId = ConversationUtilities.MapItemToConversation(base.UserContext, owaStoreObjectId);
                if (conversationId != null)
                {
                    this.newSeekId = OwaStoreObjectId.CreateFromConversationId(conversationId, base.DataFolder, null);
                }
            }
            else if (owaStoreObjectId.IsConversationId && !this.IsConversationView)
            {
                StoreObjectId storeObjectId = ConversationUtilities.MapConversationToItem(base.UserContext, owaStoreObjectId.ConversationId, OwaStoreObjectId.CreateFromStoreObject(base.DataFolder));
                if (storeObjectId != null)
                {
                    this.newSeekId = OwaStoreObjectId.CreateFromStoreObjectId(storeObjectId, owaStoreObjectId);
                }
            }
            return(this.newSeekId ?? owaStoreObjectId);
        }
 // Token: 0x06002E99 RID: 11929 RVA: 0x0010A31C File Offset: 0x0010851C
 private void InternalExpandConversation(OwaStoreObjectId expId)
 {
     try
     {
         if (expId != null)
         {
             SortOrder sortOrder = SortOrder.Ascending;
             ConversationPartsList2 conversationPartsList = new ConversationPartsList2(sortOrder, base.UserContext, base.SearchScope);
             base.BindToFolder();
             ConversationTreeSortOrder sortOrder2 = base.UserContext.UserOptions.ShowTreeInListView ? ConversationTreeSortOrder.DeepTraversalAscending : ConversationUtilities.GetConversationTreeSortOrder(base.UserContext.UserOptions.ConversationSortOrder);
             conversationPartsList.ConversationPartsDataSource = new ConversationPartsDataSource(base.UserContext, conversationPartsList.Properties, base.DataFolder, expId, sortOrder2);
             conversationPartsList.ConversationPartsDataSource.Load();
             OwaStoreObjectId conversationId = expId;
             if (base.IsFiltered)
             {
                 conversationId = OwaStoreObjectId.CreateFromConversationId(expId.ConversationId, base.DataFolder, expId.InstanceKey);
             }
             conversationPartsList.RenderConversationParts(this.Writer, conversationId, base.ContextFolder, base.DataFolder);
         }
     }
     finally
     {
         this.EndProcessEvent();
     }
 }
        public void IgnoreConversations()
        {
            DeleteItemInfo[]   array  = (DeleteItemInfo[])base.GetParameter("Itms");
            OwaStoreObjectId[] array2 = (OwaStoreObjectId[])base.GetParameter("Cnvs");
            if (array != null)
            {
                if (array2 != null)
                {
                    throw new OwaInvalidRequestException("IgnoreConversations does not accept both conversation IDs and items.");
                }
                if (array.Length > 500)
                {
                    throw new OwaInvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Calling ignore conversation on {0} item(s) in a single request is not supported", new object[]
                    {
                        array.Length
                    }));
                }
                OwaStoreObjectId        owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("fId");
                MailboxSession          session          = (MailboxSession)owaStoreObjectId.GetSession(base.UserContext);
                List <OwaStoreObjectId> list             = new List <OwaStoreObjectId>(array.Length);
                using (Folder folder = Folder.Bind(session, owaStoreObjectId.StoreObjectId))
                {
                    foreach (DeleteItemInfo deleteItemInfo in array)
                    {
                        ConversationId conversationId = ConversationUtilities.MapItemToConversation(base.UserContext, deleteItemInfo.OwaStoreObjectId);
                        if (conversationId != null)
                        {
                            list.Add(OwaStoreObjectId.CreateFromConversationId(conversationId, folder, null));
                        }
                    }
                }
                array2 = list.ToArray();
            }
            base.CheckSizeOfBatchOperation(array2);
            bool flag = true;

            foreach (OwaStoreObjectId conversationId2 in array2)
            {
                flag &= ConversationUtilities.IgnoreConversation(base.UserContext, conversationId2);
            }
            if (!flag)
            {
                base.RenderErrorResult("errDel", 166628739);
            }
        }
Ejemplo n.º 4
0
 // Token: 0x06001F73 RID: 8051 RVA: 0x000B53AC File Offset: 0x000B35AC
 public string GetItemId()
 {
     if (this.conversationMode)
     {
         ConversationId itemProperty  = this.GetItemProperty <ConversationId>(ConversationItemSchema.ConversationId);
         byte[]         itemProperty2 = this.GetItemProperty <byte[]>(ItemSchema.InstanceKey);
         if (itemProperty != null)
         {
             return(OwaStoreObjectId.CreateFromConversationId(itemProperty, this.Folder, itemProperty2).ToString());
         }
         return(null);
     }
     else
     {
         VersionedId itemProperty3 = this.GetItemProperty <VersionedId>(ItemSchema.Id);
         if (itemProperty3 != null)
         {
             return(Utilities.GetItemIdString(itemProperty3.ObjectId, this.Folder));
         }
         return(null);
     }
 }
Ejemplo n.º 5
0
        // Token: 0x06001F70 RID: 8048 RVA: 0x000B4F1C File Offset: 0x000B311C
        private bool LoadById(ObjectId seekToObjectId, SeekDirection seekDirection, int itemCount, bool adjacent)
        {
            ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "FolderListViewDataSource.Load(IUniqueItemId seekToItemId, SeekDirection seekDirection, int itemCount)");
            if (itemCount < 1)
            {
                throw new ArgumentOutOfRangeException("itemCount", "itemCount must be greater than 0");
            }
            if (seekToObjectId == null)
            {
                throw new ArgumentNullException("seekToObjectId");
            }
            if (!this.UserHasRightToLoad)
            {
                return(true);
            }
            StoreId storeId = Utilities.TryGetStoreId(seekToObjectId);

            PropertyDefinition[] requestedProperties = base.GetRequestedProperties();
            if (this.folder.ItemCount == 0)
            {
                return(true);
            }
            bool flag  = false;
            bool flag2 = false;

            try
            {
                if (this.queryResult == null)
                {
                    this.queryResult = this.CreateQueryResult(this.filterQuery, this.sortBy, requestedProperties);
                }
                if (!this.conversationMode)
                {
                    StoreObjectId storeObjectId = storeId as StoreObjectId;
                    if (storeObjectId != null)
                    {
                        flag2 = this.queryResult.SeekToCondition(SeekReference.OriginBeginning, new ComparisonFilter(ComparisonOperator.Equal, ItemSchema.Id, storeObjectId));
                    }
                }
                else
                {
                    ConversationId conversationId = storeId as ConversationId;
                    if (conversationId != null)
                    {
                        if (adjacent)
                        {
                            OwaStoreObjectId owaStoreObjectId = seekToObjectId as OwaStoreObjectId;
                            if (owaStoreObjectId.InstanceKey != null)
                            {
                                flag2 = this.queryResult.SeekToCondition(SeekReference.OriginBeginning, new ComparisonFilter(ComparisonOperator.Equal, ItemSchema.InstanceKey, owaStoreObjectId.InstanceKey));
                            }
                        }
                        else
                        {
                            flag2 = this.queryResult.SeekToCondition(SeekReference.OriginBeginning, new ComparisonFilter(ComparisonOperator.Equal, ConversationItemSchema.ConversationId, conversationId));
                            if (flag2)
                            {
                                IStorePropertyBag[] propertyBags = this.queryResult.GetPropertyBags(1);
                                byte[] instanceKey = propertyBags[0].TryGetProperty(ItemSchema.InstanceKey) as byte[];
                                this.newSelectionId = OwaStoreObjectId.CreateFromConversationId(conversationId, this.Folder, instanceKey);
                                this.queryResult.SeekToOffset(SeekReference.OriginCurrent, -1);
                            }
                        }
                    }
                }
                if (adjacent && !flag2)
                {
                    return(false);
                }
                if (!flag2)
                {
                    this.queryResult.SeekToOffset(SeekReference.OriginBeginning, 0);
                }
                switch (seekDirection)
                {
                case SeekDirection.Next:
                    if (adjacent)
                    {
                        this.queryResult.SeekToOffset(SeekReference.OriginCurrent, 1);
                    }
                    else if (this.queryResult.EstimatedRowCount < this.queryResult.CurrentRow + itemCount + 1)
                    {
                        this.queryResult.SeekToOffset(SeekReference.OriginCurrent, this.queryResult.EstimatedRowCount - this.queryResult.CurrentRow - itemCount);
                    }
                    break;

                case SeekDirection.Previous:
                {
                    int offset;
                    if (adjacent)
                    {
                        if (this.queryResult.CurrentRow == 0)
                        {
                            return(true);
                        }
                        if (this.queryResult.CurrentRow < itemCount)
                        {
                            itemCount = this.queryResult.CurrentRow;
                        }
                        offset = -1 * itemCount;
                    }
                    else if (this.queryResult.CurrentRow + 1 < itemCount)
                    {
                        offset = -1 * (this.queryResult.CurrentRow + 1);
                    }
                    else
                    {
                        offset = 1 - itemCount;
                    }
                    this.queryResult.SeekToOffset(SeekReference.OriginCurrent, offset);
                    break;
                }
                }
                this.GetView(this.queryResult, itemCount, this.queryResult.CurrentRow);
                flag = true;
            }
            finally
            {
                if (!flag || this.shouldDisposeQueryResult)
                {
                    this.DisposeQueryResultIfPresent();
                }
            }
            return(true);
        }