示例#1
0
 // Token: 0x06001370 RID: 4976 RVA: 0x00050614 File Offset: 0x0004E814
 internal UserPhotoEnumerator(IMailboxSession session, StoreObjectId folder, string photoItemClass, IXSOFactory xsoFactory, ITracer upstreamTracer)
 {
     if (session == null)
     {
         throw new ArgumentNullException("session");
     }
     if (folder == null)
     {
         throw new ArgumentNullException("folder");
     }
     if (string.IsNullOrEmpty(photoItemClass))
     {
         throw new ArgumentNullException("photoItemClass");
     }
     if (xsoFactory == null)
     {
         throw new ArgumentNullException("xsoFactory");
     }
     if (upstreamTracer == null)
     {
         throw new ArgumentNullException("upstreamTracer");
     }
     this.tracer         = ExTraceGlobals.UserPhotosTracer.Compose(upstreamTracer);
     this.session        = session;
     this.folder         = folder;
     this.photoItemClass = photoItemClass;
     this.filter         = this.GetFilterForItemClass(photoItemClass);
     this.xsoFactory     = xsoFactory;
 }
示例#2
0
        // Token: 0x06001427 RID: 5159 RVA: 0x00074578 File Offset: 0x00072778
        internal bool ShouldProcessUnseenEmailEvent(IMailboxSession session, IXSOFactory xsoFactory, IMapiEvent mapiEvent)
        {
            if (!this.IsEmailSubscriptionEnabled(mapiEvent.MailboxGuid))
            {
                return(false);
            }
            if (PushNotificationMapiEventAnalyzer.IsIpmFolderContentChangeEvent(mapiEvent))
            {
                return(true);
            }
            CachedState cachedState = AssistantsService.CachedObjectsList.GetCachedState(session.MailboxGuid);

            using (new PushNotificationDataHandler.CachedStateReadLock(cachedState))
            {
                if (!(cachedState.State[9] is MailboxData))
                {
                    using (new PushNotificationDataHandler.CachedStateUpgradeWriteLock(cachedState))
                    {
                        if (!(cachedState.State[9] is MailboxData))
                        {
                            MailboxData mailboxData = new MailboxData(session.MailboxGuid);
                            if (!mailboxData.LoadData(session, xsoFactory))
                            {
                                return(false);
                            }
                            cachedState.State[9] = mailboxData;
                            return(ArrayComparer <byte> .Comparer.Equals(mapiEvent.ParentEntryId, mailboxData.InboxFolderId));
                        }
                    }
                }
            }
            return(false);
        }
 // Token: 0x06001659 RID: 5721 RVA: 0x0007DEAC File Offset: 0x0007C0AC
 protected override void OnObjectModified(IMapiEvent mapiEvent, IMailboxSession itemStore, IStoreObject item, List <KeyValuePair <string, object> > customDataToLog)
 {
     ExTraceGlobals.GeneralTracer.TraceDebug((long)this.GetHashCode(), "ToDoModernReminderProcessor.OnObjectModified");
     if (item != null)
     {
         ExTraceGlobals.GeneralTracer.TraceDebug((long)this.GetHashCode(), "ToDoModernReminderProcessor.OnObjectModified - item exists");
         IToDoItem toDoItem = (IToDoItem)item;
         Reminders <ModernReminder> reminders = toDoItem.ModernReminders;
         if (reminders != null)
         {
             ExTraceGlobals.GeneralTracer.TraceDebug((long)this.GetHashCode(), "ToDoModernReminderProcessor.OnObjectModified - Reminders exist -> schedule reminder");
             int numRemindersScheduled = 0;
             customDataToLog.Add(new KeyValuePair <string, object>("ToDoRemSchd.Latency", base.ExecuteAndMeasure(delegate
             {
                 numRemindersScheduled = this.ReminderMessageManager.ScheduleReminder(itemStore, toDoItem, reminders);
             }).ToString()));
             customDataToLog.Add(new KeyValuePair <string, object>("ToDoRemSchd.Count", numRemindersScheduled));
             return;
         }
         ExTraceGlobals.GeneralTracer.TraceDebug((long)this.GetHashCode(), "ToDoModernReminderProcessor.OnObjectModified - Modern reminders don't exist -> clearing the reminder");
         customDataToLog.Add(new KeyValuePair <string, object>("ToDoRemClr.Latency", base.ExecuteAndMeasure(delegate
         {
             this.ReminderMessageManager.ClearReminder(itemStore, toDoItem);
         }).ToString()));
     }
 }
 internal ConversationState(IMailboxSession session, IConversationTree conversationTree, ICollection <IConversationTreeNode> nodesToExclude)
 {
     this.conversationTree = conversationTree;
     this.session          = session;
     this.treeNode         = new MiniStateTreeNode(conversationTree, new Func <StoreObjectId, long>(this.StoreIdToIdHash), nodesToExclude);
     this.InitializeSerializedState();
 }
示例#5
0
 // Token: 0x06001662 RID: 5730 RVA: 0x0007E04C File Offset: 0x0007C24C
 public ReminderTimeCalculatorContextFactory(IMailboxSession session)
 {
     ArgumentValidator.ThrowIfNull("session", session);
     this.session        = session;
     this.hours          = this.LoadWorkingHours();
     this.firstDayOfWeek = this.LoadFirstDayOfWeek();
 }
示例#6
0
        private StoreId GetMessageStoreId(string internetId, IMailboxSession session)
        {
            if (string.IsNullOrEmpty(internetId))
            {
                return(null);
            }
            IStorePropertyBag[] array = AllItemsFolderHelper.FindItemsFromInternetId((MailboxSession)session, internetId, new StorePropertyDefinition[]
            {
                CoreItemSchema.Id
            });
            if (array == null || array.Length == 0)
            {
                return(null);
            }
            IStorePropertyBag storePropertyBag = array[0];

            if (storePropertyBag == null)
            {
                return(null);
            }
            VersionedId valueOrDefault = storePropertyBag.GetValueOrDefault <VersionedId>(CoreItemSchema.Id, null);

            if (valueOrDefault == null)
            {
                return(null);
            }
            return(valueOrDefault.ObjectId);
        }
        public static void SaveMailboxSyncStatus(IMailboxSession session, ExDateTime?nextReplicationTime, MailboxAssociationProcessingFlags?mailboxAssociationProcessingFlags)
        {
            ArgumentValidator.ThrowIfNull("session", session);
            bool flag = false;

            if (nextReplicationTime != null)
            {
                LocalAssociationStore.Tracer.TraceDebug <ExDateTime?>(0L, "LocalAssociationStore::SaveMailboxSyncStatus. Setting NextReplicationTime = {0}", nextReplicationTime);
                session.Mailbox[MailboxSchema.MailboxAssociationNextReplicationTime] = nextReplicationTime;
                flag = true;
            }
            if (mailboxAssociationProcessingFlags != null)
            {
                LocalAssociationStore.Tracer.TraceDebug <MailboxAssociationProcessingFlags?>(0L, "LocalAssociationStore::SaveMailboxSyncStatus. Setting ProcessingFlags = {0}", mailboxAssociationProcessingFlags);
                session.Mailbox[MailboxSchema.MailboxAssociationProcessingFlags] = mailboxAssociationProcessingFlags;
                flag = true;
            }
            if (flag)
            {
                LocalAssociationStore.Tracer.TraceDebug(0L, "LocalAssociationStore::SaveMailboxSyncStatus. Saving and reloading mailbox table.");
                session.Mailbox.Save();
                session.Mailbox.Load();
                return;
            }
            LocalAssociationStore.Tracer.TraceDebug(0L, "LocalAssociationStore::SaveMailboxSyncStatus. No changes were detected.");
        }
示例#8
0
 protected ConversationFactory(IMailboxSession session, IConversationTreeFactory treeFactory, IConversationMembersQuery membersQuery, IConversationDataExtractorFactory dataExtractorFactory)
 {
     this.session              = session;
     this.membersQuery         = membersQuery;
     this.treeFactory          = treeFactory;
     this.dataExtractorFactory = dataExtractorFactory;
 }
示例#9
0
        // Token: 0x06001667 RID: 5735 RVA: 0x0007E350 File Offset: 0x0007C550
        public IReminderTimeCalculator Create(IMailboxSession session)
        {
            IReminderTimeCalculatorContextFactory reminderTimeCalculatorContextFactory = new ReminderTimeCalculatorContextFactory(session);
            ReminderTimeCalculatorContext         reminderTimeCalculatorContext        = reminderTimeCalculatorContextFactory.Create();

            return(new WorkingHoursAwareReminderTimeCalculator(reminderTimeCalculatorContext, reminderTimeCalculatorContext.WorkingHours));
        }
示例#10
0
 // Token: 0x060015DB RID: 5595 RVA: 0x0007B110 File Offset: 0x00079310
 protected override void OnObjectModified(IMapiEvent mapiEvent, IMailboxSession itemStore, IStoreObject item, List <KeyValuePair <string, object> > customDataToLog)
 {
     ExTraceGlobals.GeneralTracer.TraceDebug((long)this.GetHashCode(), "EventTimeBasedInboxReminderProcessor.OnObjectModified");
     if (item != null)
     {
         ExTraceGlobals.GeneralTracer.TraceDebug((long)this.GetHashCode(), "EventTimeBasedInboxReminderProcessor.OnObjectModified - item exists");
         if (!(item is ICalendarItem))
         {
             return;
         }
         ICalendarItem calendarItem = (ICalendarItem)item;
         if (calendarItem.GlobalObjectId == null)
         {
             base.Log.LogEntry(itemStore, "EventTimeBasedInboxReminder.OnObjectModified - Calendar item missing GOID", new object[0]);
             return;
         }
         base.Log.LogEntry(itemStore, "EventTimeBasedInboxReminder.OnObjectModified - Start Time:{0}, End Time:{1}", new object[]
         {
             calendarItem.StartTime.UniversalTime,
             calendarItem.EndTime.UniversalTime
         });
         this.DeleteReminderMessages(itemStore, calendarItem, customDataToLog);
         this.CreateReminderMessages(itemStore, calendarItem, customDataToLog);
     }
 }
 public ConversationAggregatorFactory(IMailboxSession session, IMailboxOwner mailboxOwner, IXSOFactory xsoFactory, ConversationIndexTrackingEx indexTrackingEx)
 {
     this.mailboxOwner    = mailboxOwner;
     this.session         = session;
     this.xsoFactory      = xsoFactory;
     this.indexTrackingEx = indexTrackingEx;
 }
        public static bool TryInstantiateAggregatorForSave(IMailboxSession session, CoreItemOperation saveOperation, ICoreItem item, ConversationIndexTrackingEx indexTrackingEx, out IConversationAggregator aggregator)
        {
            MailboxOwnerFactory           mailboxOwnerFactory           = new MailboxOwnerFactory(session);
            ConversationAggregatorFactory conversationAggregatorFactory = new ConversationAggregatorFactory(session, mailboxOwnerFactory.Create(), XSOFactory.Default, indexTrackingEx);

            return(conversationAggregatorFactory.TryInstantiateAggregatorForSave(saveOperation, item, out aggregator));
        }
示例#13
0
        private static IPushNotificationSubscriptionItem Create(IMailboxSession session, IXSOFactory xsoFactory, StoreId locationFolderId, string subscriptionId, PushNotificationServerSubscription subscription)
        {
            IPushNotificationSubscriptionItem pushNotificationSubscriptionItem = null;

            try
            {
                pushNotificationSubscriptionItem                = xsoFactory.CreatePushNotificationSubscriptionItem(session, locationFolderId);
                subscription.LastSubscriptionUpdate             = (DateTime)pushNotificationSubscriptionItem.LastUpdateTimeUTC;
                pushNotificationSubscriptionItem.SubscriptionId = subscriptionId;
                pushNotificationSubscriptionItem.SerializedNotificationSubscription = subscription.ToJson();
                if (ExTraceGlobals.StorageNotificationSubscriptionTracer.IsTraceEnabled(TraceType.DebugTrace))
                {
                    ExTraceGlobals.StorageNotificationSubscriptionTracer.TraceDebug <string, ExDateTime, string>((long)subscription.GetHashCode(), "PushNotificationSubscriptionItem.Create: Created SubscriptionItem on store, Id:{0}, RefTm:{1}, Json:{2}", pushNotificationSubscriptionItem.SubscriptionId, pushNotificationSubscriptionItem.LastUpdateTimeUTC, pushNotificationSubscriptionItem.SerializedNotificationSubscription);
                }
                ConflictResolutionResult conflictResolutionResult = pushNotificationSubscriptionItem.Save(SaveMode.FailOnAnyConflict);
                if (conflictResolutionResult.SaveStatus == SaveResult.IrresolvableConflict)
                {
                    ExTraceGlobals.StorageNotificationSubscriptionTracer.TraceError <string>((long)pushNotificationSubscriptionItem.GetHashCode(), "PushNotificationSubscriptionItem.Create: Save failed due to conflicts for subscription {0}.", subscriptionId);
                    throw new SaveConflictException(ServerStrings.ExSaveFailedBecauseOfConflicts(pushNotificationSubscriptionItem.SubscriptionId));
                }
                pushNotificationSubscriptionItem.Load(SubscriptionItemEnumeratorBase.PushNotificationSubscriptionItemProperties);
            }
            catch
            {
                if (pushNotificationSubscriptionItem != null)
                {
                    pushNotificationSubscriptionItem.Dispose();
                }
                throw;
            }
            return(pushNotificationSubscriptionItem);
        }
示例#14
0
 public ItemPartLoader(IXSOFactory xsofactory, IMailboxSession mailboxSession, bool canOpenIrmMessage, PropertyDefinition[] queriedPropertyDefinitions)
 {
     this.canOpenIrmMessage          = canOpenIrmMessage;
     this.queriedPropertyDefinitions = queriedPropertyDefinitions;
     this.xsoFactory     = xsofactory;
     this.mailboxSession = mailboxSession;
 }
示例#15
0
        public static void UpdateFolderScope(IXSOFactory xsoFactory, IMailboxSession mailboxSession, ISearchFolder searchFolder, StoreObjectId[] folderScope)
        {
            ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
            ArgumentValidator.ThrowIfNull("mailboxSession", mailboxSession);
            ArgumentValidator.ThrowIfNull("searchFolder", searchFolder);
            ArgumentValidator.ThrowIfNull("folderScope", folderScope);
            SearchFolderCriteria searchFolderCriteria;

            try
            {
                searchFolderCriteria = searchFolder.GetSearchCriteria();
            }
            catch (ObjectNotInitializedException)
            {
                searchFolderCriteria = null;
            }
            if (searchFolderCriteria != null && ContactsSearchFolderCriteria.MatchFolderScope(searchFolderCriteria.FolderScope, folderScope))
            {
                return;
            }
            SearchFolderCriteria searchFolderCriteria2 = ContactsSearchFolderCriteria.CreateSearchCriteria(folderScope);

            ContactsSearchFolderCriteria.Tracer.TraceDebug <SearchFolderCriteria, SearchFolderCriteria>((long)searchFolder.GetHashCode(), "Updating MyContactsFolder Search Criteria since it is different from the current one. Current:{0}, New:{1}.", searchFolderCriteria, searchFolderCriteria2);
            ContactsSearchFolderCriteria.ApplyContinuousSearchFolderCriteria(xsoFactory, mailboxSession, searchFolder, searchFolderCriteria2);
            ContactsSearchFolderCriteria.WaitForSearchFolderPopulation(xsoFactory, mailboxSession, searchFolder);
        }
        public static string GetSerializedNotificationSubscription(IMailboxSession mailboxSession, IStorePropertyBag propertyBag, IXSOFactory xsoFactory)
        {
            string valueOrDefault = propertyBag.GetValueOrDefault <string>(PushNotificationSubscriptionItemSchema.SerializedNotificationSubscription, null);

            if (string.IsNullOrWhiteSpace(valueOrDefault))
            {
                ExTraceGlobals.StorageNotificationSubscriptionTracer.TraceError(0L, "PushNotificationStorage.GetSerializedNotificationSubscription: A subscription with an empty serialized value was returned by the Enumerator.");
                throw new CannotResolvePropertyException(PushNotificationSubscriptionItemSchema.SerializedNotificationSubscription.Name);
            }
            if (valueOrDefault.Length < 255)
            {
                return(valueOrDefault);
            }
            ExTraceGlobals.StorageNotificationSubscriptionTracer.TraceDebug(0L, "PushNotificationStorage.GetSerializedNotificationSubscription: We need to bind to the item in order to obtain the full serialized notification subscription.");
            VersionedId valueOrDefault2 = propertyBag.GetValueOrDefault <VersionedId>(ItemSchema.Id, null);
            string      result;

            using (IPushNotificationSubscriptionItem pushNotificationSubscriptionItem = xsoFactory.BindToPushNotificationSubscriptionItem(mailboxSession, valueOrDefault2, new PropertyDefinition[]
            {
                PushNotificationSubscriptionItemSchema.SerializedNotificationSubscription
            }))
            {
                string serializedNotificationSubscription = pushNotificationSubscriptionItem.SerializedNotificationSubscription;
                if (string.IsNullOrWhiteSpace(serializedNotificationSubscription))
                {
                    ExTraceGlobals.StorageNotificationSubscriptionTracer.TraceError <VersionedId, string>(0L, "PushNotificationStorage.GetFullSerializedNotificationSubscription: Unable to obtain the full SerializedNotificationSubscription from {0}, partial value: {1}", valueOrDefault2, valueOrDefault);
                    throw new CannotResolvePropertyException(PushNotificationSubscriptionItemSchema.SerializedNotificationSubscription.Name);
                }
                result = serializedNotificationSubscription;
            }
            return(result);
        }
示例#17
0
 internal static void Save(TopicHashCache cache, IXSOFactory xsoFactory, IMailboxSession session)
 {
     try
     {
         using (IFolder folder = xsoFactory.BindToFolder(session, DefaultFolderType.Inbox, new PropertyDefinition[]
         {
             FolderSchema.ConversationTopicHashEntries
         }))
         {
             using (MemoryStream memoryStream = new MemoryStream(cache.EstimatedSize))
             {
                 cache.Serialize(memoryStream);
                 folder[FolderSchema.ConversationTopicHashEntries] = memoryStream.ToArray();
                 folder.Save();
             }
         }
     }
     catch (IOException arg)
     {
         ExTraceGlobals.StorageTracer.TraceDebug <IOException>(0L, "TopicHashCache::Save. Encountered the following exception. Exception = {0}.", arg);
     }
     catch (StorageTransientException arg2)
     {
         ExTraceGlobals.StorageTracer.TraceDebug <StorageTransientException>(0L, "TopicHashCache::Load. Encountered the following exception. Exception = {0}.", arg2);
     }
     catch (StoragePermanentException arg3)
     {
         ExTraceGlobals.StorageTracer.TraceDebug <StoragePermanentException>(0L, "TopicHashCache::Load. Encountered the following exception. Exception = {0}.", arg3);
     }
 }
        private List <RelevantPerson> GetRelevantContacts(IMailboxSession mailboxSession, IXSOFactory xsoFactory)
        {
            ContactsEnumerator <IStorePropertyBag> contactsEnumerator = ContactsEnumerator <IStorePropertyBag> .CreateContactsOnlyEnumerator(mailboxSession, DefaultFolderType.RecipientCache, PeopleIKnowService.RecipientCacheSortColumns, PeopleIKnowService.RecipientCacheContactProperties, (IStorePropertyBag propertyBag) => propertyBag, xsoFactory);

            List <RelevantPerson> list = new List <RelevantPerson>(50);

            foreach (IStorePropertyBag storePropertyBag in contactsEnumerator)
            {
                string valueOrDefault = storePropertyBag.GetValueOrDefault <string>(ContactSchema.Email1EmailAddress, null);
                if (string.IsNullOrEmpty(valueOrDefault))
                {
                    this.tracer.TraceDebug((long)this.GetHashCode(), "PeopleIKnowService.GetRelevantContacts: Skipped null or empty emailAddress");
                }
                else
                {
                    int            valueOrDefault2 = storePropertyBag.GetValueOrDefault <int>(ContactSchema.RelevanceScore, int.MaxValue);
                    RelevantPerson relevantPerson  = new RelevantPerson();
                    relevantPerson.EmailAddress   = valueOrDefault;
                    relevantPerson.RelevanceScore = valueOrDefault2;
                    list.Add(relevantPerson);
                    this.tracer.TraceDebug <string, int>((long)this.GetHashCode(), "PeopleIKnowService.GetRelevantContacts: Added person whose emailAddress is {0} and relevanceScore is {1}", relevantPerson.EmailAddress, relevantPerson.RelevanceScore);
                    if (list.Count == 200)
                    {
                        this.tracer.TraceDebug((long)this.GetHashCode(), "PeopleIKnowService.GetRelevantContacts: Reached max count of people that can be added.");
                        break;
                    }
                }
            }
            return(list);
        }
 public AggregationBySmsItemClassProcessor(IXSOFactory xsoFactory, IMailboxSession session, ConversationIndexTrackingEx indexTrackingEx)
 {
     Util.ThrowOnNullArgument(session, "session");
     this.session         = session;
     this.indexTrackingEx = indexTrackingEx;
     this.xsoFactory      = xsoFactory;
 }
示例#20
0
        private void EscalateMessageToYammer(IMailboxSession mailboxSession, IExtensibleLogger logger, IGroupEscalateItemPerformanceTracker performanceTracker, string yammerEscalateAddress, bool hasEscalatedUser, StoreObjectId draftsFolderId, IMessageItem escalatedMessage)
        {
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            performanceTracker.EscalateToYammer = true;
            GroupEscalation.Tracer.TraceDebug((long)this.GetHashCode(), "GroupEscalation.EscalateItem: Escalating message to yammer group: " + yammerEscalateAddress);
            if (hasEscalatedUser)
            {
                try
                {
                    using (IMessageItem messageItem = this.CreateEscalationMessage(mailboxSession, draftsFolderId, escalatedMessage))
                    {
                        this.SendEscalateMessageToYammer(messageItem, yammerEscalateAddress, mailboxSession);
                    }
                    goto IL_7D;
                }
                catch (Exception arg)
                {
                    this.TraceAndLogError(logger, "EscalateItem", string.Format("GroupEscalation.EscalateItem: Escalation to yammer failed. Got exception: {0}", arg));
                    goto IL_7D;
                }
            }
            this.SendEscalateMessageToYammer(escalatedMessage, yammerEscalateAddress, mailboxSession);
IL_7D:
            stopwatch.Stop();
            performanceTracker.SendToYammerMilliseconds = stopwatch.ElapsedMilliseconds;
        }
 public IPushNotificationSubscriptionItem CreateOrUpdateSubscriptionItem(IMailboxSession mailboxSession, string subscriptionId, PushNotificationServerSubscription subscription)
 {
     ArgumentValidator.ThrowIfNull("mailboxSession", mailboxSession);
     ArgumentValidator.ThrowIfNullOrEmpty("subscriptionId", subscriptionId);
     ArgumentValidator.ThrowIfNull("subscription", subscription);
     return(PushNotificationSubscriptionItem.CreateOrUpdateSubscription(mailboxSession, this.xsoFactory, this.folder, subscriptionId, subscription));
 }
 // Token: 0x060013AF RID: 5039 RVA: 0x00073030 File Offset: 0x00071230
 public bool LoadData(IMailboxSession itemStore, IXSOFactory factory)
 {
     if (this.inboxFolderId == null)
     {
         StoreObjectId defaultFolderId = itemStore.GetDefaultFolderId(DefaultFolderType.Inbox);
         if (defaultFolderId != null)
         {
             this.inboxFolderId = defaultFolderId.ProviderLevelItemId;
             using (IFolder folder = factory.BindToFolder(itemStore, defaultFolderId))
             {
                 this.InboxItemCount   = (long)folder.ItemCount;
                 this.InboxUnreadCount = (long)folder.GetValueOrDefault <int>(FolderSchema.UnreadCount, 1);
                 if (this.InboxUnreadCount == 0L)
                 {
                     this.InboxUnreadCount = 1L;
                     ExTraceGlobals.PushNotificationAssistantTracer.TraceError <Guid, object>((long)this.GetHashCode(), "MailboxData.LoadData('{0}'): {1} - The UnreadCount coming from the folder is = 0", itemStore.MailboxGuid, TraceContext.Get());
                 }
                 return(true);
             }
         }
         Globals.Logger.LogEvent(InfoWorkerEventLogConstants.Tuple_FailedToResolveInboxFolderId, itemStore.MdbGuid.ToString(), new object[]
         {
             itemStore.MdbGuid,
             itemStore.MailboxGuid
         });
         ExTraceGlobals.PushNotificationAssistantTracer.TraceWarning((long)this.GetHashCode(), "MailboxData.LoadData: {0} - Load Data: Inbox folder is null", new object[]
         {
             TraceContext.Get()
         });
         return(false);
     }
     return(true);
 }
示例#23
0
 public EscalationGetter(GroupMailboxLocator group, IMailboxSession groupSession)
 {
     ArgumentValidator.ThrowIfNull("group", group);
     ArgumentValidator.ThrowIfNull("groupSession", groupSession);
     this.group        = group;
     this.groupSession = groupSession;
 }
 // Token: 0x06001341 RID: 4929 RVA: 0x0004F67C File Offset: 0x0004D87C
 public PreviewPhotoUploadHandler(IMailboxSession session, IMailboxPhotoReader reader, IMailboxPhotoWriter writer, IPhotoEditor editor, ITracer upstreamTracer)
 {
     if (session == null)
     {
         throw new ArgumentNullException("session");
     }
     if (reader == null)
     {
         throw new ArgumentNullException("reader");
     }
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     if (editor == null)
     {
         throw new ArgumentNullException("editor");
     }
     if (upstreamTracer == null)
     {
         throw new ArgumentNullException("upstreamTracer");
     }
     this.tracer  = ExTraceGlobals.UserPhotosTracer.Compose(upstreamTracer);
     this.session = session;
     this.reader  = reader;
     this.writer  = writer;
     this.editor  = editor;
 }
 public void Publish(IMailboxSession session)
 {
     ArgumentValidator.ThrowIfNull("session", session);
     try
     {
         IDictionary <string, PeopleIKnowMetadata> systemFavorites = this.GetSystemFavorites(session);
         if (systemFavorites.Count > 0)
         {
             PeopleIKnowEmailAddressCollection peopleIKnowEmailAddressCollection = PeopleIKnowEmailAddressCollection.CreateFromStringCollection(systemFavorites, this.tracer, this.traceId, 1);
             byte[] data = peopleIKnowEmailAddressCollection.Data;
             PeopleIKnowEmailAddressCollection peopleIKnowEmailAddressCollection2 = PeopleIKnowEmailAddressCollection.CreateFromStringCollection(systemFavorites, this.tracer, this.traceId, 2);
             byte[] data2 = peopleIKnowEmailAddressCollection2.Data;
             using (IFolder folder = this.xsoFactory.BindToFolder(session, DefaultFolderType.Inbox, PeopleIKnowEmailAddressCollectionFolderProperty.PeopleIKnowEmailAddressCollectionPropertyArray))
             {
                 folder[FolderSchema.PeopleIKnowEmailAddressCollection] = data;
                 folder[FolderSchema.PeopleIKnowEmailAddressRelevanceScoreCollection] = data2;
                 folder.Save();
                 goto IL_DA;
             }
         }
         using (IFolder folder2 = this.xsoFactory.BindToFolder(session, DefaultFolderType.Inbox, PeopleIKnowEmailAddressCollectionFolderProperty.PeopleIKnowEmailAddressCollectionPropertyArray))
         {
             folder2.Delete(FolderSchema.PeopleIKnowEmailAddressCollection);
             folder2.Delete(FolderSchema.PeopleIKnowEmailAddressRelevanceScoreCollection);
             folder2.Save();
         }
         IL_DA :;
     }
     catch (ObjectNotFoundException arg)
     {
         this.tracer.TraceDebug <IMailboxSession, ObjectNotFoundException>((long)this.GetHashCode(), "People I Know email addresses container has not been initialized or has been deleted for mailbox '{0}'.  Exception: {1}", session, arg);
     }
 }
 internal OscSyncLockLocator(IMailboxSession session, IXSOFactory xsoFactory)
 {
     Util.ThrowOnNullArgument(session, "session");
     Util.ThrowOnNullArgument(xsoFactory, "xsoFactory");
     this.session    = session;
     this.xsoFactory = xsoFactory;
 }
示例#27
0
 private static int GetLcidFromMailboxSession(IMailboxSession mailboxSession)
 {
     if (mailboxSession != null && mailboxSession.PreferedCulture != null)
     {
         return(mailboxSession.PreferedCulture.LCID);
     }
     return(0);
 }
 public GroupEscalateItemPerformanceTracker(IMailboxSession mailboxSession) : base(mailboxSession)
 {
     this.OriginalMessageSender = string.Empty;
     this.OriginalMessageSenderRecipientType = string.Empty;
     this.OriginalMessageClass      = string.Empty;
     this.OriginalMessageId         = string.Empty;
     this.OriginalInternetMessageId = string.Empty;
 }
示例#29
0
 public static IActivityLogger Create(IMailboxSession mailboxSession)
 {
     if (!ActivityLogger.IsLoggingEnabled)
     {
         return(null);
     }
     return(new ActivityLogger(mailboxSession));
 }
示例#30
0
 public int ReadThumbprint(IMailboxSession session, bool preview, bool forceReloadThumbprint)
 {
     if (session == null)
     {
         throw new ArgumentNullException("session");
     }
     return(this.ReadThumbprintInternal(session, preview, forceReloadThumbprint));
 }