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

Factory class for PseudoSelectors: provides an API for managing selectors.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetInstance ( string name ) : IPseudoSelector

Gets an instance of a named pseudoselector

GetRegisteredType ( string name ) : Type

Gets a registered pseudoclass filter type. If the name is not registered, an exception is thrown.

Register ( Assembly assembly = null ) : int

Registers all classes implementing IPseudoSelector in the namespace CsQuery.Extensions in the passed assembly. If no assembly is provided, then inspects the calling assembly instead.

This method is called when the LookForExtensions startup option is set. (This is the default setting).

Register ( string name, Type type ) : void

Registers a new PseudoSelector type by name.

TryGetInstance ( string name, IPseudoSelector &instance ) : bool

Try to gets an instance of a named pseudoclass filter.

TryGetRegisteredType ( string name, Type &type ) : bool

Try to get the type of a registered pseudoclass filter.

Unregister ( string name ) : bool

Unregisters the names pseudoclass filter.

Приватные методы

Метод Описание
PopulateFromAssembly ( Assembly assy ) : int
PopulateInnerSelectors ( ) : void
PseudoSelectors ( ) : System
ValidateType ( Type value ) : void

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

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

Gets an instance of a named pseudoselector
/// Thrown when the pseudoselector does not exist ///
public GetInstance ( string name ) : IPseudoSelector
name string /// The name of the pseudoselector ///
Результат IPseudoSelector

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

Gets a registered pseudoclass filter type. If the name is not registered, an exception is thrown.
public GetRegisteredType ( string name ) : Type
name string /// The name of the pseudoselector. ///
Результат System.Type

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

Registers all classes implementing IPseudoSelector in the namespace CsQuery.Extensions in the passed assembly. If no assembly is provided, then inspects the calling assembly instead.
This method is called when the LookForExtensions startup option is set. (This is the default setting).
public Register ( Assembly assembly = null ) : int
assembly System.Reflection.Assembly /// The assembly to search. ///
Результат int

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

Registers a new PseudoSelector type by name.
/// Throws an exception when the type does not inherit IPseudoSelector. ///
public Register ( string name, Type type ) : void
name string /// The name of the pseudoselector. ///
type System.Type /// The type. ///
Результат void

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

Try to gets an instance of a named pseudoclass filter.
public TryGetInstance ( string name, IPseudoSelector &instance ) : bool
name string /// The name of the pseudoselector. ///
instance IPseudoSelector /// [out] The new instance. ///
Результат bool

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

Try to get the type of a registered pseudoclass filter.
public TryGetRegisteredType ( string name, Type &type ) : bool
name string /// The name of the pseudoselector. ///
type System.Type /// The type. ///
Результат bool

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

Unregisters the names pseudoclass filter.
public Unregister ( string name ) : bool
name string /// The name of the pseudoselector. ///
Результат bool