Class DefaultAttributeSelectorFactory
- Namespace
- AngleSharp.Css
- Assembly
- AngleSharp.dll
Provides string to CSS attribute selector instance mappings.
public class DefaultAttributeSelectorFactory : IAttributeSelectorFactory
- Inheritance
-
DefaultAttributeSelectorFactory
- Implements
- Inherited Members
- Extension Methods
Constructors
DefaultAttributeSelectorFactory()
public DefaultAttributeSelectorFactory()
Methods
Create(string, string, string, string?, bool)
Creates the associated CSS attribute selector.
public ISelector Create(string combinator, string name, string value, string? prefix, bool insensitive)
Parameters
combinator
stringThe used CSS combinator.
name
stringThe name of the attribute.
value
stringThe used value, if any.
prefix
stringThe given prefix, if any.
insensitive
boolShould be evaluated insensitive.
Returns
- ISelector
The associated selector.
CreateDefault(string, string, string?, bool)
Creates the default CSS attribute selector for the given options.
protected virtual ISelector CreateDefault(string name, string value, string? prefix, bool insensitive)
Parameters
name
stringThe name of the attribute.
value
stringThe used value, if any.
prefix
stringThe given prefix, if any.
insensitive
boolShould be evaluated insensitive.
Returns
- ISelector
The selector with the given options.
Register(string, Creator)
Registers a new creator for the specified combinator. Throws an exception if another creator for the given combinator is already added.
public void Register(string combinator, DefaultAttributeSelectorFactory.Creator creator)
Parameters
combinator
stringThe used CSS combinator.
creator
DefaultAttributeSelectorFactory.CreatorThe creator to invoke.
Unregister(string)
Unregisters an existing creator for the given combinator.
public DefaultAttributeSelectorFactory.Creator? Unregister(string combinator)
Parameters
combinator
stringThe used CSS combinator.
Returns
- DefaultAttributeSelectorFactory.Creator
The registered creator, if any.