Exemplo n.º 1
0
        public List <FateEntity> GetFate(IStory story)
        {
            List <FateEntity> rl = new List <FateEntity>();
            var l = story.GetFate(this);

            //if(filterType== FilterType.Type)
            //{
            //    l = l.Where(v => v.Item1.GetType().Name == filter).ToList();
            //}
            //if(filterType== FilterType.Name)
            //{
            //    l = l.Where(v => v.Item1.Name == filter).ToList();
            //}
            l.ForEach(v =>
            {
                var fateEntity = new FateEntity()
                {
                    Name                = v.Item1.Name,
                    FateEntityType      = GetEntityType(v.Item1),
                    Description         = v.Item2.Memo,
                    BeginTime           = CommonProc.GetMaxTime(v.Item2.BeginTime, v.Item1.BeginTime),
                    EndTime             = CommonProc.GetMinTime(v.Item2.EndTime, v.Item1.EndTime),
                    RelationType        = v.Item2.RelationType,
                    RelationDescription = v.Item2.Memo
                };
                //fateEntity.KeywordList.AddRange(v.Item1.KeyWordList);
                rl.Add(fateEntity);
            });
            return(rl);
        }