Beispiel #1
0
        public List <Record> GetCachedRecords(Objects.Version version, bool testFailure = false)
        {
            List <Record> results;

            if (LocalDatabase.GetCachedRecords(version.ID, out results))
            {
                return(results);
            }
            results = GetRecords(version, testFailure);
            try
            {
                if (!testFailure)
                {
                    LocalDatabase.CacheRecords(version.ID, results);
                }
            }
            catch (InvalidOperationException)
            {
                // ignore
            }
            return(results);
        }