Esempio n. 1
0
 public IEnumerable <T> FindAll(Requiem requiements)
 {
     foreach (T item in this)
     {
         if (requiements(item))
         {
             yield return(item);
         }
     }
 }
Esempio n. 2
0
        public IEnumerable <T> Find(Requiem requiements)
        {
            foreach (T item in this)
            {
                if (requiements(item))
                {
                    yield return(item);

                    yield break;
                }
            }
            throw new Exception("Collection doesn't have any item that match this requiement");
        }
Esempio n. 3
0
        public IEnumerable Find(Requiem requiements)
        {
            foreach (Product item in this)
            {
                if (requiements(item))
                {
                    yield return(item);

                    yield break;
                }
            }
            throw new Exception("Collaction hasn`t any item that match this requiement");
        }