private void Initialize(UserContext userContext, MailboxSession session, StoreObjectId rootFolderId, string[] folderTypes, QueryFilter queryFilter, int maxFolders, bool isListDeletedFolders, bool isDeepTraversal, bool isListRootFolder, FolderList parentFolderList, PropertyDefinition sortProperty, PropertyDefinition[] extendedProperties) { this.userContext = userContext; this.maxFolders = maxFolders; this.isListDeletedFolders = isListDeletedFolders; this.sortProperty = sortProperty; this.mailboxSession = session; this.rootFolderId = rootFolderId; this.isDeepTraversal = isDeepTraversal; this.queryFilter = queryFilter; this.folderTypes = folderTypes; this.isListRootFolder = isListRootFolder; if (parentFolderList != null) { this.queryProperties = parentFolderList.queryProperties; this.propertyIndexes = parentFolderList.propertyIndexes; this.parentFolderList = parentFolderList; } else if (extendedProperties != null) { if (extendedProperties.Equals(FolderList.FolderTreeQueryProperties)) { this.queryProperties = FolderList.FolderTreeQueryProperties; this.propertyIndexes = FolderList.FolderTreePropertyIndexes; } else if (extendedProperties.Equals(FolderList.FolderPropertiesInBasic)) { this.queryProperties = FolderList.FolderPropertiesInBasic; this.propertyIndexes = FolderList.FolderPropertyToIndexInBasic; } else { FolderList.CombinePropertyList(extendedProperties, out this.queryProperties, out this.propertyIndexes); } } this.Load(); }
public FolderList(UserContext userContext, MailboxSession mailboxSession, StoreObjectId rootFolderId, int maxFolders, bool isListDeletedFolders, bool isDeepTraversal, bool isListRootFolder, FolderList parentFolderList) { this.Initialize(userContext, mailboxSession, rootFolderId, null, null, maxFolders, isListDeletedFolders, isDeepTraversal, isListRootFolder, parentFolderList, null, null); }