jefffhaynes / BinarySerializer

A declarative serialization framework for controlling formatting of data at the byte and bit level using field bindings, converters, and code.
MIT License
290 stars 62 forks source link

`MemberSerialized`/`MemberDeserialized` are still called despite `[SerializeWhen]` #183

Closed xchellx closed 1 year ago

xchellx commented 2 years ago

When [SerializeWhen] evaluates to false, it does not serialize/deserialize the value yet the MemberSerialized/MemberDeserialized events still get called for the members that have a falsified [SerializeWhen]. This is undefined behavior. Reproducible example: bintest1