Example #1
0
 // Token: 0x060005D0 RID: 1488 RVA: 0x0002C098 File Offset: 0x0002A298
 private void ProcessFolderContents()
 {
     DiscoveryHoldEnforcer.Tracer.TraceDebug <DiscoveryHoldEnforcer, string>((long)this.GetHashCode(), "{0}: Start processing discovery holds folder {1}", this, this.discoveryHoldsFolderId.ToHexEntryId());
     try
     {
         StoreId searchFolderId = this.ConstructAndSubmitHoldSearchQuery();
         this.ProcessFolderContents(base.MailboxDataForTags.MailboxSession, searchFolderId);
     }
     catch (StorageTransientException arg)
     {
         DiscoveryHoldEnforcer.Tracer.TraceError <DiscoveryHoldEnforcer, IExchangePrincipal, StorageTransientException>((long)this.GetHashCode(), "{0}: Discovery Holds Enforcer is unable to process mailbox {1} due to a storage transient error. Exception: {2}", this, base.MailboxDataForTags.MailboxSession.MailboxOwner, arg);
         throw;
     }
     catch (StoragePermanentException ex)
     {
         DiscoveryHoldEnforcer.Tracer.TraceError <DiscoveryHoldEnforcer, IExchangePrincipal, StoragePermanentException>((long)this.GetHashCode(), "{0}: Discovery Holds Enforcer is unable to process mailbox {1} due to a storage permanent error. Skipping this mailbox. Exception: {2}", this, base.MailboxDataForTags.MailboxSession.MailboxOwner, ex);
         Globals.Logger.LogEvent(InfoWorkerEventLogConstants.Tuple_DiscoveryHoldPermanentErrorSkipMailbox, null, new object[]
         {
             base.MailboxDataForTags.MailboxSession.MailboxOwner,
             ex.Message
         });
         throw new SkipException(ex);
     }
     catch (DiscoveryHoldSearchException ex2)
     {
         DiscoveryHoldEnforcer.Tracer.TraceError <DiscoveryHoldEnforcer, IExchangePrincipal, DiscoveryHoldSearchException>((long)this.GetHashCode(), "{0}: Discovery Holds Search failed on mailbox {1}. Exception: {2}", this, base.MailboxDataForTags.MailboxSession.MailboxOwner, ex2);
         base.MailboxDataForTags.StatisticsLogEntry.ExceptionType = ((ex2.InnerException != null) ? ex2.InnerException.GetType().ToString() : ex2.GetType().ToString());
         base.MailboxDataForTags.StatisticsLogEntry.AddExceptionToLog(ex2);
         ELCAssistant.PublishMonitoringResult(base.MailboxDataForTags.MailboxSession, ex2, ELCAssistant.NotificationType.Permanent, null);
         base.SysCleanupSubAssistant.ElcAssistantType.PerfCountersWrapper.Increment(ELCPerfmon.NumberOfDiscoveryHoldSearchExceptions, 1L);
     }
 }
Example #2
0
 // Token: 0x06000630 RID: 1584 RVA: 0x0002FA68 File Offset: 0x0002DC68
 private void CheckArchiveWarningQuota(MailboxSession mailboxSession, MailboxData mailboxData)
 {
     if (mailboxSession.MailboxOwner.MailboxInfo.IsArchive)
     {
         mailboxSession.Mailbox.ForceReload(new PropertyDefinition[]
         {
             MailboxSchema.QuotaUsedExtended
         });
         object obj = mailboxSession.Mailbox.TryGetProperty(MailboxSchema.QuotaUsedExtended);
         if (obj is long)
         {
             ulong num = (ulong)((long)obj);
             Unlimited <ByteQuantifiedSize> archiveWarningQuota = mailboxData.ElcUserInformation.ADUser.ArchiveWarningQuota;
             ElcSubAssistant.Tracer.TraceDebug <SysCleanupSubAssistant, ulong, Unlimited <ByteQuantifiedSize> >((long)this.GetHashCode(), "{0}: Archive size is {1} and archive warning quota is {2}", this, num, archiveWarningQuota);
             if (!archiveWarningQuota.IsUnlimited && archiveWarningQuota.Value.ToBytes() < num)
             {
                 ElcSubAssistant.Tracer.TraceDebug <SysCleanupSubAssistant>((long)this.GetHashCode(), "{0}: Archive mailbox is over quota", this);
                 Globals.Logger.LogEvent(InfoWorkerEventLogConstants.Tuple_ArchiveOverWarningQuota, null, new object[]
                 {
                     mailboxSession.MailboxOwner,
                     archiveWarningQuota,
                     num
                 });
                 ELCAssistant.PublishMonitoringResult(mailboxSession, null, ELCAssistant.NotificationType.ArchiveWarningQuota, string.Format("Mailbox: {0} whose archive size: {1} is over ArchiveWarningQuota: {2}.", mailboxSession.MailboxGuid, num, archiveWarningQuota));
                 mailboxData.StatisticsLogEntry.IsArchiveOverWarningQuota = true;
                 return;
             }
         }
         else
         {
             ElcSubAssistant.Tracer.TraceError <SysCleanupSubAssistant>((long)this.GetHashCode(), "{0}: We could not get size of this archive mailbox. Skipping it.", this);
         }
     }
 }
 // Token: 0x060005F1 RID: 1521 RVA: 0x0002D218 File Offset: 0x0002B418
 protected override void InvokeInternal()
 {
     if (this.IsDumpsterOverQuota())
     {
         this.isOverQuota = true;
         DumpsterQuotaEnforcer.Tracer.TraceDebug <DumpsterQuotaEnforcer>((long)this.GetHashCode(), "{0}: This mailbox is over dumpster warning quota. Processing the mailbox.", this);
         ELCAssistant.PublishMonitoringResult(base.MailboxDataForTags.MailboxSession, null, ELCAssistant.NotificationType.DumpsterWarningQuota, string.Format("Mailbox: {0} is over dumpster warning quota.", base.MailboxDataForTags.MailboxSession.MailboxGuid));
         base.InvokeInternal();
         if (base.IsEnabled)
         {
             this.LogDumpsterCleanupEvent();
         }
     }
 }