public override void Merge(DatabaseTask task) { var t = (TouchReferenceDocumentIfChangedTask)task; foreach (var kvp in t.ReferencesToCheck) { Etag etag; if (ReferencesToCheck.TryGetValue(kvp.Key, out etag) == false) { ReferencesToCheck[kvp.Key] = kvp.Value; } else { ReferencesToCheck[kvp.Key] = etag.CompareTo(kvp.Value) < 0 ? etag : kvp.Value; } } }
public override void Merge(DatabaseTask task) { var t = (TouchMissingReferenceDocumentTask)task; foreach (var kvp in t.MissingReferences) { HashSet <string> set; if (MissingReferences.TryGetValue(kvp.Key, out set) == false) { MissingReferences[kvp.Key] = kvp.Value; } else { set.UnionWith(kvp.Value); } } }
public override void Merge(DatabaseTask task) { var t = (TouchMissingReferenceDocumentTask)task; foreach (var kvp in t.MissingReferences) { HashSet<string> set; if (MissingReferences.TryGetValue(kvp.Key, out set) == false) { MissingReferences[kvp.Key] = kvp.Value; } else { set.UnionWith(kvp.Value); } } }
public abstract void Merge(DatabaseTask task);
public override void Merge(DatabaseTask task) { var removeFromIndexTask = ((RemoveFromIndexTask)task); Keys.UnionWith(removeFromIndexTask.Keys); }