C# Class CsQuery.Engine.DomIndexNone

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.
Inheritance: IDomIndex
Exibir arquivo Open project: prepare/HTML-Renderer

Public Methods

Method Description
AddToIndex ( IDomIndexedNode element ) : void

Adds an element to the index.

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.

DomIndexNone ( ) : 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.

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.

Method Details

AddToIndex() public method

Adds an element to the index.
public AddToIndex ( IDomIndexedNode element ) : void
element IDomIndexedNode /// The element to add. ///
return void

AddToIndex() public method

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. ///
return void

Clear() public method

Clears this object to its blank/initial state.
public Clear ( ) : void
return void

DomIndexNone() public method

Default constructor for the index
public DomIndexNone ( ) : System
return System

QueryIndex() public method

Query the document's index for a subkey.
public QueryIndex ( ushort subKey ) : IEnumerable
subKey ushort /// The subkey to match ///
return IEnumerable

QueryIndex() public method

Queries the index, returning all matching elements.
/// 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. ///
return IEnumerable

RemoveFromIndex() public method

Remove an element from the index.
public RemoveFromIndex ( IDomIndexedNode element ) : void
element IDomIndexedNode /// The element to remove ///
return void

RemoveFromIndex() public method

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. ///
return void