public IEnumerable <IAnimationTargetWithCurves> GetSelectedTargets() { return(AllTargets .Where(t => t.selected) .Cast <IAnimationTargetWithCurves>() .ToList()); }
public IEnumerable <IAnimationTargetWithCurves> GetAllOrSelectedTargets() { var result = AllTargets .Where(t => t.selected) .Cast <IAnimationTargetWithCurves>() .ToList(); return(result.Count > 0 ? result : AllTargets); }