-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:
JamesNK
2010-02-14 02:58:28 +00:00
parent c7facae789
commit 98164c53a6
8 changed files with 381 additions and 55 deletions
@@ -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;
}
}
}