C# Класс Fizzler.Systems.HtmlAgilityPack.HtmlNodeSelection

Selector API for HtmlNode.
For more information, see Selectors API.
Показать файл Открыть проект

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

Метод Описание
CachableCompile ( string selector ) : IEnumerable>.Func

Compiles a selector. If the selector has been previously compiled then this method returns it rather than parsing and compiling the selector on each invocation.

The cache is per-thread and therefore thread-safe without lock contention.

Compile ( string selector ) : IEnumerable>.Func

Parses and compiles CSS selector text into run-time function.

Use this method to compile and reuse frequently used CSS selectors without parsing them each time.

CreateCachingCompiler ( ) : Func>>

Creates a caching selector compiler that uses a default cache strategy when the selector text is regarded as being orginally case-insensitive.

CreateCachingCompiler ( IDictionary cache ) : Func>>

Creates a caching selector compiler where the compiled selectors are maintained in a user-supplied IDictionary{TKey,TValue} instance.

If cache is null then this method uses a the Dictionary{TKey,TValue} implementation with an ordinally case-insensitive selectors text comparer.

QuerySelector ( this node, string selector ) : HtmlNode

Similar to QuerySelectorAll(HtmlNode,string) except it returns only the first element matching the supplied selector strings.

QuerySelectorAll ( this node, string selector ) : IEnumerable

Retrieves all element nodes from descendants of the starting element node that match any selector within the supplied selector strings.

QuerySelectorAll ( this node, string selector, Func compiler ) : IEnumerable

Retrieves all element nodes from descendants of the starting element node that match any selector within the supplied selector strings. An additional parameter specifies a particular compiler to use for parsing and compiling the selector.

The compiler can be null, in which case a default compiler is used. If the selector is to be used often, it is recommended to use a caching compiler such as the one supplied by CreateCachingCompiler().

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

CachableCompile() публичный статический Метод

Compiles a selector. If the selector has been previously compiled then this method returns it rather than parsing and compiling the selector on each invocation.
The cache is per-thread and therefore thread-safe without lock contention.
public static CachableCompile ( string selector ) : IEnumerable>.Func
selector string
Результат IEnumerable>.Func

Compile() публичный статический Метод

Parses and compiles CSS selector text into run-time function.
Use this method to compile and reuse frequently used CSS selectors without parsing them each time.
public static Compile ( string selector ) : IEnumerable>.Func
selector string
Результат IEnumerable>.Func

CreateCachingCompiler() публичный статический Метод

Creates a caching selector compiler that uses a default cache strategy when the selector text is regarded as being orginally case-insensitive.
public static CreateCachingCompiler ( ) : Func>>
Результат Func>>

CreateCachingCompiler() публичный статический Метод

Creates a caching selector compiler where the compiled selectors are maintained in a user-supplied IDictionary{TKey,TValue} instance.
If cache is null then this method uses a the Dictionary{TKey,TValue} implementation with an ordinally case-insensitive selectors text comparer.
public static CreateCachingCompiler ( IDictionary cache ) : Func>>
cache IDictionary
Результат Func>>

QuerySelector() публичный статический Метод

Similar to QuerySelectorAll(HtmlNode,string) except it returns only the first element matching the supplied selector strings.
public static QuerySelector ( this node, string selector ) : HtmlNode
node this
selector string
Результат HtmlNode

QuerySelectorAll() публичный статический Метод

Retrieves all element nodes from descendants of the starting element node that match any selector within the supplied selector strings.
public static QuerySelectorAll ( this node, string selector ) : IEnumerable
node this
selector string
Результат IEnumerable

QuerySelectorAll() публичный статический Метод

Retrieves all element nodes from descendants of the starting element node that match any selector within the supplied selector strings. An additional parameter specifies a particular compiler to use for parsing and compiling the selector.
The compiler can be null, in which case a default compiler is used. If the selector is to be used often, it is recommended to use a caching compiler such as the one supplied by CreateCachingCompiler().
public static QuerySelectorAll ( this node, string selector, Func compiler ) : IEnumerable
node this
selector string
compiler Func
Результат IEnumerable