Ejemplo n.º 1
0
 public IEnumerable<T> Where(Predicate<T> check)
 {
     foreach (var needle in _entries.Where(needle => check(needle.Value)))
     {
         yield return needle.Value;
     }
 }
Ejemplo n.º 2
0
        public IEnumerable <T> Where(Predicate <T> check)
        {
            if (check == null)
            {
                throw new ArgumentNullException(nameof(check));
            }
            return(WhereExtracted());

            IEnumerable <T> WhereExtracted()
            {
                foreach (var needle in _entries.Where(needle => check(needle.Value)))
                {
                    yield return(needle.Value);
                }
            }
        }
Ejemplo n.º 3
0
 public IEnumerable <T> Where(Predicate <T> check)
 {
     if (check == null)
     {
         throw new ArgumentNullException("check");
     }
     foreach (var needle in _entries.Where(needle => check(needle.Value)))
     {
         yield return(needle.Value);
     }
 }