private static List <ValueProperty> FindInvalidProperties(CslaObjectInfo currentCslaObject, PropertyCollection rootCriteriaProperties) { /* * 1. An object value property is invalid when it matches a parent property. * 2. For the time being, an associative object's parent properties are the root object's criteria properties. * 3. Matches are found by property name only. */ var invalidValueProperties = new List <ValueProperty>(); foreach (var property in rootCriteriaProperties) { foreach (var valueProperty in currentCslaObject.ValueProperties) { // filter out properties in Criteria properties / Parent properties if (property.Name == valueProperty.Name) { invalidValueProperties.Add(valueProperty); } } } return(invalidValueProperties); }