Class DefaultEventFactory
- Namespace
- AngleSharp.Dom.Events
- Assembly
- AngleSharp.dll
Provides string to Event instance creation mappings.
public class DefaultEventFactory : IEventFactory
- Inheritance
-
DefaultEventFactory
- Implements
- Inherited Members
- Extension Methods
Constructors
DefaultEventFactory()
Creates a new event factory.
public DefaultEventFactory()
Methods
Create(string)
Creates a new event.
public Event? Create(string name)
Parameters
name
stringThe name of the event.
Returns
- Event
The created event.
CreateDefault(string)
Creates the default event for the given name. By default this returns null.
protected virtual Event? CreateDefault(string name)
Parameters
name
stringThe name of the event.
Returns
- Event
The created event.
Register(string, Creator)
Registers a new creator for the specified event name. Throws an exception if another creator for the given event name is already added.
public void Register(string name, DefaultEventFactory.Creator creator)
Parameters
name
stringThe name of the event.
creator
DefaultEventFactory.CreatorThe creator to invoke.
Unregister(string)
Unregisters an existing creator for the given event name.
public DefaultEventFactory.Creator? Unregister(string name)
Parameters
name
stringThe name of the event.
Returns
- DefaultEventFactory.Creator
The registered creator, if any.