Esempio n. 1
0
        // Token: 0x06000535 RID: 1333 RVA: 0x00027478 File Offset: 0x00025678
        public RemoteArchiveProcessorBase(MailboxSession mailboxSession, ADUser user, StatisticsLogEntry statisticsLogEntry, bool isCrossPremise, bool isTestMode)
        {
            this.statisticsLogEntry = statisticsLogEntry;
            this.isCrossPremise     = isCrossPremise;
            this.LoadRegistryConfigurations();
            this.primaryMailboxSession = mailboxSession;
            this.currentBatch          = new List <ElcEwsItem>(this.moveToArchiveBatchCountLimit);
            this.currentBatchSize      = 0U;
            if (isTestMode)
            {
                return;
            }
            Uri uri = ElcEwsClientHelper.DiscoverEwsUrl(mailboxSession.MailboxOwner.MailboxInfo);

            if (uri != null)
            {
                this.PrimaryEwsClient = new ElcEwsClient(mailboxSession.MailboxOwner, uri, new ElcEwsCallingContext(user, false), RemoteArchiveProcessorBase.TotalRetryTimeWindowForPrimary, RemoteArchiveProcessorBase.RetryScheduleForPrimary);
            }
            Uri uri2 = isCrossPremise ? ElcEwsClientHelper.DiscoverCloudArchiveEwsUrl(user) : ElcEwsClientHelper.DiscoverEwsUrl(mailboxSession.MailboxOwner.GetArchiveMailbox());

            if (uri2 != null)
            {
                this.ArchiveEwsClient = new ElcEwsClient(mailboxSession.MailboxOwner, uri2, new ElcEwsCallingContext(user, isCrossPremise), RemoteArchiveProcessorBase.TotalRetryTimeWindowForArchive, RemoteArchiveProcessorBase.RetryScheduleForArchive);
                return;
            }
            throw new ElcEwsException(ElcEwsErrorType.ArchiveExchangeWebServiceNotAvailable, "Archive EWS url is unknown.");
        }