// Token: 0x06000678 RID: 1656 RVA: 0x0003165C File Offset: 0x0002F85C protected override void StopPerfCounterCollect(long timeElapsed) { ELCPerfmon.TotalExpiredDumpsterItems.IncrementBy(0L); StatisticsLogEntry statisticsLogEntry = base.MailboxDataForTags.StatisticsLogEntry; statisticsLogEntry.NumberOfItemsDeletedByCalendarLogExpirationEnforcer = statisticsLogEntry.NumberOfItemsDeletedByCalendarLogExpirationEnforcer; base.MailboxDataForTags.StatisticsLogEntry.CalendarLogExpirationEnforcerProcessingTime = timeElapsed; }
// Token: 0x06000683 RID: 1667 RVA: 0x00031AE8 File Offset: 0x0002FCE8 private void LogEhaMessageCount(StoreId folderId, MailboxSession session) { using (Folder folder = Folder.Bind(session, folderId, new PropertyDefinition[] { FolderSchema.EhaMigrationMessageCount })) { object obj = folder.TryGetProperty(FolderSchema.EhaMigrationMessageCount); if (obj != null && obj is long) { base.MailboxDataForTags.StatisticsLogEntry.EhaMigrationMessageCount += (long)obj; EHAQuotaWarningEnforcer.Tracer.TraceDebug <EHAQuotaWarningEnforcer, string, object>((long)this.GetHashCode(), "{0}: Total eha messages migrated so far {1} : {2}", this, session.DisplayName, obj); } else { StatisticsLogEntry statisticsLogEntry = base.MailboxDataForTags.StatisticsLogEntry; statisticsLogEntry.EhaMigrationMessageCount = statisticsLogEntry.EhaMigrationMessageCount; EHAQuotaWarningEnforcer.Tracer.TraceDebug <EHAQuotaWarningEnforcer, string>((long)this.GetHashCode(), "{0}: Property EhaMigrationMessageCount not found on mailbox folder {1}", this, session.DisplayName); } } }
// Token: 0x0600051B RID: 1307 RVA: 0x00026915 File Offset: 0x00024B15 public RemoteArchiveProcessor(MailboxSession session, StatisticsLogEntry statisticsLogEntry) : this(session) { this.statisticsLogEntry = statisticsLogEntry; }
// Token: 0x0600054D RID: 1357 RVA: 0x00028B46 File Offset: 0x00026D46 public CloudArchiveProcessor(MailboxSession mailboxSession, ADUser user, StatisticsLogEntry statisticsLogEntry, bool isTestMode) : base(mailboxSession, user, statisticsLogEntry, true, isTestMode) { }
// Token: 0x060004F7 RID: 1271 RVA: 0x00025A68 File Offset: 0x00023C68 public static IArchiveProcessor Create(ElcGlobals.ArchiveLocation archiveLocation, MailboxSession mailboxSession, ADUser adUser, StatisticsLogEntry statisticsLogEntry, bool isTestMode) { if (adUser.IsInactiveMailbox) { return(null); } bool flag = archiveLocation == ElcGlobals.ArchiveLocation.SameServer; if (flag) { if (ArchiveProcessorFactory.UseEwsForSameServerDiffDbArchive) { return(new CrossServerArchiveProcessor(mailboxSession, adUser, statisticsLogEntry, isTestMode)); } return(new LocalArchiveProcessor(mailboxSession, statisticsLogEntry)); } else if (archiveLocation == ElcGlobals.ArchiveLocation.RemoteArchive || mailboxSession.MailboxOwner.GetArchiveMailbox().IsRemote) { if (isTestMode) { ArchiveProcessorFactory.useXTCMoveToArchive = null; } if (ArchiveProcessorFactory.UseXtcMoveToArchive) { return(new LocalArchiveProcessor(mailboxSession, statisticsLogEntry)); } return(new CloudArchiveProcessor(mailboxSession, adUser, statisticsLogEntry, isTestMode)); } else { if (!ElcGlobals.Configuration.GetConfig <bool>("DisableElcRemoteArchive") && ArchiveProcessorFactory.IsElcRemoteArchiveFeatureEnabled(adUser)) { return(new CrossServerArchiveProcessor(mailboxSession, adUser, statisticsLogEntry, isTestMode)); } return(new RemoteArchiveProcessor(mailboxSession, statisticsLogEntry)); } }
// 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."); }
// Token: 0x060001C7 RID: 455 RVA: 0x0000C2B4 File Offset: 0x0000A4B4 protected void AddToReport(RetentionActionType policy, object[] itemProperties, PropertyIndexHolder propertyIndexHolder, Dictionary <Guid, string> allPolicyTags) { try { if (this.isReportEnabled) { object propertyObject = this.GetPropertyObject(itemProperties[propertyIndexHolder.ConversationTopic]); object propertyObject2 = this.GetPropertyObject(itemProperties[propertyIndexHolder.MessageSenderDisplayName]); object propertyObject3 = this.GetPropertyObject(itemProperties[propertyIndexHolder.ParentDisplayName]); object propertyObject4 = this.GetPropertyObject(itemProperties[propertyIndexHolder.ReceivedTimeIndex]); object propertyObject5 = this.GetPropertyObject(itemProperties[propertyIndexHolder.LastModifiedTime]); Guid key = (itemProperties[propertyIndexHolder.PolicyTagIndex] is PropertyError) ? Guid.Empty : new Guid((byte[])itemProperties[propertyIndexHolder.PolicyTagIndex]); Guid key2 = (itemProperties[propertyIndexHolder.ArchiveTagIndex] is PropertyError) ? Guid.Empty : new Guid((byte[])itemProperties[propertyIndexHolder.ArchiveTagIndex]); bool flag = (!(itemProperties[propertyIndexHolder.MessageToMe] is PropertyError) && (bool)itemProperties[propertyIndexHolder.MessageToMe]) || (!(itemProperties[propertyIndexHolder.MessageCcMe] is PropertyError) && (bool)itemProperties[propertyIndexHolder.MessageCcMe]); object obj = key.Equals(Guid.Empty) ? Strings.ElcEmailDefaultTag : (allPolicyTags.ContainsKey(key) ? allPolicyTags[key] : Strings.ElcEmailUnknownTag); object obj2 = key2.Equals(Guid.Empty) ? Strings.ElcEmailDefaultTag : (allPolicyTags.ContainsKey(key2) ? allPolicyTags[key2] : Strings.ElcEmailUnknownTag); object item = null; object item2 = null; if (policy.Equals(RetentionActionType.MoveToArchive)) { item = obj2; item2 = obj; } else { item = obj; item2 = obj2; } if (!this.ELCReport.ContainsKey(policy)) { this.ELCReport.Add(policy, new List <List <object> >()); } if (this.ELCReport[policy].Count < ElcGlobals.ReportItemLimit) { foreach (List <object> list in this.ELCReport[policy]) { if (list[0].Equals(itemProperties[propertyIndexHolder.ConversationId])) { if (((ExDateTime)propertyObject4).CompareTo(list[4]) < 0) { list[2] = propertyObject2; list[3] = propertyObject3; list[6] = propertyObject4; list[7] = propertyObject5; list[8] = (int)list[8] + 1; } return; } } List <object> list2 = new List <object>(9); list2.Add(itemProperties[propertyIndexHolder.ConversationId]); list2.Add(propertyObject); list2.Add(propertyObject2); list2.Add(propertyObject3); list2.Add(item); list2.Add(item2); list2.Add(propertyObject4); list2.Add(propertyObject5); list2.Add(1); if (flag) { this.ELCReport[policy].Insert(0, list2); this.separationIndices[policy] = this.separationIndices[policy] + 1; } else { this.ELCReport[policy].Add(list2); } } else { foreach (List <object> list3 in this.ELCReport[policy]) { if (list3[0].Equals(itemProperties[propertyIndexHolder.ConversationId])) { if (((ExDateTime)itemProperties[propertyIndexHolder.ReceivedTimeIndex]).CompareTo(list3[6]) < 0) { list3[2] = propertyObject2; list3[3] = propertyObject3; list3[6] = propertyObject4; list3[7] = propertyObject5; list3[8] = (int)list3[8] + 1; } return; } } if (this.separationIndices[policy] < ElcGlobals.ReportItemLimit) { if (flag) { List <object> list4 = new List <object>(9); list4.Add(itemProperties[propertyIndexHolder.ConversationId]); list4.Add(propertyObject); list4.Add(propertyObject2); list4.Add(propertyObject3); list4.Add(item); list4.Add(item2); list4.Add(propertyObject4); list4.Add(propertyObject5); list4.Add(1); this.ELCReport[policy][this.separationIndices[policy]] = list4; this.separationIndices[policy] = this.separationIndices[policy] + 1; this.elcReportOverflow = true; } else { this.elcReportOverflow = true; } } else { this.elcReportOverflow = true; } } } } catch (IndexOutOfRangeException ex) { this.tracer.TraceError <ExpirationExecutor>((long)this.GetHashCode(), "{0}: Didn't receive a parameter for an item that's being reported: " + ex.Message, this); StatisticsLogEntry statisticsLogEntry = this.MailboxData.StatisticsLogEntry; statisticsLogEntry.ExceptionType += ex.GetType(); this.MailboxData.StatisticsLogEntry.AddExceptionToLog(ex); } finally { if (this.ELCReport.ContainsKey(policy) && this.ELCReport[policy].Count == 0) { this.ELCReport.Remove(policy); } } }
// Token: 0x0600014B RID: 331 RVA: 0x000088D8 File Offset: 0x00006AD8 internal List <InPlaceHoldConfiguration> GetInPlaceHoldConfigurationForMailbox(MailboxSession mailboxSession, IList <string> inPlaceHoldIdsOnMailbox, int maxQueryLengthLimit, StatisticsLogEntry logEntry) { this.TraceInformation("GetInPlaceHoldConfigurationForMailbox", "Before LoadCache: " + mailboxSession.MailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString()); this.TraceInformation(this.GetCacheDataAsStringForTracing()); List <InPlaceHoldConfiguration> result = null; if (this.TryLoadCache(mailboxSession.MailboxOwner, this.orgsToRefresh, this.cacheLock, logEntry)) { result = this.GetHoldPoliciesForMailboxFromCache(mailboxSession, inPlaceHoldIdsOnMailbox, maxQueryLengthLimit); } this.TraceInformation("GetInPlaceHoldConfigurationForMailbox", "After LoadCache: " + mailboxSession.MailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString()); this.TraceInformation(this.GetCacheDataAsStringForTracing()); return(result); }
// Token: 0x06000157 RID: 343 RVA: 0x00009004 File Offset: 0x00007204 private bool TryLoadCache(IExchangePrincipal mailboxOwner, Dictionary <OrganizationId, bool> orgsToRefresh, object lockObj, StatisticsLogEntry logEntry) { bool flag = false; try { DiscoveryHoldQueryCache.Tracer.TraceDebug((long)this.GetHashCode(), "{0}: {1} : Before first check - if discovery hold cache needs loading. OrgId: {2}. Mailbox: {3}", new object[] { this, "DiscoveryHoldQueryCache", mailboxOwner.MailboxInfo.OrganizationId, mailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString() }); if (this.NeedToLoadCache(mailboxOwner, orgsToRefresh)) { DiscoveryHoldQueryCache.Tracer.TraceDebug((long)this.GetHashCode(), "{0}: {1} : Before lock. OrgId: {2}. Mailbox: {3}", new object[] { this, "DiscoveryHoldQueryCache", mailboxOwner.MailboxInfo.OrganizationId, mailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString() }); lock (lockObj) { DiscoveryHoldQueryCache.Tracer.TraceDebug((long)this.GetHashCode(), "{0}: {1} : After lock. OrgId: {2}. Mailbox: {3}", new object[] { this, "DiscoveryHoldQueryCache", mailboxOwner.MailboxInfo.OrganizationId, mailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString() }); if (this.NeedToLoadCache(mailboxOwner, orgsToRefresh)) { DiscoveryHoldQueryCache.Tracer.TraceDebug((long)this.GetHashCode(), "{0}: {1} : We've determined that we need to load cache. OrgId: {2}. Mailbox: {3}", new object[] { this, "DiscoveryHoldQueryCache", mailboxOwner.MailboxInfo.OrganizationId, mailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString() }); Dictionary <string, InPlaceHoldConfiguration> value = this.LoadInPlaceHoldConfigurationInOrg(mailboxOwner.MailboxInfo.OrganizationId, logEntry); this.allInPlaceHoldConfiguration[mailboxOwner.MailboxInfo.OrganizationId] = value; DiscoveryHoldQueryCache.Tracer.TraceDebug((long)this.GetHashCode(), "{0}: {1} : Loaded cache from Arbitration mailbox and releasing lock. OrgId: {2}. Mailbox: {3}", new object[] { this, "DiscoveryHoldQueryCache", mailboxOwner.MailboxInfo.OrganizationId, mailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString() }); this.DoPostLoadProcessing(mailboxOwner, orgsToRefresh); DiscoveryHoldQueryCache.Tracer.TraceDebug((long)this.GetHashCode(), "{0}: {1} : Done post load processing. OrgId: {2}. Mailbox: {3}", new object[] { this, "DiscoveryHoldQueryCache", mailboxOwner.MailboxInfo.OrganizationId, mailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString() }); } } } } catch (DataSourceOperationException ex) { this.LogDiscoveryQueryLoadFailure(mailboxOwner.MailboxInfo.OrganizationId.ToString(), InfoWorkerEventLogConstants.Tuple_DiscoverySearchObjectLoadError, ex); flag = true; } return(!flag); }
// Token: 0x06000153 RID: 339 RVA: 0x00008BFC File Offset: 0x00006DFC private Dictionary <string, InPlaceHoldConfiguration> LoadInPlaceHoldConfigurationInOrg(OrganizationId orgId, StatisticsLogEntry logEntry) { this.TraceInformation("Load All hold policy Objects in Organization " + orgId); new List <InPlaceHoldConfiguration>(); DiscoverySearchDataProvider discoverySearchDataProvider = new DiscoverySearchDataProvider(orgId); IEnumerable <MailboxDiscoverySearch> all = discoverySearchDataProvider.GetAll <MailboxDiscoverySearch>(); Dictionary <string, InPlaceHoldConfiguration> dictionary = new Dictionary <string, InPlaceHoldConfiguration>(); foreach (MailboxDiscoverySearch mailboxDiscoverySearch in all) { if (!dictionary.ContainsKey(mailboxDiscoverySearch.InPlaceHoldIdentity)) { InPlaceHoldConfiguration value = new InPlaceHoldConfiguration(mailboxDiscoverySearch); dictionary.Add(mailboxDiscoverySearch.InPlaceHoldIdentity, value); } } bool flag = false; try { flag = discoverySearchDataProvider.Mailbox.GetConfiguration().MailboxAssistants.UnifiedPolicyHold.Enabled; } catch (CannotDetermineExchangeModeException) { this.TraceInformation("Failed to load unifiedHold flight information"); } if (flag) { try { PolicyConfigProvider policyConfigProvider = PolicyConfigProviderManager <ExPolicyConfigProviderManager> .Instance.CreateForProcessingEngine(orgId); if (policyConfigProvider != null) { ExComplianceServiceProvider exComplianceServiceProvider = new ExComplianceServiceProvider(); IEnumerable <PolicyDefinitionConfig> enumerable = policyConfigProvider.FindByName <PolicyDefinitionConfig>("*"); if (enumerable != null && exComplianceServiceProvider != null) { foreach (PolicyDefinitionConfig policyDefinitionConfig in enumerable) { string holdId = ExMailboxComplianceItemContainer.GetHoldId(policyDefinitionConfig.Identity); if (policyDefinitionConfig.Mode == Mode.Enforce && policyDefinitionConfig.Scenario == PolicyScenario.Hold) { IEnumerable <PolicyRuleConfig> enumerable2 = policyConfigProvider.FindByPolicyDefinitionConfigId <PolicyRuleConfig>(policyDefinitionConfig.Identity); if (enumerable2 == null) { continue; } using (IEnumerator <PolicyRuleConfig> enumerator3 = enumerable2.GetEnumerator()) { while (enumerator3.MoveNext()) { PolicyRuleConfig rule = enumerator3.Current; if (dictionary.ContainsKey(holdId)) { this.TraceInformation(string.Format("Hold Id contained twice. HoldId: {0}", holdId)); break; } InPlaceHoldConfiguration value2 = new InPlaceHoldConfiguration(policyDefinitionConfig, rule, exComplianceServiceProvider.GetRuleParser(), DiscoveryHoldQueryCache.Tracer); dictionary.Add(holdId, value2); } continue; } } this.TraceInformation(string.Format("Hold not loaded. HoldId: {0} Mode: {1} Scenario: {2}", holdId, policyDefinitionConfig.Mode.ToString(), policyDefinitionConfig.Scenario.ToString())); } } } } catch (Exception ex) { DiscoveryHoldQueryCache.Tracer.TraceDebug <Exception>((long)this.GetHashCode(), "Failed to load hold queries from PolicyConfigProvider. Exception: {0}", ex); if (logEntry != null) { logEntry.FailedToLoadUnifiedPolicies = ex.Message; } } } return(dictionary); }
// Token: 0x0600054F RID: 1359 RVA: 0x00028C6A File Offset: 0x00026E6A public CrossServerArchiveProcessor(MailboxSession mailboxSession, ADUser user, StatisticsLogEntry statisticsLogEntry, bool isTestMode) : base(mailboxSession, user, statisticsLogEntry, false, isTestMode) { }
// Token: 0x06000507 RID: 1287 RVA: 0x00025D65 File Offset: 0x00023F65 public LocalArchiveProcessor(MailboxSession session, StatisticsLogEntry statisticsLogEntry) { this.primaryMailboxSession = session; this.InitializeArchiveMailboxSession(); this.statisticsLogEntry = statisticsLogEntry; }