void ProccessResults (DBRecord[] results)
		{
			records = results.ToDictionary (x => x.Fields ["Name"].ToString (), x => x);
			foreach (var result in results) {
				var name = result.Fields ["Name"].ToString ();
				Monkey monkey;
				monkeyDictionary.TryGetValue (name, out monkey);
				if (monkey == null) {
					monkey = result.ToMonkey ();
					monkeyDictionary.Add (name, monkey);
				} else {
					monkey.Update (result);
				}
			}
			Monkeys = monkeyDictionary.Select (x => x.Value).OrderBy (x => x.Z).ToArray ();
			store.BeginInvokeOnMainThread (() => {
				if (MonkeysUpdated != null)
					MonkeysUpdated (this, EventArgs.Empty);
			});
		}
        void ProcessResults(DBRecord[] results)
        {
            _raceRecords = results.ToDictionary (x => x.Fields ["Code"].ToString (), x => x);
            foreach (var result in results) {
                var code = result.Fields ["Code"].ToString ();
                DropboxRace race;
                _raceDictionary.TryGetValue (code, out race);

                if (race == null) {
                    race = result.ToRace ();
                    _raceDictionary.Add (code, race);
                } 	else {
                    race.Update (result);
                }

                UpdateRaceInformation(race);
            }
            _generalStore.BeginInvokeOnMainThread (() => {
                if (RaceListUpdated != null)
                    RaceListUpdated (this, EventArgs.Empty);
            });
        }
        void ProcessSequenceItems(DBRecord[] results, bool justRead)
        {
            _sequenceRecords = results
                .ToDictionary(
                    x => new Tuple<string,string,int>(x.Fields["Name"].ToString(), x.Fields["Token"].ToString(), ((NSNumber)x.Fields["StartNumber"]).IntValue),
                    x => x);
            var writtenLocations = new List<Tuple<string,string>>();
            foreach(var kvp in _sequenceRecords)
            {
                ISequenceItem item;
                _sequenceDictionary.TryGetValue(kvp.Key, out item);

                // this check means we are only going to be writing for a change we've not seen
                if(item == null)
                {
                    IBoat boat;
                    if(kvp.Key.Item3 <= 0)
                        boat = new BoatFactory().SetNumber(kvp.Key.Item3).Create();
                    else
                        boat = _boatDictionary[kvp.Key.Item3];
                    item = kvp.Value.ToItem(boat);
                    _sequenceDictionary.Add(kvp.Key, item);
                    writtenLocations.Add(new Tuple<string, string>(kvp.Key.Item1, kvp.Key.Item2));
                }
                // todo - the super user will want to have all changes written
            }

            if(!justRead)
                WriteDropboxFile(writtenLocations.Distinct(), _sequenceDictionary);

            _raceStore.BeginInvokeOnMainThread (() => {
                if (ItemsListUpdated != null)
                    ItemsListUpdated (this, EventArgs.Empty);
            });
        }
		//TODO: tidy up this method!!!
		void ProccessResults (DBRecord[] results)
		{
			taskDictionary.Clear ();

			records = results.ToDictionary (x => x.RecordId.ToString (), x => x);
			lock (locker) {
				Console.WriteLine("ProcessResults" + results.Length.ToString());

				//foreach (var result in results) {
				for (var i = 0; i < results.Length; i++) { var result = results [i];
					var id = result.RecordId.ToString ();
					Console.WriteLine ("id " + id + " " + i);
					TodoItem t;
					taskDictionary.TryGetValue (id, out t);
					if (t == null) {
						t = result.ToTask ();
						taskDictionary.Add (id, t);
					} else {
						t.Update (result);
					}
				}

				store.BeginInvokeOnMainThread (() => {

					Items = taskDictionary.Select (x => x.Value).OrderBy (x => x.Name).ToList();
					Console.WriteLine("Updated Items property: " + Items.Count);


					if (ItemsUpdated != null) {
						Console.WriteLine("TasksUpdated handler called " + Items.Count);
						ItemsUpdated (this, EventArgs.Empty);
					}
				});

				Console.WriteLine ("DONE");
			}
		}