Interface IResourceService<TResource>
- Namespace
- AngleSharp.Media
- Assembly
- AngleSharp.dll
Represents a service to create a specific resource handler.
public interface IResourceService<TResource> where TResource : IResourceInfo
Type Parameters
TResource
- Extension Methods
Methods
CreateAsync(IResponse, CancellationToken)
Tries to create an inspector for the given resource.
Task<TResource> CreateAsync(IResponse response, CancellationToken cancel)
Parameters
response
IResponseThe response that contains the stream to the resource.
cancel
CancellationTokenThe token for cancelling the task.
Returns
- Task<TResource>
A task that finishes with an inspector for the resource.
SupportsType(string)
Checks if the given type is supported.
bool SupportsType(string mimeType)
Parameters
mimeType
stringThe type of the resource.
Returns
- bool
True if the type is supported, otherwise false.