Exemple #1
0
        static App()
        {
            Database = new Ao3TrackDatabase();
            Database.TryGetVariable("LogErrors", bool.TryParse, out _LogErrors, true);
            Storage = new SyncedStorage();

            Task.Run(async() =>
            {
                try
                {
                    var report = await TextFileLoadAsync("ErrorReport.json");
                    TextFileDelete("ErrorReport.json");

                    if (_LogErrors)
                    {
                        if (!string.IsNullOrWhiteSpace(report))
                        {
                            await Storage.SubmitErrorReport(report);
                        }
                    }
                }
                catch (Exception)
                {
                }
            });

            Theme = Ao3TrackReader.App.Database.GetVariable("Theme");
            if (string.IsNullOrWhiteSpace(Theme))
            {
                Theme = "light";
            }
        }
 public AutoCommitTransaction(Ao3TrackDatabase db)
 {
     this.db = db;
 }