A Concrete Filter for Simple Comparisons
With the abstract Filter class complete, we can focus on implementing the actual comparator logic. We can start with the simplest case: LHS Compator RHS For this, we must first declare an enum to record the type of comparison being made: public enum ComparisonOperator { Equals, NotEquals, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual } We can also create an enum to record a function being applied to the column name. In this case, we're supporting only three. However, because not all comparison filters will have a function applied, we've also added a None filter. public enum ComparisonFunction { Length, ToUpper, ToLower, None } Finally, we can create our concrete ComparisonFilter. Because the abstract Filter class takes care of all of the chaining and group organization, our ComparisonFilter is far smaller and more focused. We need only to add two properties: one to record the compariso...