Ejemplo n.º 1
0
 /// <summary>
 /// Filters a sequence of values based on a condition.
 /// </summary>
 /// <param name="source">A number collection to filter.</param>
 /// <param name="condition">The condition.</param>
 /// <returns>A number collection that contains elements from the input sequence that satisfy the condition.</returns>
 public static IEnumerable <double> Where(this IEnumerable <double> source, DoubleCondition condition)
 {
     if (condition == null)
     {
         return(source);
     }
     return(source.Where(ele => condition.IsMatched(ele)));
 }