Esempio n. 1
0
        // Token: 0x0600067D RID: 1661 RVA: 0x00031744 File Offset: 0x0002F944
        protected override bool QueryIsEnabled()
        {
            if (!Datacenter.IsMultiTenancyEnabled())
            {
                EHAQuotaWarningEnforcer.Tracer.TraceDebug <EHAQuotaWarningEnforcer>((long)this.GetHashCode(), "{0}: All the checks below make sense only for DC and not for enterprise.", this);
                return(false);
            }
            if (!base.MailboxDataForTags.ElcUserInformation.ProcessEhaMigratedMessages)
            {
                EHAQuotaWarningEnforcer.Tracer.TraceDebug <EHAQuotaWarningEnforcer>((long)this.GetHashCode(), "{0}: Organization's ProcessEhaMigratedMessages settings is set to false. This mailbox will not be processed for migration messages", this);
                return(false);
            }
            TransportConfigContainer tenantTransportConfig = EHAQuotaWarningEnforcer.GetTenantTransportConfig(base.MailboxDataForTags.ElcUserTagInformation.ADUser.OrganizationId, this);

            if (tenantTransportConfig != null && !tenantTransportConfig.LegacyArchiveJournalingEnabled)
            {
                EHAQuotaWarningEnforcer.Tracer.TraceDebug <EHAQuotaWarningEnforcer>((long)this.GetHashCode(), "{0}: EHA Migration is already complete for this tenant, Skip Quota enforcer check.", this);
                return(false);
            }
            if (base.MailboxDataForTags.MailboxSession.MailboxOwner.MailboxInfo.IsArchive)
            {
                EHAQuotaWarningEnforcer.Tracer.TraceDebug <EHAQuotaWarningEnforcer>((long)this.GetHashCode(), "{0}: This is archive mailbox. This mailbox will not be processed for migration messages", this);
                return(false);
            }
            if (!this.IsMailboxInteresting())
            {
                EHAQuotaWarningEnforcer.Tracer.TraceDebug <EHAQuotaWarningEnforcer>((long)this.GetHashCode(), "{0}: This is not one of the eha mailboxes : journal ndr or confirmation mailbox. This mailbox will be skipped.", this);
                return(false);
            }
            return(true);
        }
Esempio n. 2
0
        // Token: 0x06000682 RID: 1666 RVA: 0x00031AA8 File Offset: 0x0002FCA8
        private static TransportConfigContainer GetTenantTransportConfig(OrganizationId orgId, EHAQuotaWarningEnforcer enforcer)
        {
            ADSessionSettings          sessionSettings = ADSessionSettings.FromOrganizationIdWithoutRbacScopesServiceOnly(orgId);
            IConfigurationSession      tenantOrTopologyConfigurationSession = DirectorySessionFactory.Default.GetTenantOrTopologyConfigurationSession(ConsistencyMode.IgnoreInvalid, sessionSettings, 349, "GetTenantTransportConfig", "f:\\15.00.1497\\sources\\dev\\MailboxAssistants\\src\\assistants\\elc\\SysCleanupAssistant\\EHAQuotaWarningEnforcer.cs");
            PerTenantTransportSettings perTenantTransportSettings           = new PerTenantTransportSettings(orgId);

            return(perTenantTransportSettings.ReadTransportConfig(tenantOrTopologyConfigurationSession));
        }