Skip to content

Commit 90a1bf5

Browse files
committed
Remove DefaultValueAttribute from CouchContractResolver
1 parent dfa8006 commit 90a1bf5

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/CouchDB.Driver/Helpers/CouchContractResolver.cs

-12
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,6 @@ internal CouchContractResolver(PropertyCaseType propertyCaseType)
2424
if (property != null && !property.Ignored)
2525
{
2626
property.PropertyName = member.GetCouchPropertyName(_propertyCaseType);
27-
28-
DefaultValueAttribute? defaultValueAttribute = member.GetCustomAttribute<DefaultValueAttribute>();
29-
if (defaultValueAttribute != null && member is PropertyInfo propertyInfo)
30-
{
31-
property.ShouldSerialize =
32-
instance =>
33-
{
34-
object? value = propertyInfo.GetValue(instance);
35-
var shouldSerialize = !Equals(value, defaultValueAttribute.Value);
36-
return shouldSerialize;
37-
};
38-
}
3927
}
4028
return property;
4129
}

0 commit comments

Comments
 (0)