// Token: 0x060015BE RID: 5566 RVA: 0x0004DCE0 File Offset: 0x0004BEE0
 public FindFlowConversationItem(CallContext callContext, BaseFolderId folderId, string flowConversationId, int requestedItemCount) : base(callContext)
 {
     this.folderId           = folderId;
     this.flowConversationId = flowConversationId;
     this.requestedItemCount = Math.Min((long)requestedItemCount, (long)((ulong)FindFlowConversationItem.MAX_ITEMS));
     this.replyAllExtractor  = new ReplyAllExtractor(base.MailboxIdentityMailboxSession, XSOFactory.Default);
 }
 internal static IdAndSession GetFolderIdAndSession(BaseFolderId folderId, MailboxSession mailboxSession, IdConverter converter)
 {
     if (folderId != null)
     {
         return(converter.ConvertFolderIdToIdAndSession(folderId, IdConverter.ConvertOption.IgnoreChangeKey));
     }
     return(new IdAndSession(mailboxSession.GetDefaultFolderId(DefaultFolderType.AllItems), mailboxSession));
 }
Beispiel #3
0
            public static string GetFolderIdDisplayName(BaseFolderId baseFolderId)
            {
                FolderId folderId = baseFolderId as FolderId;
                string   result;

                if (folderId != null)
                {
                    result = folderId.Id;
                }
                else
                {
                    DistinguishedFolderId distinguishedFolderId = baseFolderId as DistinguishedFolderId;
                    if (distinguishedFolderId != null)
                    {
                        result = distinguishedFolderId.Id.ToString();
                    }
                    else
                    {
                        result = null;
                    }
                }
                return(result);
            }
        internal static QueryFilter GetFlowConversationFilter(BaseFolderId folderId, MailboxSession mailboxSession)
        {
            QueryFilter queryFilter3;

            if (folderId == null)
            {
                QueryFilter queryFilter  = new ComparisonFilter(ComparisonOperator.Equal, StoreObjectSchema.ParentItemId, mailboxSession.GetDefaultFolderId(DefaultFolderType.Inbox));
                QueryFilter queryFilter2 = new ComparisonFilter(ComparisonOperator.Equal, StoreObjectSchema.ParentItemId, mailboxSession.GetDefaultFolderId(DefaultFolderType.SentItems));
                queryFilter3 = new OrFilter(new QueryFilter[]
                {
                    queryFilter,
                    queryFilter2
                });
            }
            else
            {
                queryFilter3 = new TrueFilter();
            }
            return(new AndFilter(new QueryFilter[]
            {
                queryFilter3,
                GetFlowConversation.ItemClassFilter
            }));
        }
Beispiel #5
0
        private void GetAttachmentsFromEwsFolder(BaseFolderId baseFolderId, ModernAttachmentGroup outGroup)
        {
            if (baseFolderId == null || outGroup == null)
            {
                return;
            }
            string folderIdDisplayName = GetModernAttachmentsCommand.Utilities.GetFolderIdDisplayName(baseFolderId);

            try
            {
                IdAndSession idAndSession = base.IdConverter.ConvertFolderIdToIdAndSessionReadOnly(baseFolderId);
                ExDateTime   now          = ExDateTime.Now;
                using (Folder folder = Folder.Bind(idAndSession.Session, idAndSession.Id))
                {
                    List <ModernAttachment> list = new List <ModernAttachment>(0);
                    SortBy[]    sortColumns      = this.BuildSortBy();
                    QueryFilter queryFilter      = this.BuildQueryFilter();
                    using (QueryResult queryResult = folder.ItemQuery(ItemQueryType.None, queryFilter, sortColumns, GetModernAttachmentsCommand.findItemsQueryPropDefs))
                    {
                        int        itemsOffset = this.request.ItemsOffset;
                        int        num         = this.request.ItemsToProcessMax;
                        int        num2        = itemsOffset + num + 1;
                        object[][] rows        = queryResult.GetRows(num2 - 1);
                        this.perfFindItemsDuration = ExDateTime.Now - now;
                        now = ExDateTime.Now;
                        outGroup.ItemsTotal = rows.Length;
                        if (itemsOffset >= rows.Length)
                        {
                            return;
                        }
                        if (num2 > rows.Length)
                        {
                            num2 = rows.Length;
                        }
                        outGroup.ItemsOffsetNext   = num2;
                        outGroup.RetrievedLastItem = (num2 == rows.Length);
                        if (rows != null && rows.Length > 0)
                        {
                            this.perfItemsFoundCount += rows.Length;
                            for (int i = itemsOffset; i < num2; i++)
                            {
                                object[] array   = rows[i];
                                StoreId  storeId = (StoreId)array[0];
                                this.GetAttachmentsFromItemByStoreId(idAndSession.Session, storeId, list);
                                outGroup.ItemsProcessed++;
                            }
                        }
                        outGroup.AttachmentsReturned = this.perfAttachmentCount;
                        this.perfBindItemsDuration   = ExDateTime.Now - now;
                        outGroup.AttachmentGroup     = list.ToArray();
                    }
                    outGroup.Path = new string[]
                    {
                        GetModernAttachmentsCommand.Utilities.FormatParam("folderId.DisplayName", folderIdDisplayName),
                        GetModernAttachmentsCommand.Utilities.FormatParam("folder.ClassName", folder.ClassName),
                        GetModernAttachmentsCommand.Utilities.FormatParam("folder.DisplayName", folder.DisplayName),
                        GetModernAttachmentsCommand.Utilities.FormatParam("perfItemsFoundCount", this.perfItemsFoundCount),
                        GetModernAttachmentsCommand.Utilities.FormatParam("perfItemsBoundCount", this.perfItemsBoundCount),
                        GetModernAttachmentsCommand.Utilities.FormatParam("perfAttachmentsEnumeratedCount", this.perfAttachmentsEnumeratedCount),
                        GetModernAttachmentsCommand.Utilities.FormatParam("perfAttachmentCount", this.perfAttachmentCount),
                        GetModernAttachmentsCommand.Utilities.FormatParam("perfFindItemsDuration", this.perfFindItemsDuration),
                        GetModernAttachmentsCommand.Utilities.FormatParam("perfBindItemsDuration", this.perfBindItemsDuration)
                    };
                }
            }
            catch (Exception exception)
            {
                StructuredErrors structuredErrors = this.ConvertToNestedErrors(exception);
                structuredErrors.Path = new string[]
                {
                    "GetAttachmentsFromEwsFolder",
                    GetModernAttachmentsCommand.Utilities.FormatParam("folderId.DisplayName", folderIdDisplayName),
                    GetModernAttachmentsCommand.Utilities.FormatParam("folderId.DisplayName", folderIdDisplayName),
                    GetModernAttachmentsCommand.Utilities.FormatParam("perfItemsFoundCount", this.perfItemsFoundCount),
                    GetModernAttachmentsCommand.Utilities.FormatParam("perfItemsBoundCount", this.perfItemsBoundCount),
                    GetModernAttachmentsCommand.Utilities.FormatParam("perfAttachmentsEnumeratedCount", this.perfAttachmentsEnumeratedCount),
                    GetModernAttachmentsCommand.Utilities.FormatParam("perfAttachmentCount", this.perfAttachmentCount),
                    GetModernAttachmentsCommand.Utilities.FormatParam("perfFindItemsDuration", this.perfFindItemsDuration),
                    GetModernAttachmentsCommand.Utilities.FormatParam("perfBindItemsDuration", this.perfBindItemsDuration)
                };
                this.response.AddError(structuredErrors);
            }
        }
Beispiel #6
0
 public CreateContactFolder(CallContext callContext, BaseFolderId parentFolderId, string displayName, int priority) : base(callContext)
 {
     this.parentFolderId = parentFolderId;
     this.displayName    = displayName;
     this.priority       = priority;
 }