コード例 #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;
 }