1234567891011121314151617 |
- using System.Collections.Generic;
- using System.Linq;
- namespace FormulaEnginePoC.FormulaEngine
- {
- public abstract class FilterFormula<TSource> : CalcFormula<TSource, bool>
- {
- protected FilterFormula(string userExpression) : base(userExpression)
- {
- }
- public IEnumerable<TSource> Filter(IEnumerable<TSource> source)
- {
- return source.Where(CompiledFunc);
- }
- }
- }
|