// 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: 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))); }