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
fileProviderIFileProviderThe file provider.
processingBehaviorProcessingBehaviorThe processing behavior.
formatUtilitiesFormatUtilitiesContains 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
ProcessingBehavior
Gets the processing behavior.
public ProcessingBehavior ProcessingBehavior { get; }
Property Value
Methods
GetAsync(HttpContext)
Gets the image resolver associated with the context.
public Task<IImageResolver?> GetAsync(HttpContext context)
Parameters
contextHttpContextThe 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
contextHttpContextThe current HTTP request context.