private String GetPropertyNamePrefix(PropertyDescriptor propertyDescriptor, String existingPrefix)
{
var propertyName = propertyDescriptor.Name;
if (propertyDescriptor.PropertyType.IsGenericType)
{
if (GetEnumerableType(propertyDescriptor.PropertyType) != null)
{
propertyName += "[]";
}
}
return String.Format(
"{0}{1}{2}",
existingPrefix,
String.IsNullOrWhiteSpace(existingPrefix) ? String.Empty : ".",
propertyName);
}