Added Locking system, so that we don't try to access the same file with
both read and write functions at the same time causing an locked
exception on the file when watching it.
Now utilizing syncers in an Array for each checking of IsDirty() or not,
and running code based upon the state of the syncers. May clean this up
more.
Added polling of the database to see if there's anything new to sync
locally.
Added interface for Syncer class.
Changed IsDirty from Property to Function
Moved order for reading in initial database. First will fetch from the
REST Api, then it will read in the database stored locally.
Changed logic behind reading and fetching database. Fetching the
database from the REST Api will mark internally that it is dirty, and
force syncing.
If an entry exists in our cache, and is equal, then we continue through,
otherwise we remove the old entry, and use the new entry.
While still testing things out, remain in Console mode.
Removed un-used using statements.
Fixed SearchHistorySyner to properly use /searchHistory API end-point.
Added print statement to see when FreeTube closes, and wait for 1.5
seconds before attempting to sync everything up. May need to increase
this more, needs testing. (maybe a good 5 seconds would be enough)
Updated Syncer class to properly sync all classes, even with special
requierments needed for Settings.
Now properly handles all classes, and ensures that the data is properly
stored in the database, and can be written out correctly to the FreeTube
database files.
Updated Seting class to use string for teh data, and the data is the
full setting line, to allow for the flexability for Any data value in
the field. Implemented MarshalData() and JsonData() functions.
Changed delegate to pass string instead of object.
Now instead of attempting to deserialize the data in DBSyncWatcher,
deserialization happens in th Syncer class.
Fixed possible issue where integers were both strings and ints. Now
properly converting them to integers to be stored.
Fixed issue where lengths were being reported as either integers, or
String stamps. Now properly converting to string stamps to integers.
Created Syncer Generic Class to handle Monitoring, and Syncing between
local database, and remote REST server.
Temporarily changed Program.cs from an Avalonia UI app, to a Console App
for testing and debugging purposes.