dahomey-technologies/Dahomey.Cbor

[API] CborOptions and CborReader/CborWriter

Closed this issue · 3 comments

tibel commented

Scope

  • CborReader and CborWriter are not using CborOptions
  • CborOptions is used by converters only

This brings me to the question:
Why CborReader and CborWriter have an Options property and take CborOptions as a constructor parameter when it is not used?

Suggestion

  • change converter constructors to use CborOptions instead of SerializationRegistry
  • remove Options property from CborReader and CborWriter

I know this would be a breaking change. Just wanted to write it down so it can be considered for next major release.

You are right!
I can change ObjectConverter constructor, it would not be a major breaking for this class is meant to be used internally.
I'm also going to add a new constructors to CborReader/CborWriter without the CborOption parameter, remove the Options property and mark the existing constructors as obsolete

tibel commented

Did not expect this to happen right now 🤩

Thanks a lot @mcatanzariti