public AggregationBySmsItemClassProcessor(IXSOFactory xsoFactory, IMailboxSession session, ConversationIndexTrackingEx indexTrackingEx)
 {
     Util.ThrowOnNullArgument(session, "session");
     this.session         = session;
     this.indexTrackingEx = indexTrackingEx;
     this.xsoFactory      = xsoFactory;
 }
Esempio n. 2
0
 public AggregationByItemClassReferencesSubjectProcessor(IXSOFactory xsoFactory, IMailboxSession session, PropertyDefinition[] basicSearchPropertyDefinitions, ConversationIndexTrackingEx indexTrackingEx)
 {
     this.session         = session;
     this.indexTrackingEx = indexTrackingEx;
     this.xsoFactory      = xsoFactory;
     this.basicSearchPropertyDefinitions = basicSearchPropertyDefinitions;
 }
Esempio n. 3
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);
        }
Esempio n. 4
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);
        }
 internal OscSyncLockLocator(IMailboxSession session, IXSOFactory xsoFactory)
 {
     Util.ThrowOnNullArgument(session, "session");
     Util.ThrowOnNullArgument(xsoFactory, "xsoFactory");
     this.session    = session;
     this.xsoFactory = xsoFactory;
 }
 // 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);
 }
Esempio n. 7
0
 public ItemPartLoader(IXSOFactory xsofactory, IMailboxSession mailboxSession, bool canOpenIrmMessage, PropertyDefinition[] queriedPropertyDefinitions)
 {
     this.canOpenIrmMessage          = canOpenIrmMessage;
     this.queriedPropertyDefinitions = queriedPropertyDefinitions;
     this.xsoFactory     = xsofactory;
     this.mailboxSession = mailboxSession;
 }
Esempio n. 8
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);
     }
 }
Esempio n. 9
0
 public GroupEscalation(IXSOFactory xsoFactory, IGroupEscalationFlightInfo groupEscalationFlightInfo, IMailboxUrls mailboxUrls)
 {
     Util.ThrowOnNullArgument(groupEscalationFlightInfo, "groupEscalationFlightInfo");
     this.xsoFactory = xsoFactory;
     this.groupEscalationFlightInfo = groupEscalationFlightInfo;
     this.mailboxUrls = mailboxUrls;
 }
 public PeopleIKnowEmailAddressCollectionFolderProperty(IXSOFactory xsoFactory, ITracer tracer, int traceId)
 {
     ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
     ArgumentValidator.ThrowIfNull("tracer", tracer);
     this.xsoFactory = xsoFactory;
     this.tracer     = tracer;
     this.traceId    = traceId;
 }
Esempio n. 11
0
 public PeopleIKnowPublisherFactory(IXSOFactory xsoFactory, ITracer tracer, int traceId)
 {
     ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
     ArgumentValidator.ThrowIfNull("tracer", tracer);
     this.xsoFactory = xsoFactory;
     this.tracer     = tracer;
     this.traceId    = traceId;
 }
 private PushNotificationStorage(IFolder folder, string tenantId, IXSOFactory xsoFactory)
 {
     ArgumentValidator.ThrowIfNull("folder", xsoFactory);
     ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
     this.folder     = folder;
     this.xsoFactory = xsoFactory;
     this.TenantId   = tenantId;
 }
 public RecursiveContactsEnumerator(IMailboxSession session, IXSOFactory xsoFactory, DefaultFolderType folderType, params PropertyDefinition[] properties)
 {
     Util.ThrowOnNullArgument(session, "session");
     Util.ThrowOnNullArgument(properties, "properties");
     this.session    = session;
     this.xsoFactory = xsoFactory;
     this.folderType = folderType;
     this.properties = PropertyDefinitionCollection.Merge <PropertyDefinition>(RecursiveContactsEnumerator.RequiredProperties, properties);
 }
Esempio n. 14
0
 public StoreBuilder(IMailboxSession currentUser, IXSOFactory xsoFactory, IExtensibleLogger logger, string clientInfoString)
 {
     ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
     ArgumentValidator.ThrowIfNull("logger", logger);
     this.currentStoreSession = currentUser;
     this.xsoFactory          = xsoFactory;
     this.logger           = logger;
     this.clientInfoString = clientInfoString;
 }
Esempio n. 15
0
        internal static ContactFolders Load(IXSOFactory xsoFactory, IMailboxSession mailboxSession)
        {
            MyContactFolders myContactFolders = new MyContactFolders(xsoFactory, mailboxSession);
            StoreObjectId    defaultFolderId  = mailboxSession.GetDefaultFolderId(DefaultFolderType.MyContacts);
            StoreObjectId    defaultFolderId2 = mailboxSession.GetDefaultFolderId(DefaultFolderType.QuickContacts);
            StoreObjectId    defaultFolderId3 = mailboxSession.GetDefaultFolderId(DefaultFolderType.Favorites);

            return(new ContactFolders(myContactFolders, defaultFolderId, defaultFolderId2, defaultFolderId3));
        }
Esempio n. 16
0
        public static IUnseenItemsReader Create(IMailboxSession mailboxSession, IXSOFactory xsoFactory)
        {
            ArgumentValidator.ThrowIfNull("mailboxSession", mailboxSession);
            ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
            StoreObjectId defaultFolderId = mailboxSession.GetDefaultFolderId(DefaultFolderType.Inbox);
            IFolder       folder          = xsoFactory.BindToFolder(mailboxSession, defaultFolderId);

            return(new UnseenItemsReader(folder));
        }
Esempio n. 17
0
 public PrivatePhotoHandler(PhotosConfiguration configuration, IXSOFactory xsoFactory, ITracer upstreamTracer)
 {
     ArgumentValidator.ThrowIfNull("configuration", configuration);
     ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
     ArgumentValidator.ThrowIfNull("upstreamTracer", upstreamTracer);
     this.configuration = configuration;
     this.xsoFactory    = xsoFactory;
     this.tracer        = upstreamTracer;
 }
Esempio n. 18
0
        public static StoreObjectId[] RemoveDeletedFoldersFromCollection(IXSOFactory xsoFactory, IMailboxSession mailboxSession, IEnumerable <StoreObjectId> folderIds)
        {
            ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
            ArgumentValidator.ThrowIfNull("mailboxSession", mailboxSession);
            ArgumentValidator.ThrowIfNull("folderIds", folderIds);
            List <StoreObjectId> list = new List <StoreObjectId>(folderIds);

            list.RemoveAll((StoreObjectId folderId) => ContactsSearchFolderCriteria.IsDeletedFolder(mailboxSession, folderId));
            return(list.ToArray());
        }
Esempio n. 19
0
 private static void GetCalendarFolderProperties(IMailboxSession session, IXSOFactory xsoFactory, out int?calendarFolderVersion, out int?calendarItemCount)
 {
     calendarFolderVersion = null;
     calendarItemCount     = null;
     using (IFolder folder = xsoFactory.BindToFolder(session, DefaultFolderType.Calendar))
     {
         calendarFolderVersion = folder.GetValueOrDefault <int?>(FolderSchema.CalendarFolderVersion, null);
         calendarItemCount     = folder.GetValueOrDefault <int?>(FolderSchema.ItemCount, null);
     }
 }
Esempio n. 20
0
 public ContactFoldersEnumerator(IMailboxSession session, IXSOFactory xsoFactory, DefaultFolderType parentFolderScope, ContactFoldersEnumeratorOptions enumerateOptions, params PropertyDefinition[] additionalProperties)
 {
     Util.ThrowOnNullArgument(session, "session");
     Util.ThrowOnNullArgument(xsoFactory, "xsoFactory");
     EnumValidator.ThrowIfInvalid <ContactFoldersEnumeratorOptions>(enumerateOptions, "enumerateOptions");
     this.session              = session;
     this.xsoFactory           = xsoFactory;
     this.enumerateOptions     = enumerateOptions;
     this.additionalProperties = additionalProperties;
     this.parentFolderScope    = ((parentFolderScope != DefaultFolderType.None) ? parentFolderScope : DefaultFolderType.Root);
 }
Esempio n. 21
0
 internal OscSyncLockCreator(IMailboxSession session, IXSOFactory xsoFactory)
 {
     Util.ThrowOnNullArgument(session, "session");
     Util.ThrowOnNullArgument(xsoFactory, "xsoFactory");
     if (session.MailboxOwner != null && session.MailboxOwner.MailboxInfo.IsArchive)
     {
         throw new ArgumentException("Archive mailbox is not supported.", "session");
     }
     this.session    = session;
     this.xsoFactory = xsoFactory;
 }
Esempio n. 22
0
        public string GetSerializedPeopleIKnowGraph(IMailboxSession mailboxSession, IXSOFactory xsoFactory)
        {
            ArgumentValidator.ThrowIfNull("mailboxSession", mailboxSession);
            ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
            List <RelevantPerson> relevantContacts = this.GetRelevantContacts(mailboxSession, xsoFactory);
            PeopleIKnowGraph      peopleIKnowGraph = new PeopleIKnowGraph();

            peopleIKnowGraph.RelevantPeople = relevantContacts.ToArray();
            this.tracer.TraceDebug <int>((long)this.GetHashCode(), "PeopleIKnowService.GetSerializedPeopleIKnowGraph: Added {0} people to the PeopleIKnowGraph", relevantContacts.Count);
            return(this.serializer.Serialize(peopleIKnowGraph));
        }
Esempio n. 23
0
 internal OscFolderCreator(MailboxSession session, IXSOFactory xsoFactory)
 {
     Util.ThrowOnNullArgument(session, "session");
     Util.ThrowOnNullArgument(xsoFactory, "xsoFactory");
     if (session.MailboxOwner != null && session.MailboxOwner.MailboxInfo.IsArchive)
     {
         throw new ArgumentException("Archive mailbox is not supported.", "session");
     }
     this.session            = session;
     this.xsoFactory         = xsoFactory;
     this.networkToFolderMap = new Dictionary <OscNetworkMoniker, OscFolderCreateResult>();
 }
        public static IPushNotificationStorage Find(IMailboxSession mailboxSession, IXSOFactory xsoFactory)
        {
            ArgumentValidator.ThrowIfNull("mailboxSession", mailboxSession);
            ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
            StoreObjectId defaultFolderId = mailboxSession.GetDefaultFolderId(DefaultFolderType.PushNotificationRoot);

            if (defaultFolderId != null)
            {
                return(new PushNotificationStorage(xsoFactory.BindToFolder(mailboxSession, defaultFolderId), PushNotificationStorage.GetTenantId(mailboxSession)));
            }
            return(null);
        }
 // Token: 0x0600149D RID: 5277 RVA: 0x00049129 File Offset: 0x00047329
 public PeopleFilterGroupPriorityManager(IMailboxSession session, IXSOFactory xsoFactory)
 {
     if (session == null)
     {
         throw new ArgumentNullException("session");
     }
     if (xsoFactory == null)
     {
         throw new ArgumentNullException("xsoFactory");
     }
     this.session    = session;
     this.xsoFactory = xsoFactory;
 }
Esempio n. 26
0
 internal MailboxPhotoReader(IXSOFactory xsoFactory, ITracer upstreamTracer)
 {
     if (xsoFactory == null)
     {
         throw new ArgumentNullException("xsoFactory");
     }
     if (upstreamTracer == null)
     {
         throw new ArgumentNullException("upstreamTracer");
     }
     this.tracer         = ExTraceGlobals.UserPhotosTracer.Compose(upstreamTracer);
     this.upstreamTracer = upstreamTracer;
     this.xsoFactory     = xsoFactory;
 }
Esempio n. 27
0
 // Token: 0x06001B87 RID: 7047 RVA: 0x00069910 File Offset: 0x00067B10
 internal RemoveFavorite(IXSOFactory xsoFactory, MailboxSession mailboxSession, RequestDetailsLogger requestDetailsLogger, ItemId personaId)
 {
     ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
     ArgumentValidator.ThrowIfNull("mailboxSession", mailboxSession);
     ArgumentValidator.ThrowIfNull("requestDetailsLogger", requestDetailsLogger);
     ArgumentValidator.ThrowIfNull("personaId", personaId);
     this.xso            = xsoFactory;
     this.session        = mailboxSession;
     this.logger         = requestDetailsLogger;
     this.personaId      = personaId;
     this.utilities      = new UnifiedContactStoreUtilities(this.session, this.xso);
     this.favoritesPdlId = this.utilities.GetSystemPdlId(UnifiedContactStoreUtilities.FavoritesPdlDisplayName, "IPM.DistList.MOC.Favorites");
     this.SetLogValue(RemoveFavoriteMetadata.PersonaId, personaId);
 }
 // Token: 0x06001AF7 RID: 6903 RVA: 0x000663EC File Offset: 0x000645EC
 public Implementation(AttachmentDataProvider provider, IXSOFactory factory, IStoreSession attachmentSession, ModernGroupObjectType attachmentSessionModernGroupType, IItem rootItem, IAttachment attachment, string attachmentId, IMailboxSession draftAttachmentSession, StoreObjectId draftObjectId, bool isEdit, string userDisplayName, Func <IStoreSession, StoreId, AttachmentId, string> idConverter)
 {
     this.provider = provider;
     this.factory  = factory;
     this.originalAttachmentSession      = attachmentSession;
     this.originalSessionModernGroupType = attachmentSessionModernGroupType;
     this.originalAttachmentRootItem     = rootItem;
     this.originalAttachment             = attachment;
     this.originalAttachmentId           = attachmentId;
     this.draftAttachmentSession         = draftAttachmentSession;
     this.draftObjectId   = draftObjectId;
     this.isEdit          = isEdit;
     this.userDisplayName = userDisplayName;
     this.idConverter     = idConverter;
 }
Esempio n. 29
0
        public void UpdateFolderScope(IXSOFactory xsoFactory, IMailboxSession mailboxSession, StoreObjectId[] scope)
        {
            ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory);
            ArgumentValidator.ThrowIfNull("mailboxSession", mailboxSession);
            ArgumentValidator.ThrowIfNull("scope", scope);
            StoreObjectId defaultFolderId = mailboxSession.GetDefaultFolderId(this.defaultFolderType);

            if (defaultFolderId == null)
            {
                mailboxSession.CreateDefaultFolder(this.defaultFolderType);
                defaultFolderId = mailboxSession.GetDefaultFolderId(this.defaultFolderType);
            }
            using (ISearchFolder searchFolder = xsoFactory.BindToSearchFolder(mailboxSession, defaultFolderId))
            {
                ContactsSearchFolderCriteria.UpdateFolderScope(xsoFactory, mailboxSession, searchFolder, scope);
            }
        }
Esempio n. 30
0
        internal static TopicHashCache Load(IXSOFactory xsoFactory, IMailboxSession session, int cacheSize)
        {
            TopicHashCache topicHashCache = new TopicHashCache(cacheSize);

            try
            {
                byte[] array = null;
                using (IFolder folder = xsoFactory.BindToFolder(session, DefaultFolderType.Inbox, new PropertyDefinition[]
                {
                    FolderSchema.ConversationTopicHashEntries
                }))
                {
                    array = (folder.TryGetProperty(FolderSchema.ConversationTopicHashEntries) as byte[]);
                }
                if (array != null)
                {
                    using (MemoryStream memoryStream = new MemoryStream(array))
                    {
                        topicHashCache.Deserialize(memoryStream);
                    }
                }
            }
            catch (IOException arg)
            {
                ExTraceGlobals.StorageTracer.TraceDebug <IOException>(0L, "TopicHashCache::Load. Encountered the following exception. Exception = {0}.", arg);
                topicHashCache = new TopicHashCache(cacheSize);
            }
            catch (StorageTransientException arg2)
            {
                ExTraceGlobals.StorageTracer.TraceDebug <StorageTransientException>(0L, "TopicHashCache::Load. Encountered the following exception. Exception = {0}.", arg2);
                topicHashCache = new TopicHashCache(cacheSize);
            }
            catch (StoragePermanentException arg3)
            {
                ExTraceGlobals.StorageTracer.TraceDebug <StoragePermanentException>(0L, "TopicHashCache::Load. Encountered the following exception. Exception = {0}.", arg3);
                topicHashCache = new TopicHashCache(cacheSize);
            }
            return(topicHashCache);
        }