Table of Contents

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 string

The used CSS combinator.

name string

The name of the attribute.

value string

The used value, if any.

prefix string

The given prefix, if any.

insensitive bool

Should 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 string

The name of the attribute.

value string

The used value, if any.

prefix string

The given prefix, if any.

insensitive bool

Should 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 string

The used CSS combinator.

creator DefaultAttributeSelectorFactory.Creator

The creator to invoke.

Unregister(string)

Unregisters an existing creator for the given combinator.

public DefaultAttributeSelectorFactory.Creator? Unregister(string combinator)

Parameters

combinator string

The used CSS combinator.

Returns

DefaultAttributeSelectorFactory.Creator

The registered creator, if any.