This commit is contained in:
James Newton-King
2019-08-18 19:09:49 +12:00
parent 7f113ff49a
commit 083aa6df83
+3 -4
View File
@@ -744,16 +744,15 @@ namespace Newtonsoft.Json.Linq
PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties(Attribute[] attributes)
{
var propertiesArray = new PropertyDescriptor[Count];
var i = 0;
PropertyDescriptor[] propertiesArray = new PropertyDescriptor[Count];
int i = 0;
foreach (KeyValuePair<string, JToken?> propertyValue in this)
{
propertiesArray[i] = new JPropertyDescriptor(propertyValue.Key);
i++;
}
var descriptors = new PropertyDescriptorCollection(propertiesArray);
return descriptors;
return new PropertyDescriptorCollection(propertiesArray);
}
AttributeCollection ICustomTypeDescriptor.GetAttributes()