* Further attempt to resolve profile corruption issues
- FileUtil now uses File.Replace and does a sync flush
- Add restore capabilities to BackupService
- If loading a profile fails, attempt to restore from the most recent backup
- Trigger a backup creation on raid start, raid end, and game close
- Load profiles before starting the backupService to avoid backing up corrupt profiles
* - Switch async calls to .GetAwaiter().GetResult() for better exception handling
---------
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
* Add new service to handle profile migrations
* Handle various null checks
* Remove unecessary assignments
* Further works on this:
- Loads profiles as JObject's initally, so migration can take place on profiles that don't have proper compatability
- Adds prerequisite migrations, and sorts them after one another
* Throw exception if profile can't be deserialized after migration
* Cleanup & use profile version
* Further migrations work, support 3.10 & 3.11 profiles upgrading to 4.0
* Update parameter name
* Further async changes
- SaveServer & Backup Server are now async
- Anything that ties in with SaveServer saving (Such as callbacks) are now async
- Various async util methods added
- Removed two wrapper methods and switched code over to use the actual method
* Update test