private ParticipantSet LoadReplyAllParticipantsImpl(IConversationTree conversationTree, ICollection <IConversationTreeNode> nodes, SmartPropertyDefinition propertyDefinition)
        {
            ParticipantSet   participantSet   = new ParticipantSet();
            ParticipantTable participantTable = this.LoadReplyAllParticipantsPerTypeImpl(conversationTree, nodes, propertyDefinition);

            participantSet.UnionWith(participantTable[RecipientItemType.To]);
            participantSet.UnionWith(participantTable[RecipientItemType.Cc]);
            return(participantSet);
        }
        public Dictionary <IConversationTreeNode, ParticipantSet> LoadAddedParticipants(IConversationTree conversationTree)
        {
            Dictionary <IConversationTreeNode, ParticipantSet> participantsPerNode = new Dictionary <IConversationTreeNode, ParticipantSet>(ConversationTreeNodeBase.EqualityComparer);

            conversationTree.ExecuteSortedAction(ConversationTreeSortOrder.ChronologicalAscending, delegate(ConversationTreeSortOrder param0)
            {
                ParticipantSet participantSet = new ParticipantSet();
                foreach (IConversationTreeNode conversationTreeNode in conversationTree)
                {
                    ParticipantSet participantSet2 = this.LoadReplyAllParticipantsImpl(conversationTree, new IConversationTreeNode[]
                    {
                        conversationTreeNode
                    }, InternalSchema.ReplyDisplayNames);
                    ParticipantSet participantSet3 = new ParticipantSet();
                    foreach (IParticipant participant in participantSet2)
                    {
                        if (participantSet.Add(participant))
                        {
                            participantSet3.Add(participant);
                        }
                    }
                    if (participantSet3.Any <IParticipant>())
                    {
                        participantsPerNode.Add(conversationTreeNode, participantSet3);
                    }
                    participantSet.UnionWith(this.LoadFrom(conversationTree, conversationTreeNode));
                }
            });
            return(participantsPerNode);
        }
Exemple #3
0
        private ParticipantSet CalculateAllRecipients()
        {
            ParticipantSet participantSet = new ParticipantSet();

            foreach (PropertyDefinition propertyDefinition in MessageItemSchema.SingleRecipientProperties)
            {
                if (this.loadedProperties.Contains(propertyDefinition))
                {
                    Participant valueOrDefault = this.StorePropertyBag.GetValueOrDefault <Participant>(propertyDefinition, null);
                    if (valueOrDefault != null)
                    {
                        participantSet.Add(valueOrDefault);
                    }
                }
            }
            participantSet.UnionWith(this.Recipients.ToList());
            participantSet.UnionWith(this.ReplyToParticipants);
            return(participantSet);
        }
        private ParticipantSet LoadParticipants(IConversationTree conversationTree, ConversationDataExtractor.ParticipantLoaderDelegate loaderDelegate, ICollection <IConversationTreeNode> nodes)
        {
            ParticipantSet participantSet = new ParticipantSet();

            nodes = (nodes ?? conversationTree.ToList <IConversationTreeNode>());
            foreach (IConversationTreeNode conversationTreeNode in nodes)
            {
                if (conversationTreeNode.HasData)
                {
                    foreach (IStorePropertyBag propertyBag in conversationTreeNode.StorePropertyBags)
                    {
                        participantSet.UnionWith(loaderDelegate(propertyBag));
                    }
                }
            }
            return(participantSet);
        }
        public ParticipantSet CalculateAllRecipients(IConversationTree conversationTree, ICollection <IConversationTreeNode> loadedNodes)
        {
            loadedNodes = (loadedNodes ?? conversationTree);
            HashSet <StoreObjectId> hashSet = new HashSet <StoreObjectId>(from node in loadedNodes
                                                                          select node.MainStoreObjectId);

            if (!this.ConversationDataLoaded)
            {
                this.LoadItemPartsOrBodySummaries(conversationTree, hashSet);
            }
            ParticipantSet participantSet = new ParticipantSet();

            foreach (StoreObjectId itemId in hashSet)
            {
                ItemPart itemPart = this.GetItemPart(conversationTree, itemId);
                participantSet.UnionWith(itemPart.AllRecipients);
            }
            return(participantSet);
        }