private static bool isNestedProperty(Type type)
{
if (type.Assembly.FullName.StartsWith("mscorlib", StringComparison.OrdinalIgnoreCase)) return false;
return
(type.IsClass || type.IsInterface) &&
!type.IsValueType &&
!string.IsNullOrEmpty(type.Namespace) &&
!type.Namespace.StartsWith("System.", StringComparison.OrdinalIgnoreCase);
}