Exemplo n.º 1
0
 // Token: 0x060002E6 RID: 742 RVA: 0x000120AC File Offset: 0x000102AC
 internal ItemUpdater(MailboxDataForFolders mailboxData, ProvisionedFolder provisionedFolder, ElcSubAssistant elcAssistant)
 {
     this.mailboxData       = mailboxData;
     this.provisionedFolder = provisionedFolder;
     this.elcAssistant      = elcAssistant;
     this.mailboxOwner      = mailboxData.MailboxSession.MailboxOwner;
 }
Exemplo n.º 2
0
 // Token: 0x0600032E RID: 814 RVA: 0x0001405C File Offset: 0x0001225C
 internal FolderExpirationExecutor(ProvisionedFolder provisionedFolder, MailboxDataForFolders mailboxData, ElcFolderSubAssistant elcAssistant) : base(mailboxData, elcAssistant, FolderExpirationExecutor.Tracer)
 {
     this.provisionedFolder    = provisionedFolder;
     this.expiryTimeList       = new List <ItemData>(2000);
     this.moveDateStampingList = new List <ItemData>(2000);
     this.moveLists            = new Dictionary <Guid, MovePolicyItems>();
     ExpirationExecutor.TracerPfd.TracePfd <int, FolderExpirationExecutor>((long)this.GetHashCode(), "PFD IWE {0} {1} called", 30999, this);
 }
        // Token: 0x0600037D RID: 893 RVA: 0x000186D0 File Offset: 0x000168D0
        private Dictionary <Guid, string> GetPolicyTags(MailboxDataForFolders mailboxData)
        {
            Dictionary <Guid, string> dictionary = new Dictionary <Guid, string>();

            this.AddToPolicyTagCollection(mailboxData, dictionary, RetentionActionType.PermanentlyDelete);
            this.AddToPolicyTagCollection(mailboxData, dictionary, RetentionActionType.MoveToArchive);
            this.AddToPolicyTagCollection(mailboxData, dictionary, RetentionActionType.DeleteAndAllowRecovery);
            return(dictionary);
        }
        // Token: 0x0600037E RID: 894 RVA: 0x00018700 File Offset: 0x00016900
        private void AddToPolicyTagCollection(MailboxDataForFolders mailboxData, Dictionary <Guid, string> allPolicyTagsRet, RetentionActionType retention)
        {
            Dictionary <Guid, PolicyTag> policyTagList = mailboxData.MailboxSession.GetPolicyTagList(retention);

            if (policyTagList != null)
            {
                foreach (KeyValuePair <Guid, PolicyTag> keyValuePair in policyTagList)
                {
                    if (!allPolicyTagsRet.ContainsKey(keyValuePair.Key))
                    {
                        allPolicyTagsRet.Add(keyValuePair.Key, keyValuePair.Value.Name);
                    }
                }
                policyTagList.Clear();
            }
        }
Exemplo n.º 5
0
        // Token: 0x060002D9 RID: 729 RVA: 0x00011D2C File Offset: 0x0000FF2C
        private ProvisionedFolder GetDestinationFolder(ContentSetting policy, MailboxDataForFolders mailboxData)
        {
            if (policy.RetentionAction != RetentionActionType.MoveToFolder || policy.MoveToDestinationFolder == null)
            {
                if (policy.RetentionAction == RetentionActionType.MoveToDeletedItems)
                {
                    StoreObjectId defaultFolderId = this.mailboxSession.GetDefaultFolderId(DefaultFolderType.DeletedItems);
                    if (defaultFolderId != null)
                    {
                        return(this.GetFolderFromId(defaultFolderId));
                    }
                }
                return(null);
            }
            Guid folderGuidFromObjectGuid = mailboxData.GetFolderGuidFromObjectGuid(policy.MoveToDestinationFolder);

            if (folderGuidFromObjectGuid == Guid.Empty)
            {
                return(null);
            }
            return(this.GetFolderFromId(folderGuidFromObjectGuid));
        }
Exemplo n.º 6
0
        // Token: 0x060002D8 RID: 728 RVA: 0x00011C28 File Offset: 0x0000FE28
        private FolderProcessor.CircularPolicyType LookForCircularPolicies(ProvisionedFolder provisionedFolder, ContentSetting policy, string itemClass, MailboxDataForFolders mailboxData)
        {
            if (provisionedFolder.ValidatedPolicies.Contains(itemClass))
            {
                return(FolderProcessor.CircularPolicyType.NoCycle);
            }
            List <FolderProcessor.FolderPolicy> list = new List <FolderProcessor.FolderPolicy>();

            list.Add(new FolderProcessor.FolderPolicy(provisionedFolder, policy));
            while (policy.RetentionAction == RetentionActionType.MoveToFolder || policy.RetentionAction == RetentionActionType.MoveToDeletedItems)
            {
                ProvisionedFolder destinationFolder = this.GetDestinationFolder(policy, mailboxData);
                if (destinationFolder == null)
                {
                    FolderProcessor.Tracer.TraceDebug <object, string>((long)this.GetHashCode(), "{0}: The destination folder of Policy '{1}' is not in the list of provisioned folders. Quit.", TraceContext.Get(), policy.Name);
                }
                else
                {
                    FolderProcessor.CircularPolicyType circularPolicyType = this.CheckDestinationFolder(list, destinationFolder, policy);
                    if (circularPolicyType != FolderProcessor.CircularPolicyType.NoCycle)
                    {
                        return(circularPolicyType);
                    }
                    ContentSetting destinationPolicy = this.GetDestinationPolicy(destinationFolder, itemClass);
                    if (destinationPolicy != null)
                    {
                        list.Add(new FolderProcessor.FolderPolicy(destinationFolder, destinationPolicy));
                        policy = destinationPolicy;
                        continue;
                    }
                    FolderProcessor.Tracer.TraceDebug <object, string, string>((long)this.GetHashCode(), "{0}: The destination folder '{1}' of Policy '{2}' does not have a valid policy on it. Quit.", TraceContext.Get(), destinationFolder.FullFolderPath, policy.Name);
                }
IL_E8:
                provisionedFolder.ValidatedPolicies.Add(itemClass);
                return(FolderProcessor.CircularPolicyType.NoCycle);
            }
            FolderProcessor.Tracer.TraceDebug <object, string>((long)this.GetHashCode(), "{0}: The Policy '{1}' is not a MoveTo policy. Quit", TraceContext.Get(), policy.Name);
            goto IL_E8;
        }
Exemplo n.º 7
0
 // Token: 0x060002D1 RID: 721 RVA: 0x00011000 File Offset: 0x0000F200
 internal bool IsPolicyValid(ProvisionedFolder provisionedFolder, ContentSetting policy, string itemClass, MailboxDataForFolders mailboxData)
 {
     if (!ElcPolicySettings.ArePolicyPropertiesValid(policy, TraceContext.Get(), this.mailboxSession.MailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString()))
     {
         return(false);
     }
     FolderProcessor.CircularPolicyType circularPolicyType = this.LookForCircularPolicies(provisionedFolder, policy, itemClass, mailboxData);
     if (circularPolicyType == FolderProcessor.CircularPolicyType.BadCycle)
     {
         throw new SkipException(Strings.descCycleInPolicies(this.mailboxSession.MailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString(), policy.Name));
     }
     return(true);
 }
 // Token: 0x060002EB RID: 747 RVA: 0x000124C1 File Offset: 0x000106C1
 internal MovePolicyItems(ContentSetting elcPolicy, ProvisionedFolder provisionedFolder, MailboxDataForFolders mailboxData, string itemClass)
 {
     this.elcPolicy    = elcPolicy;
     this.sourceFolder = provisionedFolder;
     this.mailboxData  = mailboxData;
     this.InitItemList(itemClass);
 }
 // Token: 0x060002FE RID: 766 RVA: 0x00012B9A File Offset: 0x00010D9A
 internal AutoCopyEnforcer(MailboxDataForFolders mailboxData, DatabaseInfo databaseInfo, ElcFolderSubAssistant assistant) : base(mailboxData, assistant)
 {
     this.databaseInfo = databaseInfo;
 }
Exemplo n.º 10
0
 // Token: 0x060002F8 RID: 760 RVA: 0x00012B74 File Offset: 0x00010D74
 internal EnforcerBase(MailboxDataForFolders mailboxData, ElcFolderSubAssistant elcAssistant)
 {
     this.mailboxData  = mailboxData;
     this.elcAssistant = elcAssistant;
 }
 // Token: 0x06000379 RID: 889 RVA: 0x00017DF8 File Offset: 0x00015FF8
 internal ExpirationEnforcer(MailboxDataForFolders mailboxData, ElcFolderSubAssistant assistant) : base(mailboxData, assistant)
 {
     this.allPolicyTags = this.GetPolicyTags(mailboxData);
 }