public IPropertyFilter ParseComponent <TDomain>(ICompositionService comp, PropertyFilterFactory <TDomain> factory, IPropertyFilter sourceFilter, IAuditProperty p, PropertyValueComparison cmp, string value) { var res = from prop in Maybe.Value(p as IAuditProperty <TProp>) from selector in comp.Get <PropertyValueSelectorCache <TProp> >().GetSelector(prop) from parsed in Maybe.SafeValue(() => selector.ParsePostedValue(value)) select sourceFilter == null?factory.Create(prop, parsed, cmp) : sourceFilter.And(prop, parsed, cmp); return(res.ValueOrNull() ?? sourceFilter); }
public static IPropertyFilter ParsePostedValue <TDomain>(ICompositionService comp, PropertyFilterFactory <TDomain> factory, IPropertyFilter sourceFilter, IAuditProperty p, PropertyValueComparison cmp, string value) { return(HelperFor(p).ParseComponent(comp, factory, sourceFilter, p, cmp, value)); }