/// <summary> /// コピーインスタンスを生成する /// </summary> /// <returns></returns> public MsgTopic Clone() { //結果データ MsgTopic copy = new MsgTopic(); //基本データのコピー copy.CreateTime = this.CreateTime; copy.DataKey = this.DataKey; copy.Title = this.Title; copy.Url = this.Url; copy.ThumbnailUrl = this.ThumbnailUrl; copy.TopicClassification = this.TopicClassification; copy.FlgNotAddChatted = this.FlgNotAddChatted; //センテンスリストのコピー foreach (var sentence in this.TalkSentenceList) { copy.TalkSentenceList.Add(sentence.Clone()); } //URLリスト、サムネリストのコピー copy.THUMBNAIL_URL_LIST = new List <string>(this.THUMBNAIL_URL_LIST); copy.VIDEO_URL_LIST = new List <string>(this.VIDEO_URL_LIST); return(copy); }
public MsgGreet(LiplisTone Tone, ChatSetting chat, int AllocationId) { try { this.message = new MsgTopic(Tone, chat.sentence, chat.sentence, chat.GetEmotion(), chat.GetEmotion(), true, AllocationId); //Chatに設定があれば、時間範囲を設定する if (chat.rangeStart != "" || chat.rangeEnd != "") { //スタート時刻をセット string[] start = chat.rangeStart.Split(':'); this.SrtTime = DateUtil.CreateDatetime(int.Parse(start[0]), int.Parse(start[1]), 0); //終了時刻をセット string[] end = chat.rangeEnd.Split(':'); this.EndTime = DateUtil.CreateDatetime(int.Parse(end[0]), int.Parse(end[1]), 0); } } catch { //エラーでも処理を継続 } }