internal bool CheckForUpdate(int versionId, Timestamps timestamps) { //Debug.WriteLine(String.Format("##> CheckForUpdate. Id: {0}, time: {1}", versionId, timestamp)); Timestamps?stored; lock (_sync) { stored = Get(versionId); if (stored == null) { Add(versionId, timestamps); return(true); } else { if (stored.Value >= timestamps) { return(false); } Update(versionId, timestamps); return(true); } } }
internal void Update(int versionId, Timestamps timestamps) { _storage[versionId] = timestamps; }