Table of Contents

Class BaseRequestProcessor

Namespace
AngleSharp.Io.Processors
Assembly
AngleSharp.dll

Basic implementation of a request processor.

public abstract class BaseRequestProcessor : IRequestProcessor
Inheritance
BaseRequestProcessor
Implements
Inherited Members
Extension Methods

Constructors

BaseRequestProcessor(IResourceLoader)

Creates a new request processor.

public BaseRequestProcessor(IResourceLoader loader)

Parameters

loader IResourceLoader

Properties

Download

Gets the associated download.

public IDownload? Download { get; protected set; }

Property Value

IDownload

IsAvailable

Gets the status if downloads can be created.

public bool IsAvailable { get; }

Property Value

bool

Methods

CancelDownload()

Cancels the current download, if any.

protected void CancelDownload()

DownloadWithCors(CorsRequest)

Fetches the given request with CORS.

protected IDownload DownloadWithCors(CorsRequest request)

Parameters

request CorsRequest

Returns

IDownload

FinishDownloadAsync()

Finishes the download.

protected Task FinishDownloadAsync()

Returns

Task

IsDifferentToCurrentDownloadUrl(Url)

Checks if the given target is different than the current download.

protected bool IsDifferentToCurrentDownloadUrl(Url target)

Parameters

target Url

Returns

bool

ProcessAsync(ResourceRequest)

Processes the given request asynchronously.

public virtual Task ProcessAsync(ResourceRequest request)

Parameters

request ResourceRequest

Returns

Task

ProcessResponseAsync(IResponse)

Processes the response.

protected abstract Task ProcessResponseAsync(IResponse response)

Parameters

response IResponse

Returns

Task