Пример #1
0
        private MergingConversationManager CreateMergingConversationManager(DummyContactId[] contactIds, DummyPhoneNumberId[] messageSetIds, ILoadingProgressCallback progressCallback)
        {
            if (progressCallback != null)
            {
                int workEstimate = ConversationManager.GetWorkEstimate(contactIds.Length, messageSetIds.Length, 0, 0) +
                                   MergingConversationManager.GetWorkEstimateByContacts(contactIds.Length);
                progressCallback.Begin(workEstimate);
            }

            ConversationManager conversationManager = DummyConversationDataGenerator.GetConversationManager(contactIds, messageSetIds, progressCallback);

            if (progressCallback != null)
            {
                progressCallback.UpdateRemaining(MergingConversationManager.GetWorkEstimate(conversationManager.ConversationCount));
            }

            MergingConversationManager mergingConversationManager = new MergingConversationManager(conversationManager, progressCallback);

            if (progressCallback != null)
            {
                progressCallback.End();
            }

            return(mergingConversationManager);
        }