Repository navigation
Abstract away settings logic using composition - #856
Conversation
|
Is this ready for review, or still WiP? |
|
Still WIP as I have to change the extension to .xml and do my own review |
8e3842c to
04431be
Compare
1e61d71 to
48d7eb0
Compare
ilexp
left a comment
There was a problem hiding this comment.
Added some minor change requests for the current implementation.
I'm a little bothered by the sudden influx of all the .Value indirections here, but due to the lack of serializer support for re-using the same instance, there's probably no way around that container design for now, as discussed in #855.
Agree it clutters the code a bit but thats also because its used through |
I disagree on that one, I think there's a balance to be struck here. But that's a topic for another time 😁 |
Settings are now just POCO classes that are wrapped by the generic
SettingsContainerclass which contains the serialization logic and a changed event. It also implements aISettingsContainerinterface This cleans this logic up and allows us to treat settings in a more generic way (such as here https://github.com/AdamsLair/duality/pull/856/files#diff-3a2fbc8f3e471d6698b637e54ca23cffR998).Also updated the naming of settings files according to #855.
Further possible improvements:
DualityApporDualityEditorAppanymore if we pass the container as a reference. This would actually remove the dependency onDualityApporDualityEditorAppfor alot of code which is a good thing. We might wanna do this in a separate PR to avoid inflating the scope of this PR though.