-Remove IgnoreAll and move fix to Ignore

This commit is contained in:
James Newton-King
2012-09-01 14:08:11 +12:00
parent d9c8d78d77
commit 2320d2d55e
8 changed files with 14 additions and 41 deletions
@@ -204,13 +204,7 @@ namespace Newtonsoft.Json.Serialization
memberValue == null)
return false;
DefaultValueHandling defaultValueHandling = property.DefaultValueHandling.GetValueOrDefault(Serializer.DefaultValueHandling);
if (HasFlag(defaultValueHandling, DefaultValueHandling.Ignore)
&& MiscellaneousUtils.ValueEquals(memberValue, property.DefaultValue))
return false;
if (defaultValueHandling == DefaultValueHandling.IgnoreAll
if (HasFlag(property.DefaultValueHandling.GetValueOrDefault(Serializer.DefaultValueHandling), DefaultValueHandling.Ignore)
&& MiscellaneousUtils.ValueEquals(memberValue, property.DefaultValue ?? ReflectionUtils.GetDefaultValue(property.PropertyType)))
return false;