// Token: 0x06000302 RID: 770 RVA: 0x00012EF0 File Offset: 0x000110F0
 internal override void SetItemQueryFlags(ProvisionedFolder provisionedFolder, ItemFinder itemFinder)
 {
     itemFinder.NeedAutoCopyProps = true;
     if (base.MailboxData.ElcAuditLog.AutocopyLoggingEnabled)
     {
         itemFinder.SetAuditLogFlags(base.MailboxData.ElcAuditLog.SubjectLoggingEnabled);
     }
 }
        // Token: 0x0600037B RID: 891 RVA: 0x00017EC8 File Offset: 0x000160C8
        internal override void SetItemQueryFlags(ProvisionedFolder provisionedFolder, ItemFinder itemFinder)
        {
            int  num  = -1;
            bool flag = false;

            foreach (ElcPolicySettings elcPolicySettings in provisionedFolder.ElcPolicies)
            {
                if (elcPolicySettings.RetentionEnabled)
                {
                    EnhancedTimeSpan?ageLimitForRetention = elcPolicySettings.AgeLimitForRetention;
                    TimeSpan?        timeSpan2;
                    TimeSpan?        timeSpan = timeSpan2 = ((ageLimitForRetention != null) ? new TimeSpan?(ageLimitForRetention.GetValueOrDefault()) : null);
                    double           totalDays;
                    if (timeSpan2 != null && (totalDays = timeSpan.Value.TotalDays) > 0.0)
                    {
                        ExpirationEnforcer.Tracer.TraceDebug <object, string, string>((long)this.GetHashCode(), "{0}: Reading policy. MessageClass {1} in Policy '{2}' has expiration enabled.", TraceContext.Get(), elcPolicySettings.MessageClass, elcPolicySettings.Name);
                        flag = true;
                        if (!itemFinder.NeedMoveDate && (num == -1 || (double)num > totalDays))
                        {
                            num = (int)totalDays;
                        }
                        if (elcPolicySettings.RetentionAction == RetentionActionType.MarkAsPastRetentionLimit)
                        {
                            itemFinder.NeedExpiryTime = true;
                            ExpirationEnforcer.Tracer.TraceDebug <object, string, string>((long)this.GetHashCode(), "{0}: Reading policy. MessageClass {1} in Policy '{2}' has expiration action of tag expiry time.", TraceContext.Get(), elcPolicySettings.MessageClass, elcPolicySettings.Name);
                        }
                        if (elcPolicySettings.TriggerForRetention == RetentionDateType.WhenMoved)
                        {
                            itemFinder.NeedMoveDate = true;
                            num = 0;
                            ExpirationEnforcer.Tracer.TraceDebug <object, string, string>((long)this.GetHashCode(), "{0}: Reading policy. MessageClass {1} in Policy '{2}' expires based on move date.", TraceContext.Get(), elcPolicySettings.MessageClass, elcPolicySettings.Name);
                        }
                    }
                }
            }
            itemFinder.SmallestAgeLimit = num;
            if (provisionedFolder.ContainerClass != null && ObjectClass.IsCalendarFolder(provisionedFolder.ContainerClass) && flag)
            {
                itemFinder.NeedCalendarProps = true;
            }
            if (provisionedFolder.ContainerClass != null && ObjectClass.IsTaskFolder(provisionedFolder.ContainerClass) && flag)
            {
                itemFinder.NeedTaskProps = true;
            }
            if (base.MailboxData.ElcAuditLog.ExpirationLoggingEnabled)
            {
                itemFinder.SetAuditLogFlags(base.MailboxData.ElcAuditLog.SubjectLoggingEnabled);
            }
        }