예제 #1
0
 private void QueueRemoveFromIndex(ushort[] key)
 {
     if (QueueChanges)
     {
         PendingIndexChanges.Enqueue(new IndexOperation
         {
             Key = key,
             IndexOperationType = IndexOperationType.Remove
         });
     }
     else
     {
         SelectorXref.Remove(key);
     }
 }
예제 #2
0
        /// <summary>
        /// Add an element to the index using a specified index key.
        /// </summary>
        ///
        /// <param name="key">
        /// The key
        /// </param>
        /// <param name="element">
        /// The element target
        /// </param>

        private void QueueAddToIndex(ushort[] key, IDomIndexedNode element)
        {
            if (QueueChanges)
            {
                PendingIndexChanges.Enqueue(new IndexOperation
                {
                    Key   = key,
                    Value = element.IndexReference,
                    IndexOperationType = IndexOperationType.Add
                });
            }
            else
            {
                SelectorXref.Add(key, element.IndexReference);
            }
        }