// Token: 0x06002FB1 RID: 12209 RVA: 0x001152C8 File Offset: 0x001134C8 private OwaStoreObjectId GetSubFolderIdByName(OwaStoreObjectId parentFolderId, string subFolderName) { OwaStoreObjectId result; using (Folder folder = Utilities.GetFolder <Folder>(base.UserContext, parentFolderId, new PropertyDefinition[0])) { using (QueryResult queryResult = folder.FolderQuery(FolderQueryFlags.None, null, null, new PropertyDefinition[] { FolderSchema.Id })) { ComparisonFilter seekFilter = new ComparisonFilter(ComparisonOperator.Equal, FolderSchema.DisplayName, subFolderName); bool flag = queryResult.SeekToCondition(SeekReference.OriginBeginning, seekFilter); object[][] array = null; if (flag) { array = queryResult.GetRows(1); } if (array == null || array.Length == 0 || array[0].Length == 0) { ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "Can't find any subfolders of the destinationFolder with DisplayName matching the source folder's DisplayName"); throw new OwaEventHandlerException("Can't find any subfolders of the destinationFolder with DisplayName matching the source folder's DisplayName", LocalizedStrings.GetNonEncoded(1073923836)); } StoreObjectId objectId = ((VersionedId)array[0][0]).ObjectId; result = OwaStoreObjectId.CreateFromStoreObjectId(objectId, parentFolderId); } } return(result); }
// 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: 0x06002E1D RID: 11805 RVA: 0x001074AC File Offset: 0x001056AC private OwaStoreObjectId GetLatestFlaggedOrNormalItem() { OwaStoreObjectId owaStoreObjectId = base.GetParameter("id") as OwaStoreObjectId; if (owaStoreObjectId == null || !owaStoreObjectId.IsConversationId) { return(owaStoreObjectId); } MailboxSession mailboxSession = (MailboxSession)owaStoreObjectId.GetSession(base.UserContext); Conversation conversation = Conversation.Load(mailboxSession, owaStoreObjectId.ConversationId, base.UserContext.IsIrmEnabled, new PropertyDefinition[] { ItemSchema.Id, StoreObjectSchema.ParentItemId, ItemSchema.ReceivedTime, ItemSchema.FlagStatus }); conversation.ConversationTree.Sort(ConversationTreeSortOrder.ChronologicalDescending); IList <StoreObjectId> flagedItems = ConversationUtilities.GetFlagedItems(mailboxSession, conversation, owaStoreObjectId.ParentFolderId, new FlagStatus[] { FlagStatus.Flagged }); if (flagedItems.Count > 0) { return(OwaStoreObjectId.CreateFromStoreObjectId(flagedItems[0], owaStoreObjectId)); } StoreObjectId latestMessage = ConversationUtilities.GetLatestMessage(mailboxSession, conversation, owaStoreObjectId.ParentFolderId); if (latestMessage != null) { return(OwaStoreObjectId.CreateFromStoreObjectId(latestMessage, owaStoreObjectId)); } return(null); }
protected override void LoadViewState() { OwaStoreObjectId owaStoreObjectId = OwaStoreObjectId.CreateFromString(Utilities.GetQueryStringParameter(base.Request, "id")); MailboxSession mailboxSession = (MailboxSession)owaStoreObjectId.GetSession(base.UserContext); StoreObjectId defaultFolderId = mailboxSession.GetDefaultFolderId(DefaultFolderType.RecoverableItemsDeletions); if (defaultFolderId == null) { DumpsterFolderHelper.CheckAndCreateFolder(mailboxSession); defaultFolderId = mailboxSession.GetDefaultFolderId(DefaultFolderType.RecoverableItemsDeletions); } OwaStoreObjectId folderId = OwaStoreObjectId.CreateFromStoreObjectId(defaultFolderId, owaStoreObjectId); this.folder = Utilities.GetFolderForContent <Folder>(base.UserContext, folderId, RecoverDeletedItems.folderProperties); this.viewWidth = Utilities.GetFolderProperty <int>(this.folder, ViewStateProperties.ViewWidth, 450); this.viewHeight = Utilities.GetFolderProperty <int>(this.folder, ViewStateProperties.ViewHeight, 250); }
public AttachmentWellInfo(OwaStoreObjectId owaConversationId, AttachmentInfo attachmentInfo, bool isJunkOrPhishing) { this.messageId = OwaStoreObjectId.CreateFromStoreObjectId(attachmentInfo.MessageId, owaConversationId); this.attachmentId = attachmentInfo.AttachmentId; if (isJunkOrPhishing) { this.attachmentLevel = AttachmentPolicy.Level.Block; } else { this.attachmentLevel = AttachmentLevelLookup.GetAttachmentLevel(attachmentInfo, UserContextManager.GetUserContext()); } this.attachmentType = attachmentInfo.AttachmentType; this.fileName = attachmentInfo.FileName; this.displayName = attachmentInfo.DisplayName; this.isInline = attachmentInfo.IsInline; this.attachmentSize = attachmentInfo.Size; this.fileExtension = attachmentInfo.FileExtension; this.attachmentName = AttachmentUtility.CalculateAttachmentName(attachmentInfo.DisplayName, attachmentInfo.FileName); this.mimeType = attachmentInfo.ContentType; }