anakic/Jot

ITrackingAware AsGeneric not serialising any data on Persist

Closed this issue ยท 4 comments

Hello,

I am interested in using this library in a project of mine but while testing it out I have come across an issue.

I made a basic project using the WPF Demo that's in this repo as a reference but was scratching my head when the AppSettings class was being serialised as "[]".
I downloaded the Jot Repo and compiled the TestWPF demo project and it has the same issue, the AppSettings class is serialised as "[]".

The window position json is being serialised ok, so it appears to be isolated to the use of the ITrackingAware interface.

I did a quick step through the TrackingConfiguration.Persist method and it appears that the issue is caused by TrackedProperties not containing any properties. I don't have the time currently to dig further. Hopefully someone that's familiar with the code base will be able to figure this out relatively
easily.

Hey, you're right! I haven't used ITrackingAware in the project that I'm working on at the moment so I didn't notice the bug. Not having any tests for ITrackingAware also didn't help. Thanks for the heads up. The bug is now fixed in the repo and in the nuget package.

Awesome, thanks for looking into it, I really liked the idea of the interface and was hoping to avoid using Tracker objects directly for my config classes. I'll give the latest version a try tomorrow and close off the issue if it's all good. ๐Ÿ‘

I look forward to getting rid of all my app/user.config boilerplate code. ๐Ÿ˜

The latest version on NuGet is working as expected ๐Ÿ˜„.

Thanks again ๐Ÿ‘

Great, thanks for the bug report!