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