// 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"); }
// Token: 0x06000B2A RID: 2858 RVA: 0x00048144 File Offset: 0x00046344 public bool IsEventInteresting(MapiEvent mapiEvent) { if (JunkEmailOptionsAssistant.IsJunkEmailOptionsEvent(mapiEvent)) { JunkEmailOptionsAssistant.Tracer.TraceDebug <MapiEventTypeFlags, MapiEventFlags>((long)this.GetHashCode(), "IsEventInteresting: EventMask {0} EventFlags {1} is interesting", mapiEvent.EventMask, mapiEvent.EventFlags); return(true); } return(false); }