private bool IsMatch(TDatabaseObject result, string criterion) { var propertyValues = _propertyFilter.GetPropertyValues(result); if (propertyValues.Length == 0) { //DICOM says if we maintain an object with an empty value, it's a match for any criteria, //but we don't do it because it's weird. return(false); } if (!_propertyFilter.IsWildcardCriterion(criterion)) { return(propertyValues.Any(value => QueryUtilities.AreEqual(value, criterion))); } return(propertyValues.Any(value => QueryUtilities.IsLike(value, criterion))); }
bool IMultiValuedPropertyFilter <TDatabaseObject> .IsWildcardCriterion(string criterion) { return(QueryUtilities.IsWildcardCriterion(Path.ValueRepresentation, criterion)); }