// Token: 0x060000FF RID: 255 RVA: 0x00005C38 File Offset: 0x00003E38 protected override void HandleEventInternal(MapiEvent mapiEvent, MailboxSession session, StoreObject item, List <KeyValuePair <string, object> > customDataToLog) { CachedState cachedState = AssistantsService.CachedObjectsList.GetCachedState(mapiEvent.MailboxGuid); MailboxData mailboxData = (MailboxData)cachedState.State[3]; if (mailboxData == null) { mailboxData = new MailboxData(session); Interlocked.Exchange(ref cachedState.State[3], mailboxData); } if (BodyTagProcessor.IsEventInteresting(mapiEvent)) { BodyTagProcessor.HandleEventInternal(session, item); return; } if (ActionsProcessor.IsEventInteresting(mapiEvent)) { ActionsProcessor.HandleEventInternal(mapiEvent, session, item, mailboxData); Interlocked.Exchange(ref cachedState.State[3], mailboxData); return; } if (SentItemsProcessor.IsEventInteresting(mapiEvent, mailboxData)) { SentItemsProcessor.HandleEventInternal(mapiEvent, session, item, mailboxData); Interlocked.Exchange(ref cachedState.State[3], mailboxData); return; } if (LicensingProcessor.IsEventInteresting(mapiEvent, mailboxData)) { LicensingProcessor.HandleEventInternal(session, item); return; } if (InferenceProcessor.IsEventInteresting(mapiEvent, mailboxData)) { InferenceProcessor.HandleEventInternal(mapiEvent, session, item, mailboxData, customDataToLog); } }
// Token: 0x06000133 RID: 307 RVA: 0x000079F8 File Offset: 0x00005BF8 internal static void HandleEventInternal(MapiEvent mapiEvent, MailboxSession session, StoreObject storeItem, MailboxData mailboxData, List <KeyValuePair <string, object> > customDataToLog) { InferenceProcessor.Log(customDataToLog, "InferenceDiagnostics", mapiEvent.ToString()); Exception ex = null; try { ArgumentValidator.ThrowIfNull("session", session); if (storeItem == null) { InferenceProcessor.Log(customDataToLog, "InferenceDiagnostics", "NullStoreItem"); } else { MessageItem messageItem = storeItem as MessageItem; if (messageItem == null) { InferenceProcessor.Log(customDataToLog, "InferenceDiagnostics", "StoreItemIsNotMessageItem"); } else { if (InferenceProcessor.IsInferenceProcessingNeeded(mapiEvent)) { InferenceProcessor.Log(customDataToLog, "InferenceDiagnostics", "InferenceProcessingNeeded"); if (!messageItem.GetValueOrDefault <bool>(ItemSchema.InferenceProcessingNeeded, false)) { return; } try { messageItem.DeleteProperties(new PropertyDefinition[] { ItemSchema.InferenceProcessingNeeded }); InferenceProcessingActions valueOrDefault = (InferenceProcessingActions)messageItem.GetValueOrDefault <long>(ItemSchema.InferenceProcessingActions, 0L); messageItem.DeleteProperties(new PropertyDefinition[] { ItemSchema.InferenceProcessingActions }); if (valueOrDefault.HasFlag(InferenceProcessingActions.ProcessImplicitMarkAsNotClutter)) { InferenceProcessor.HandleImplicitMarkAsNotClutter(mapiEvent, session, messageItem, customDataToLog); goto IL_1C6; } throw new ArgumentException("No actionable flag is set on InferenceProcessingActions, but InferenceProcessingNeeded is true"); } finally { if (messageItem.IsDirty) { messageItem.Save(SaveMode.ResolveConflicts); } } } if (InferenceProcessor.IsOutlookActivityProcessingNeeded(mapiEvent, mailboxData)) { InferenceProcessor.Log(customDataToLog, "InferenceDiagnostics", "ProcessOutlookActivity"); if (session.IsDefaultFolderType(messageItem.ParentId) != DefaultFolderType.Inbox) { InferenceProcessor.Log(customDataToLog, "InferenceDiagnostics", "ActivityItemNotInExpectedFolder"); return; } try { int num = OutlookActivityProcessor.Process(session, messageItem); InferenceProcessor.Log(customDataToLog, "NumOfOutlookActivityItemsProcessed", num); } catch (OutlookActivityParsingException value) { InferenceProcessor.Log(customDataToLog, "OutlookActivityParsingException", value); } using (Folder folder = Folder.Bind(session, DefaultFolderType.Inbox)) { folder.DeleteObjects(DeleteItemFlags.HardDelete, new StoreId[] { messageItem.Id }); goto IL_1C6; } } throw new ArgumentException("We should not get an event that's not interested by InferenceProcessor" + mapiEvent.ToString()); IL_1C6 :; } } } catch (Exception ex2) { ex = ex2; } finally { if (ex != null) { InferenceProcessor.Log(customDataToLog, "Exception", ex.ToString()); } InferenceProcessor.Log(customDataToLog, "InferenceDiagnostics", (ex == null) ? "InvokeSucceeded" : "InvokeFailed"); } }
// Token: 0x060000FE RID: 254 RVA: 0x00005BE0 File Offset: 0x00003DE0 public bool IsEventInteresting(MapiEvent mapiEvent) { CachedState cachedState = AssistantsService.CachedObjectsList.GetCachedState(mapiEvent.MailboxGuid); MailboxData mailboxData = (MailboxData)cachedState.State[3]; return(BodyTagProcessor.IsEventInteresting(mapiEvent) || ActionsProcessor.IsEventInteresting(mapiEvent) || SentItemsProcessor.IsEventInteresting(mapiEvent, mailboxData) || LicensingProcessor.IsEventInteresting(mapiEvent, mailboxData) || InferenceProcessor.IsEventInteresting(mapiEvent, mailboxData)); }
// Token: 0x06000132 RID: 306 RVA: 0x000079B8 File Offset: 0x00005BB8 internal static bool IsEventInteresting(MapiEvent mapiEvent, MailboxData mailboxData) { return(VariantConfiguration.GetSnapshot(MachineSettingsContext.Local, null, null).Inference.InferenceEventBasedAssistant.Enabled&& (InferenceProcessor.IsInferenceProcessingNeeded(mapiEvent) || InferenceProcessor.IsOutlookActivityProcessingNeeded(mapiEvent, mailboxData))); }