-
Type: New Feature
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.0
-
Component/s: Feature Request
-
None
These methods would allow the decision whether a particular property should be serialized to be made at runtime. This is similar to [BsonIgnoreIfNull] but allows the developer to use custom criteria to decide whether to serialize the property or not. For example:
public class Employee {
// other fields
public string Zip;
public bool ShouldSerializeZip(string value)
{ return value != null && value != "' && value != "00000"; }}