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
IsAvailable
Gets the status if downloads can be created.
public bool IsAvailable { get; }
Property Value
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
FinishDownloadAsync()
Finishes the download.
protected Task FinishDownloadAsync()
Returns
IsDifferentToCurrentDownloadUrl(Url)
Checks if the given target is different than the current download.
protected bool IsDifferentToCurrentDownloadUrl(Url target)
Parameters
target
Url
Returns
ProcessAsync(ResourceRequest)
Processes the given request asynchronously.
public virtual Task ProcessAsync(ResourceRequest request)
Parameters
request
ResourceRequest
Returns
ProcessResponseAsync(IResponse)
Processes the response.
protected abstract Task ProcessResponseAsync(IResponse response)
Parameters
response
IResponse