DefaultDocumentFactory
Provides the default content-type to document creation mapping.
Represents a creator delegate for creating documents.
public DefaultDocumentFactory()
protected static Task<IDocument> LoadHtmlAsync(IBrowsingContext context, CreateDocumentOptions options, CancellationToken cancellationToken)
Loads the response as an HTML document.
protected static Task<IDocument> LoadTextAsync(IBrowsingContext context, CreateDocumentOptions options, CancellationToken cancellationToken)
Loads the response as a plain text (formatted as HTML) document.
public virtual Task<IDocument> CreateAsync(IBrowsingContext context, CreateDocumentOptions options, CancellationToken cancellationToken)
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.
Registers a new creator for the specified content-type.
Throws an exception if another creator for the given
content-type is already added.
Unregisters an existing creator for the given content-type.