Clean up
This commit is contained in:
@@ -744,16 +744,15 @@ namespace Newtonsoft.Json.Linq
|
|||||||
|
|
||||||
PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties(Attribute[] attributes)
|
PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties(Attribute[] attributes)
|
||||||
{
|
{
|
||||||
var propertiesArray = new PropertyDescriptor[Count];
|
PropertyDescriptor[] propertiesArray = new PropertyDescriptor[Count];
|
||||||
var i = 0;
|
int i = 0;
|
||||||
foreach (KeyValuePair<string, JToken?> propertyValue in this)
|
foreach (KeyValuePair<string, JToken?> propertyValue in this)
|
||||||
{
|
{
|
||||||
propertiesArray[i] = new JPropertyDescriptor(propertyValue.Key);
|
propertiesArray[i] = new JPropertyDescriptor(propertyValue.Key);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var descriptors = new PropertyDescriptorCollection(propertiesArray);
|
return new PropertyDescriptorCollection(propertiesArray);
|
||||||
return descriptors;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AttributeCollection ICustomTypeDescriptor.GetAttributes()
|
AttributeCollection ICustomTypeDescriptor.GetAttributes()
|
||||||
|
|||||||
Reference in New Issue
Block a user