Example #1
0
        public List <SearchConversation> SplitConversation()
        {
            int splitSize = (CalculateMaxSearchTextSize() / 100) * 85;
            List <SearchConversation> searchConversations = new List <SearchConversation> {
            };

            if (IsTooBig)
            {
                var partialSearchTexts = SplitToChunks(SearchText, splitSize);

                int enumerator = 1;
                foreach (var partitalText in partialSearchTexts)
                {
                    SearchConversation partialSearchconversation = new SearchConversation(this);

                    if (enumerator > 1)
                    {
                        partialSearchconversation.ObjectID = ObjectID + "-" + enumerator.ToString();
                    }

                    enumerator++;
                    partialSearchconversation.SearchText = partitalText;
                    searchConversations.Add(partialSearchconversation);
                }
            }
            else
            {
                searchConversations.Add(this);
            }
            return(searchConversations);
        }
Example #2
0
 public SearchConversation(SearchConversation original)
 {
     ObjectID          = original.ObjectID;
     IntercomLink      = original.IntercomLink;
     Assignee          = original.Assignee;
     Participants      = original.Participants;
     CreatedAt         = original.CreatedAt;
     DateTimestamp     = original.DateTimestamp;
     SearchText        = original.SearchText;
     MessageCount      = original.MessageCount;
     Tags              = original.Tags;
     RatingValue       = original.RatingValue;
     RatingRemark      = original.RatingRemark;
     IsTooBig          = original.IsTooBig;
     ConversationSplit = original.ConversationSplit;
 }