Exemple #1
0
 public MailboxFolder(MailboxFolder folder)
 {
     this.Folder        = folder;
     base.ID            = folder.FolderStoreObjectId;
     base.Name          = folder.Name;
     this.IsInboxFolder = (this.Folder.DefaultFolderType == DefaultFolderType.Inbox);
     base.CanNewSubNode = (this.Folder.DefaultFolderType != DefaultFolderType.ElcRoot && this.Folder.ExtendedFolderFlags != ExtendedFolderFlags.ExclusivelyBound && this.Folder.ExtendedFolderFlags != ExtendedFolderFlags.RemoteHierarchy);
 }
Exemple #2
0
        public static Identity ToIdentity(this MailboxFolder entry)
        {
            string name = entry.Name;

            if (entry.DefaultFolderType == DefaultFolderType.Root)
            {
                Microsoft.Exchange.Data.Storage.Management.MailboxFolderId mailboxFolderId = (Microsoft.Exchange.Data.Storage.Management.MailboxFolderId)entry.Identity;
                if (ADObjectId.Equals(mailboxFolderId.MailboxOwnerId, EacRbacPrincipal.Instance.ExecutingUserId))
                {
                    name = EacRbacPrincipal.Instance.Name;
                }
                else
                {
                    name = mailboxFolderId.MailboxOwnerId.Name;
                }
            }
            return(new Identity(entry.FolderStoreObjectId, name));
        }
Exemple #3
0
        public int CompareTo(object obj)
        {
            MailboxFolder mailboxFolder = obj as MailboxFolder;
            int           num           = 5;
            int           num2          = 5;

            if (MailboxFolder.FoldersToShowFirst.ContainsKey(this.Folder.DefaultFolderType))
            {
                MailboxFolder.FoldersToShowFirst.TryGetValue(this.Folder.DefaultFolderType, out num);
            }
            if (MailboxFolder.FoldersToShowFirst.ContainsKey(mailboxFolder.Folder.DefaultFolderType))
            {
                MailboxFolder.FoldersToShowFirst.TryGetValue(mailboxFolder.Folder.DefaultFolderType, out num2);
            }
            if (num == num2)
            {
                return(this.Folder.Name.CompareTo(mailboxFolder.Folder.Name));
            }
            if (num < num2)
            {
                return(-1);
            }
            return(1);
        }