/// <summary> /// Add an element to the index using the default keys for this element. /// </summary> /// /// <param name="element"> /// The element to add /// </param> public void AddToIndex(IDomIndexedNode element) { if (element.HasChildren) { foreach (DomElement child in ((IDomContainer)element).ChildElements) { AddToIndex(child); } } foreach (var key in element.IndexKeys()) { AddToIndex(key, element); } }
public void RemoveFromIndex(IDomIndexedNode element) { if (element.HasChildren) { foreach (IDomElement child in ((IDomContainer)element).ChildElements) { if (child.IsIndexed) { RemoveFromIndex(child); } } } foreach (string key in element.IndexKeys()) { RemoveFromIndex(key); } }
/// <summary> /// Add an element to the index using the default keys for this element. /// </summary> /// /// <param name="element"> /// The element to add /// </param> public void AddToIndex(IDomIndexedNode element) { ushort[] path = element.IndexReference.NodePath; QueueAddToIndex(RangePath(path), element); foreach (ushort[] key in element.IndexKeys()) { QueueAddToIndex(RangePath(key, path), element); } if (element.HasChildren) { foreach (DomElement child in ((IDomContainer)element).ChildElements) { AddToIndex(child); } } }
/// <summary> /// Remove an element from the index. /// </summary> /// /// <param name="element"> /// The element to remove /// </param> public void RemoveFromIndex(IDomIndexedNode element) { ushort[] path = element.IndexReference.NodePath; QueueRemoveFromIndex(RangePath(null, path)); if (element.HasChildren) { foreach (IDomElement child in ((IDomContainer)element).ChildElements) { if (child.IsIndexed) { RemoveFromIndex(child); } } } foreach (ushort[] key in element.IndexKeys()) { QueueRemoveFromIndex(RangePath(key, path)); } }
/// <summary> /// Remove an element from the index. /// </summary> /// /// <param name="element"> /// The element to remove /// </param> public void RemoveFromIndex(IDomIndexedNode element) { ushort[] path = element.IndexReference.NodePath; QueueRemoveFromIndex(RangePath(null, path)); if (element.HasChildren) { foreach (IDomElement child in ((IDomContainer)element).ChildElements) { if (child.IsIndexed) { RemoveFromIndex(child); } } } foreach (ushort[] key in element.IndexKeys()) { QueueRemoveFromIndex(RangePath(key,path)); } }
/// <summary> /// Add an element to the index using the default keys for this element. /// </summary> /// /// <param name="element"> /// The element to add /// </param> public void AddToIndex(IDomIndexedNode element) { ushort[] path = element.IndexReference.NodePath; QueueAddToIndex(RangePath(path), element); foreach (ushort[] key in element.IndexKeys()) { QueueAddToIndex(RangePath(key,path), element); } if (element.HasChildren) { foreach (DomElement child in ((IDomContainer)element).ChildElements) { AddToIndex(child); } } }
/// <summary> /// Remove an element from the index. /// </summary> /// /// <param name="element"> /// The element to remove /// </param> public void RemoveFromIndex(IDomIndexedNode element) { if (element.HasChildren) { foreach (IDomElement child in ((IDomContainer)element).ChildElements) { if (child.IsIndexed) { RemoveFromIndex(child); } } } foreach (ushort[] key in element.IndexKeys()) { RemoveFromIndex(key, element); } }