private IEnumerable <PropertyInfo> GetProperties(BindingFlags bindingFlags) { if (bindingFlags == BindingFlags.Default) { return(TypeConstraint.Properties()); } return(TypeConstraint.Properties(bindingFlags)); }
private IEnumerable <PropertyInfo> GetProperties(Type propertyType, BindingFlags bindingFlags) { IEnumerable <PropertyInfo> properties; if (bindingFlags == BindingFlags.Default) { properties = TypeConstraint.Properties().Where(x => x.PropertyType == propertyType); } else { properties = TypeConstraint.Properties(bindingFlags).Where(x => x.PropertyType == propertyType); } return(properties); }