AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="0.9.10" />

 DocumentFactory

Provides the default content-type to document creation mapping.
public sealed delegate Creator : MulticastDelegate

Represents a creator delegate for creating documents.

public DocumentFactory()

Creates a new document from the given arguments using the Content-Type of the provided options.

protected virtual Task<IDocument> CreateDefaultAsync(IBrowsingContext context, CreateDocumentOptions options, CancellationToken cancellationToken)

Creates the default document for the given options.

public void Register(string contentType, Creator creator)

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

public Creator Unregister(string contentType)

Unregisters an existing creator for the given content-type.