-Fixed JsonProperty.Readable and Writable not being correctly set for .NET properties with modified getter/setter visibility
-Fixed error caused by property properties on a base class when reflecting a type -Fixed property CanRead and CanWrite coming back as false when a base class property has a private getter/setter visibility
This commit is contained in:
@@ -610,5 +610,19 @@ namespace Newtonsoft.Json.Utilities
|
||||
|
||||
return allAdded;
|
||||
}
|
||||
|
||||
public static int IndexOf<T>(this IEnumerable<T> collection, Func<T, bool> predicate)
|
||||
{
|
||||
int index = 0;
|
||||
foreach (T value in collection)
|
||||
{
|
||||
if (predicate(value))
|
||||
return index;
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user