-Fixed JTokenWriter sometimes losing types when writing JToken

This commit is contained in:
James Newton-King
2016-04-29 16:21:41 +12:00
parent 81098652b3
commit 86c2f80311
6 changed files with 167 additions and 9 deletions
@@ -769,9 +769,11 @@ namespace Newtonsoft.Json.Utilities
Attribute[] attributes = a.Cast<Attribute>().ToArray();
#if (NET20 || NET35)
// ye olde .NET GetCustomAttributes doesn't respect the inherit argument
// ye olde .NET GetCustomAttributes doesn't respect the inherit argument
if (inherit && t.BaseType != null)
{
attributes = attributes.Union(GetAttributes(t.BaseType, attributeType, inherit)).ToArray();
}
#endif
return attributes;