// 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);
        }
Exemple #2
0
        public void ExpandItemParts()
        {
            ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "ReadConversationEventHandler.ExpandItemParts");
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("CnvId");

            OwaStoreObjectId[]   array        = (OwaStoreObjectId[])base.GetParameter("IPId");
            Conversation         conversation = ConversationUtilities.LoadConversation(base.UserContext, owaStoreObjectId, ItemPartWriter.GetRequestedProperties());
            List <StoreObjectId> localItemIds = ConversationUtilities.GetLocalItemIds((MailboxSession)owaStoreObjectId.GetSession(base.UserContext), conversation, owaStoreObjectId.ParentFolderId);

            ConversationUtilities.MarkLocalNodes(conversation, localItemIds);
            conversation.OnBeforeItemLoad += ItemPartWriter.OnBeforeItemLoad;
            foreach (OwaStoreObjectId owaStoreObjectId2 in array)
            {
                this.SanitizingWriter.Write("<div id=\"");
                this.SanitizingWriter.Write(owaStoreObjectId2.ToString());
                this.SanitizingWriter.Write("\">");
                IConversationTreeNode conversationTreeNode;
                if (!conversation.ConversationTree.TryGetConversationTreeNode(owaStoreObjectId2.StoreObjectId, out conversationTreeNode))
                {
                    this.Writer.Write("<div id=divExp itemNotFound=1>&nbsp;</div>");
                }
                else
                {
                    MailboxSession session = (MailboxSession)owaStoreObjectId.GetSession(base.UserContext);
                    ConversationUtilities.SortPropertyBags(conversationTreeNode, localItemIds, session);
                    using (ItemPartWriter writer = ItemPartWriter.GetWriter(base.UserContext, this.Writer, owaStoreObjectId, conversation, conversationTreeNode))
                    {
                        writer.RenderExpandedItemPart(false, false, null);
                    }
                }
                this.SanitizingWriter.Write("</div>");
            }
        }
        public void Load()
        {
            ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "ConversationPartsDataSource.Load()");
            if (!base.UserHasRightToLoad)
            {
                return;
            }
            PropertyDefinition[] requestedProperties = base.GetRequestedProperties();
            MailboxSession       mailboxSession      = base.Folder.Session as MailboxSession;

            this.conversation = ConversationUtilities.LoadConversation(mailboxSession, this.conversationId, requestedProperties);
            this.conversation.TrimToNewest(Globals.MaxItemsInConversationExpansion);
            this.totalCount = this.conversation.ConversationTree.Count;
            if (this.totalCount == 0)
            {
                return;
            }
            this.conversation.ConversationTree.Sort(this.sortOrder);
            this.nodes = new IConversationTreeNode[this.totalCount];
            List <StoreObjectId> localItemIds = ConversationUtilities.GetLocalItemIds(this.conversation, base.Folder);
            int num = 0;

            foreach (IConversationTreeNode conversationTreeNode in this.conversation.ConversationTree)
            {
                ConversationUtilities.SortPropertyBags(conversationTreeNode, localItemIds, mailboxSession);
                this.nodes[num] = conversationTreeNode;
                num++;
            }
            if (0 < this.nodes.Length)
            {
                base.StartRange = 0;
                base.EndRange   = this.totalCount - 1;
            }
        }
Exemple #4
0
        internal void MarkPayloadAsRead()
        {
            string queryStringParameter = Utilities.GetQueryStringParameter(this.Request, "mrd", false);

            if (queryStringParameter != null)
            {
                JunkEmailStatus junkEmailStatus       = JunkEmailStatus.Unknown;
                string          queryStringParameter2 = Utilities.GetQueryStringParameter(this.Request, "JS", false);
                int             num;
                if (queryStringParameter2 != null && int.TryParse(queryStringParameter2, out num) && (num == 1 || num == 0))
                {
                    junkEmailStatus = (JunkEmailStatus)num;
                }
                OwaStoreObjectId   owaStoreObjectId = OwaStoreObjectId.CreateFromString(queryStringParameter);
                OwaStoreObjectId[] localItemIds     = ConversationUtilities.GetLocalItemIds(this.UserContext, new OwaStoreObjectId[]
                {
                    owaStoreObjectId
                }, null, new PropertyDefinition[]
                {
                    MessageItemSchema.IsRead
                }, (IStorePropertyBag propertyBag) => !ItemUtility.GetProperty <bool>(propertyBag, MessageItemSchema.IsRead, true));
                if (localItemIds.Length > 0)
                {
                    Utilities.MarkItemsAsRead(this.UserContext, localItemIds, junkEmailStatus, false);
                }
            }
        }
        // Token: 0x06002E9B RID: 11931 RVA: 0x0010A4EC File Offset: 0x001086EC
        private void DeleteConversationsOrItems(bool isPermanent)
        {
            DeleteItemInfo[]   array  = (DeleteItemInfo[])base.GetParameter("Itms");
            OwaStoreObjectId[] array2 = (OwaStoreObjectId[])base.GetParameter("Cnvs");
            if (array != null && array.Length > 0)
            {
                foreach (DeleteItemInfo deleteItemInfo in array)
                {
                    if (!deleteItemInfo.OwaStoreObjectId.IsOtherMailbox && !deleteItemInfo.OwaStoreObjectId.IsPublic && deleteItemInfo.OwaStoreObjectId.IsConversationId)
                    {
                        return;
                    }
                }
                base.InternalDelete(isPermanent, null);
                return;
            }
            if (array2 != null && array2.Length > 0)
            {
                OwaStoreObjectId   owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("fId");
                OwaStoreObjectId[] localItemIds     = ConversationUtilities.GetLocalItemIds(base.UserContext, array2, owaStoreObjectId);
                if (localItemIds.Length == 0)
                {
                    return;
                }
                new List <OwaStoreObjectId>();
                new List <OwaStoreObjectId>();
                if (!Utilities.IsDefaultFolderId(base.UserContext, owaStoreObjectId, DefaultFolderType.DeletedItems) && !isPermanent)
                {
                    OwaStoreObjectId[] array4 = localItemIds;
                    int j = 0;
                    while (j < array4.Length)
                    {
                        OwaStoreObjectId owaStoreObjectId2 = array4[j];
                        if (owaStoreObjectId2.StoreObjectId.ObjectType == StoreObjectType.MeetingRequest)
                        {
                            goto IL_FD;
                        }
                        if (owaStoreObjectId2.StoreObjectId.ObjectType == StoreObjectType.MeetingCancellation)
                        {
                            goto Block_12;
                        }
IL_10E:
                        j++;
                        continue;
Block_12:
                        try
                        {
IL_FD:
                            MeetingUtilities.DeleteMeetingMessageCalendarItem(owaStoreObjectId2.StoreObjectId);
                        }
                        catch (ObjectNotFoundException)
                        {
                        }
                        goto IL_10E;
                    }
                }
                base.InternalDelete(isPermanent, localItemIds);
            }
        }
Exemple #6
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);
 }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            string parameter = base.GetParameter("id", true);

            this.searchWords    = base.GetParameter("sw", false);
            this.conversationId = OwaStoreObjectId.CreateFromString(parameter);
            this.conversation   = ConversationUtilities.LoadConversation(base.UserContext, this.conversationId, ItemPartWriter.GetRequestedProperties());
            this.conversation.TrimToNewest(Globals.MaxItemsInConversationReadingPane);
            MailboxSession mailboxSession = (MailboxSession)this.conversationId.GetSession(base.UserContext);

            this.sentItemsFolderId = mailboxSession.GetDefaultFolderId(DefaultFolderType.SentItems);
            this.localItemIds      = ConversationUtilities.GetLocalItemIds(mailboxSession, this.conversation, this.conversationId.ParentFolderId);
            base.OwaContext.ShouldDeferInlineImages = !base.IsInOEHResponse;
            this.conversation.OnBeforeItemLoad     += ItemPartWriter.OnBeforeItemLoad;
        }
 // 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);
 }
Exemple #9
0
        // Token: 0x06001F8A RID: 8074 RVA: 0x000B57B8 File Offset: 0x000B39B8
        internal void RenderConversationParts(TextWriter writer, OwaStoreObjectId conversationId, Folder contextFolder, Folder dataFolder)
        {
            ExDateTime?lastDeliveryTime = ConversationUtilities.GetLastDeliveryTime(this.ConversationPartsDataSource.Conversation);

            writer.Write("<div id=\"");
            writer.Write("tblExp");
            writer.Write("\" ");
            writer.Write("expId");
            writer.Write("=\"");
            Utilities.HtmlEncode(conversationId.ToString(), writer);
            writer.Write("\" ");
            writer.Write("iGC");
            writer.Write("=");
            writer.Write(ConversationUtilities.GetGlobalCount(this.ConversationPartsDataSource.Conversation));
            writer.Write(">");
            FolderViewStates    folderViewStates    = base.UserContext.GetFolderViewStates(contextFolder);
            ReadingPanePosition readingPanePosition = folderViewStates.ReadingPanePosition;
            int num;

            if (readingPanePosition == ReadingPanePosition.Right)
            {
                num = folderViewStates.ViewWidth;
            }
            else
            {
                num = 800;
            }
            int num2 = (num - ListViewColumns.GetColumn(ColumnId.DeliveryTime).Width - ListViewColumns.GetColumn(ColumnId.MailIcon).Width - ListViewColumns.GetColumn(ColumnId.From).Width - ListViewColumns.GetColumn(ColumnId.Importance).Width - ListViewColumns.GetColumn(ColumnId.HasAttachment).Width - ListViewColumns.GetColumn(ColumnId.Categories).Width - ListViewColumns.GetColumn(ColumnId.FlagDueDate).Width - 18) / 4;

            num2 = Math.Max(num2, 0);
            List <StoreObjectId> localItemIds = ConversationUtilities.GetLocalItemIds(this.ConversationPartsDataSource.Conversation, dataFolder);

            ConversationUtilities.MarkLocalNodes(this.ConversationPartsDataSource.Conversation, localItemIds);
            while (this.DataSource.MoveNext())
            {
                this.RenderConversationPartRow(writer, contextFolder, dataFolder, lastDeliveryTime, num2);
            }
            writer.Write("</div>");
        }
Exemple #10
0
        public void Refresh()
        {
            ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "ReadConversationEventHandler.Refresh");
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("CnvId");

            OwaStoreObjectId[] expandedIds    = (OwaStoreObjectId[])base.GetParameter("ExpIds");
            int[]        expandedInternetMIds = (int[])base.GetParameter("ExpInternetMIds");
            Conversation conversation         = ConversationUtilities.LoadConversation(base.UserContext, owaStoreObjectId, ItemPartWriter.GetRequestedProperties());

            conversation.TrimToNewest(Globals.MaxItemsInConversationReadingPane);
            MailboxSession       session      = (MailboxSession)owaStoreObjectId.GetSession(base.UserContext);
            List <StoreObjectId> localItemIds = ConversationUtilities.GetLocalItemIds(session, conversation, owaStoreObjectId.ParentFolderId);

            conversation.OnBeforeItemLoad += ItemPartWriter.OnBeforeItemLoad;
            this.Writer.Write("<div id=divRfrsh");
            RenderingUtilities.RenderExpando(this.Writer, "iGC", ConversationUtilities.GetGlobalCount(conversation));
            RenderingUtilities.RenderExpando(this.Writer, "iC", localItemIds.Count);
            RenderingUtilities.RenderExpando(this.Writer, "iSort", (int)base.UserContext.UserOptions.ConversationSortOrder);
            this.Writer.Write(">");
            ConversationUtilities.RenderItemParts(this.Writer, base.UserContext, owaStoreObjectId, conversation, expandedIds, expandedInternetMIds, localItemIds, null, false);
            this.Writer.Write("</div>");
        }