예제 #1
0
 internal ConversationThread(ConversationDataExtractor dataExtractor, ConversationThreadDataExtractor threadDataExtractor, IConversationTree threadTree, IConversationTreeFactory factory)
 {
     this.threadTree          = threadTree;
     this.dataExtractor       = dataExtractor;
     this.threadDataExtractor = threadDataExtractor;
     this.factory             = factory;
 }
        private IList <IConversationThread> CreateConversationThreads(IConversationTree tree, List <IConversationTree> threadTrees, ConversationDataExtractor conversationDataExtractor, ICollection <PropertyDefinition> requestedThreadProperties)
        {
            bool isSingleThreadConversation = threadTrees.Count == 1;
            ConversationThreadDataExtractor threadDataExtractor = new ConversationThreadDataExtractor(requestedThreadProperties, tree, isSingleThreadConversation);
            IList <IConversationThread>     list = new List <IConversationThread>();

            foreach (IConversationTree threadTree in threadTrees)
            {
                ConversationThread item = new ConversationThread(conversationDataExtractor, threadDataExtractor, threadTree, this.conversationTreeFactory);
                list.Add(item);
            }
            return(list);
        }