public void SetRace(string code) { if (!_raceDictionary.ContainsKey(code)) { return; } AutoUpdating = false; _race = _raceDictionary[code]; DBError error; if (_raceStore != null) { _raceStore.Close(); } var manager = DBDatastoreManager.Manager(DBAccountManager.SharedManager.LinkedAccount); _raceStore = manager.OpenDatastore(_race.DataStoreID, out error); _raceStore.Sync(out error); UpdateBoatInformation(); UpdateEventData(true); _raceStore.AddObserver(_raceStore, () => { UpdateEventData(false); // true will curtail the write each time }); AutoUpdating = true; }