/// <summary> /// Constrcutor to initiate the reflective filter's 'filtering' operation. /// /// object type of holding property value /// the type of collection to add the object back into if filtered /// the optional clause of == or != to /// the FilterPropertiesCollection that contains /// all of the property names and values that we need to match /// /// the filter operand. Either an OR or AND /// </summary> public FilterOperation(Type typeOfObject, Type typeOfCollection, FilterClause clause, FilterPropertyCollection propertiesAndValues, FilterOperand operand) { _ObjectType = typeOfObject; _CollectionType = typeOfCollection; _FilterClause = clause; _PropertiesAndValues = propertiesAndValues; _Operand = operand; }
public ReflectiveFilter(Type typeOfObject, Type typeOfCollection) { _FilterList = new FilterPropertyCollection(); _ObjectType = typeOfObject; _CollectionType = typeOfCollection; try { // create the concrete collection type. _FilteredCollection = (IList)Activator.CreateInstance(_CollectionType); } catch (System.MemberAccessException) { throw new MemberAccessException("You must specify a collection that is not abstract"); } }