C# Класс CsQuery.Engine.DomIndexSimple

Simple implementation of DOM index that only stores a reference to the index target. This will perform much better than the ranged index for dom construction & manipulation, but worse for complex queries.
Наследование: IDomIndex, IDomIndexSimple
Показать файл Открыть проект

Открытые методы

Метод Описание
AddToIndex ( IDomIndexedNode element ) : void

Add an element to the index using the default keys for this element.

AddToIndex ( ushort key, IDomIndexedNode element ) : void

Adds an element to the index for the specified key.

Clear ( ) : void

Clears this object to its blank/initial state.

DomIndexSimple ( ) : System

Default constructor for the index

QueryIndex ( ushort subKey ) : IEnumerable

Query the document's index for a subkey.

QueryIndex ( ushort subKey, int depth, bool includeDescendants ) : IEnumerable

Queries the index, returning all matching elements. For the SimpleIndex, this is not implemented.

RemoveFromIndex ( IDomIndexedNode element ) : void

Remove an element from the index.

RemoveFromIndex ( ushort key, IDomIndexedNode element ) : void

Remove an element from the index using its key.

Описание методов

AddToIndex() публичный Метод

Add an element to the index using the default keys for this element.
public AddToIndex ( IDomIndexedNode element ) : void
element IDomIndexedNode /// The element to add ///
Результат void

AddToIndex() публичный Метод

Adds an element to the index for the specified key.
public AddToIndex ( ushort key, IDomIndexedNode element ) : void
key ushort /// The key to remove. ///
element IDomIndexedNode /// The element to add. ///
Результат void

Clear() публичный Метод

Clears this object to its blank/initial state.
public Clear ( ) : void
Результат void

DomIndexSimple() публичный Метод

Default constructor for the index
public DomIndexSimple ( ) : System
Результат System

QueryIndex() публичный Метод

Query the document's index for a subkey.
public QueryIndex ( ushort subKey ) : IEnumerable
subKey ushort /// The subkey to match ///
Результат IEnumerable

QueryIndex() публичный Метод

Queries the index, returning all matching elements. For the SimpleIndex, this is not implemented.
/// Thrown when the requested operation is unimplemented. ///
public QueryIndex ( ushort subKey, int depth, bool includeDescendants ) : IEnumerable
subKey ushort /// The subkey to match. ///
depth int /// The depth. ///
includeDescendants bool /// true to include, false to exclude the descendants. ///
Результат IEnumerable

RemoveFromIndex() публичный Метод

Remove an element from the index.
public RemoveFromIndex ( IDomIndexedNode element ) : void
element IDomIndexedNode /// The element to remove ///
Результат void

RemoveFromIndex() публичный Метод

Remove an element from the index using its key.
public RemoveFromIndex ( ushort key, IDomIndexedNode element ) : void
key ushort /// The key to remove. ///
element IDomIndexedNode /// The element to remove. ///
Результат void