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