Apistry.WebApiDocumentationProvider.GetPropertyNamePrefix C# (CSharp) Method

GetPropertyNamePrefix() private method

private GetPropertyNamePrefix ( PropertyDescriptor propertyDescriptor, String existingPrefix ) : String
propertyDescriptor System.ComponentModel.PropertyDescriptor
existingPrefix String
return String
        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);
        }