Table of Contents

Class DefaultInputTypeFactory

Namespace
AngleSharp.Html
Assembly
AngleSharp.dll

Provides string to InputType instance mappings.

public class DefaultInputTypeFactory : IInputTypeFactory
Inheritance
DefaultInputTypeFactory
Implements
Inherited Members
Extension Methods

Constructors

DefaultInputTypeFactory()

public DefaultInputTypeFactory()

Methods

Create(IHtmlInputElement, string)

Creates an InputType provider for the provided element.

public BaseInputType Create(IHtmlInputElement input, string type)

Parameters

input IHtmlInputElement

The input element.

type string

The current value of the type attribute.

Returns

BaseInputType

The InputType provider instance.

CreateDefault(IHtmlInputElement, string)

Creates the default InputType provider for the given input element and input type. By default this is the text input type.

protected virtual BaseInputType CreateDefault(IHtmlInputElement input, string type)

Parameters

input IHtmlInputElement

The input element.

type string

The current value of the type attribute.

Returns

BaseInputType

The InputType provider instance.

Register(string, Creator)

Registers a new creator for the specified input type. Throws an exception if another creator for the given input type is already added.

public void Register(string type, DefaultInputTypeFactory.Creator creator)

Parameters

type string

The input type value.

creator DefaultInputTypeFactory.Creator

The creator to invoke.

Unregister(string)

Unregisters an existing creator for the given input type.

public DefaultInputTypeFactory.Creator? Unregister(string type)

Parameters

type string

The input type value.

Returns

DefaultInputTypeFactory.Creator

The registered creator, if any.