private IEnumerable <PropertyInfo> GetInternalProperties(Type type) { Func <PropertyInfo, bool> canInclude = property => CreateMatchingGet(property)() || CreateMatchingSet(property)(); return(cache.Get(type.AssemblyQualifiedName, () => type.GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(canInclude))); }
public IEnumerable <PropertyInfo> GetReadOnlyProperties(Type type) { Func <PropertyInfo, bool> canInclude = property => CreateMatchingGet(property)(); return(GetInternalProperties(type).Where(canInclude)); }