public void AddToReverseCacheRecords(Address address, GpsPosition gpsPosition, DateTime date)
        {
            Address existingAddress = this.FindAddress(gpsPosition);

            // Remove existing entry
            if (existingAddress != null)
            {
                var query = from x in this.cachedReverseRecords
                            where x.GpsPosition.Latitude.Numeric == gpsPosition.Latitude.Numeric &&
                            x.GpsPosition.Longitude.Numeric == gpsPosition.Longitude.Numeric
                            select x;

                this.cachedReverseRecords.Remove(query.First());
            }

            GeoCacheRecord cachedResult = new GeoCacheRecord();

            cachedResult.Address     = address.Clone() as Address;
            cachedResult.Date        = date;
            cachedResult.GpsPosition = gpsPosition.Clone() as GpsPosition;

            this.cachedReverseRecords.Add(cachedResult);

            this.WriteCachedRecords(this.cacheReverseFileName, this.cachedReverseRecords, false);
        }
        public void AddToForwardCacheRecords(Address address, GpsPosition gpsPosition, DateTime date)
        {
            GpsPosition existingGpsPosition = this.FindGpsPosition(address);

            // Remove existing entry
            if (existingGpsPosition != null)
            {
                var query = from x in this.cachedForwardRecords
                            where x.Address.HierarchicalName.ToLower() == address.HierarchicalName.ToLower()
                            select x;

                this.cachedForwardRecords.Remove(query.First());
            }

            GeoCacheRecord cachedResult = new GeoCacheRecord();

            cachedResult.Address     = address.Clone() as Address;
            cachedResult.Date        = date;
            cachedResult.GpsPosition = gpsPosition.Clone() as GpsPosition;

            this.cachedForwardRecords.Add(cachedResult);

            this.WriteCachedRecords(this.cacheForwardFileName, this.cachedForwardRecords, true);
        }