Table of Contents

Class FileProviderImageProvider

Namespace
SixLabors.ImageSharp.Web.Providers
Assembly
SixLabors.ImageSharp.Web.dll

Returns images from an IFileProvider abstraction.

public abstract class FileProviderImageProvider : IImageProvider
Inheritance
FileProviderImageProvider
Implements
Derived
Inherited Members

Constructors

FileProviderImageProvider(IFileProvider, ProcessingBehavior, FormatUtilities)

Initializes a new instance of the FileProviderImageProvider class.

protected FileProviderImageProvider(IFileProvider fileProvider, ProcessingBehavior processingBehavior, FormatUtilities formatUtilities)

Parameters

fileProvider IFileProvider

The file provider.

processingBehavior ProcessingBehavior

The processing behavior.

formatUtilities FormatUtilities

Contains various format helper methods based on the current configuration.

Properties

Match

Gets or sets the method used by the resolver to identify itself as the correct resolver to use.

public virtual Func<HttpContext, bool> Match { get; set; }

Property Value

Func<HttpContext, bool>

ProcessingBehavior

Gets the processing behavior.

public ProcessingBehavior ProcessingBehavior { get; }

Property Value

ProcessingBehavior

Methods

GetAsync(HttpContext)

Gets the image resolver associated with the context.

public Task<IImageResolver?> GetAsync(HttpContext context)

Parameters

context HttpContext

The current HTTP request context.

Returns

Task<IImageResolver>

The IImageResolver.

IsValidRequest(HttpContext)

Gets a value indicating whether the current request passes sanitizing rules.

public virtual bool IsValidRequest(HttpContext context)

Parameters

context HttpContext

The current HTTP request context.

Returns

bool

The bool