AttackPattern / CSharpAnalytics

Google Analytics for Windows 8, Windows Phone & desktop applications
142 stars 36 forks source link

Fixed issues #26, #31, #33 where running multiple instances cause var… #43

Open JimiC opened 8 years ago

JimiC commented 8 years ago

…ious exceptions to be thrown.

JimiC commented 8 years ago
  1. Fixed #26 by adding exception handler and debug logger when UnauthorizedAccessException is thrown.
  2. Fixed #31 by modifying the 'Save' logic to not be asynchronous, in order for the settings to get saved before the process exits, avoiding creating malformed CSharpAnalytics-MeasurementQueue file.
  3. Fixed #33 by modifying the 'Save' logic to not be asynchronous, avoiding thread race between multiple instances.

@damieng In the process of fixing the issues I changed the way the library saves and reads the storage files. Used XmlWriter in order to produce a line intended file which makes it more readable. If this is an issue please let me know so to revert those changes.