Replies: 1 comment 2 replies
-
I believe the builder classes are thread safe so you could pass around a single instance of that object and just call build when you need a serializer/deserializer. You can call build as many times as you want. Does that help at all? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First; I did search for the things I'm saying here but I couldn't find anything so pardon me if they are repetitive.
I wanted to know if there are any interest on creating extensions for creating default instances for a specific configuration and simplification for the usage.
Something like what we have for Json.
YamlSerializer.Serialize(...)
andYamlSerializer.Deserialize(...)
I have a few helpers and wrappers to simplify all of that using extensions and stuff like that.
Often is useful to have a single instance of a serializer to use throughout the application and I end up doing this for JSON, XML and whatnot.
We end up having something a little bit easier such as
And for the extensions, same thing using a singleton instance of the configuration itself or named configurations if you want to add different ways of doing things.
If you don't do anything, default, or adding new configurations.
Beta Was this translation helpful? Give feedback.
All reactions