Пример #1
0
 // Token: 0x06000B35 RID: 2869 RVA: 0x00048468 File Offset: 0x00046668
 private void HandleJunkEmailOptionsEvent(MapiEvent mapiEvent, MailboxSession mailboxSession)
 {
     if (mapiEvent == null)
     {
         throw new ArgumentNullException("mapiEvent");
     }
     if (mailboxSession == null)
     {
         throw new ArgumentNullException("mailboxSession");
     }
     if (!JunkEmailOptionsAssistant.IsJunkEmailOptionsEvent(mapiEvent))
     {
         JunkEmailOptionsAssistant.Tracer.TraceDebug((long)this.GetHashCode(), "Skipping uninteresting event.");
         return;
     }
     if (!JunkEmailOptionsAssistant.IsUserMailbox(mailboxSession))
     {
         JunkEmailOptionsAssistant.Tracer.TraceDebug((long)this.GetHashCode(), "Skipping event: non-user mailbox.");
         return;
     }
     if (mailboxSession.MailboxOwner.MailboxInfo.IsArchive)
     {
         JunkEmailOptionsAssistant.Tracer.TraceDebug((long)this.GetHashCode(), "Skipping event: archive mailbox.");
         return;
     }
     if (mailboxSession.MailboxOwner.MailboxInfo.IsAggregated)
     {
         JunkEmailOptionsAssistant.Tracer.TraceDebug((long)this.GetHashCode(), "Skipping event: aggregated mailbox.");
         return;
     }
     if (JunkEmailOptionsAssistant.IsJunkRuleEvent(mapiEvent))
     {
         try
         {
             MailboxTagging.TagForProcessing(mailboxSession);
         }
         catch (StoragePermanentException arg)
         {
             JunkEmailOptionsAssistant.Tracer.TraceError <string, Guid, StoragePermanentException>((long)this.GetHashCode(), "Failed at tagging mailbox {0} (GUID: {1}).  Exception: {2}", mailboxSession.MailboxOwner.MailboxInfo.DisplayName, mailboxSession.MailboxGuid, arg);
         }
         return;
     }
     if (JunkEmailOptionsAssistant.IsMailboxMoveToThisDatabase(mapiEvent))
     {
         MapiExceptionFilter.TryOperation(delegate()
         {
             JunkEmailOptionsAssistant.EnsureJunkEmailRule(mailboxSession, mapiEvent);
         }, (Exception exception, bool transient) => JunkEmailOptionsAssistant.LogFailedToEnsureJunkEmailRule(exception, transient, mailboxSession));
         return;
     }
     if (JunkEmailOptionsAssistant.IsFolderCreationEvent(mapiEvent))
     {
         MapiExceptionFilter.TryOperation(delegate()
         {
             JunkEmailOptionsAssistant.EnsureJunkEmailRule(mailboxSession, mapiEvent);
         }, (Exception exception, bool transient) => JunkEmailOptionsAssistant.LogFailedToEnsureJunkEmailRule(exception, transient, mailboxSession));
         return;
     }
     JunkEmailOptionsAssistant.Tracer.TraceError((long)this.GetHashCode(), "HandleJunkEmailOptionsEvent was called under unexpected conditions");
 }
Пример #2
0
 // Token: 0x06000B2C RID: 2860 RVA: 0x0004817D File Offset: 0x0004637D
 private static bool IsJunkEmailOptionsEvent(MapiEvent mapiEvent)
 {
     return(JunkEmailOptionsAssistant.IsJunkRuleEvent(mapiEvent) || JunkEmailOptionsAssistant.IsMailboxMoveSucceededEvent(mapiEvent) || JunkEmailOptionsAssistant.IsFolderCreationEvent(mapiEvent));
 }