Table of Contents

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 IResponse

The response that contains the stream to the resource.

cancel CancellationToken

The 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 string

The type of the resource.

Returns

bool

True if the type is supported, otherwise false.