public IEnumerable <Movie> Filter(IMovieSpecification specification) { foreach (var item in _list) { var movie = (Movie)item; if (specification.IsSatisfiedBy(movie)) { yield return(movie); } } }
public InverseSpecification(IMovieSpecification specification) { _specification = specification; }
public OrSpecification(IMovieSpecification left, IMovieSpecification right) { _left = left; _right = right; }