// Token: 0x06000B77 RID: 2935 RVA: 0x0004A378 File Offset: 0x00048578
        public static bool?QuickCheckForAutomatedBooking(MapiEvent mapiEvent, CachedState cachedState)
        {
            bool?result = new bool?(false);

            cachedState.LockForRead();
            CalendarConfiguration calendarConfiguration;

            try
            {
                calendarConfiguration = (cachedState.State[0] as CalendarConfiguration);
            }
            finally
            {
                cachedState.ReleaseReaderLock();
            }
            if (calendarConfiguration == null || ResourceCheck.IsEventConfigChange(mapiEvent))
            {
                result = null;
            }
            else
            {
                result = new bool?(calendarConfiguration.AutomateProcessing == CalendarProcessingFlags.AutoAccept);
            }
            return(result);
        }
Exemplo n.º 2
0
        // Token: 0x06000B70 RID: 2928 RVA: 0x0004999C File Offset: 0x00047B9C
        public bool IsEventInteresting(MapiEvent mapiEvent)
        {
            CachedState cachedState = AssistantsService.CachedObjectsList.GetCachedState(mapiEvent.MailboxGuid);
            bool?       flag        = ResourceCheck.QuickCheckForAutomatedBooking(mapiEvent, cachedState);

            if (flag != null && !(flag == true))
            {
                return(false);
            }
            if (mapiEvent.ItemType == ObjectType.MAPI_MESSAGE && (mapiEvent.EventMask & MapiEventTypeFlags.NewMail) != (MapiEventTypeFlags)0)
            {
                ResourceBookingAssistant.Tracer.TraceDebug <object, MapiEvent>((long)this.GetHashCode(), "{0}: this event is interesting because is a new message: {1}", TraceContext.Get(), mapiEvent);
                return(true);
            }
            return(ResourceCheck.IsEventConfigChange(mapiEvent));
        }