public Dictionary<string, MemberMetadata> GetRegularProperties(Type type)
{
Argument.IsNotNull("type", type);
return _regularPropertiesCache.GetFromCacheOrFetch(type, () =>
{
var dictionary = new Dictionary<string, MemberMetadata>();
var catelPropertyNames = GetCatelPropertyNames(type, true);
var regularProperties = type.GetPropertiesEx();
foreach (var propertyInfo in regularProperties)
{
if (catelPropertyNames.Contains(propertyInfo.Name) ||
propertyInfo.DeclaringType == typeof(ModelBase))
{
continue;
}
var memberMetadata = new MemberMetadata(type, propertyInfo.PropertyType, SerializationMemberGroup.RegularProperty, propertyInfo.Name)
{
Tag = propertyInfo
};
var nameOverride = GetNameOverrideForSerialization(propertyInfo);
if (!string.IsNullOrWhiteSpace(nameOverride))
{
memberMetadata.MemberNameForSerialization = nameOverride;
}
dictionary[propertyInfo.Name] = memberMetadata;
}
return dictionary;
});
}