コード例 #1
0
 public IEnumerable <IAnimationTargetWithCurves> GetSelectedTargets()
 {
     return(AllTargets
            .Where(t => t.selected)
            .Cast <IAnimationTargetWithCurves>()
            .ToList());
 }
コード例 #2
0
        public IEnumerable <IAnimationTargetWithCurves> GetAllOrSelectedTargets()
        {
            var result = AllTargets
                         .Where(t => t.selected)
                         .Cast <IAnimationTargetWithCurves>()
                         .ToList();

            return(result.Count > 0 ? result : AllTargets);
        }