Class FileProviderImageProvider
Returns images from an IFileProvider abstraction.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Web.Providers
Assembly: SixLabors.ImageSharp.Web.dll
Syntax
public abstract class FileProviderImageProvider : IImageProvider
Constructors
| Improve this Doc View SourceFileProviderImageProvider(IFileProvider, ProcessingBehavior, FormatUtilities)
Initializes a new instance of the FileProviderImageProvider class.
Declaration
protected FileProviderImageProvider(IFileProvider fileProvider, ProcessingBehavior processingBehavior, FormatUtilities formatUtilities)
Parameters
Type | Name | Description |
---|---|---|
IFileProvider | fileProvider | The file provider. |
ProcessingBehavior | processingBehavior | The processing behavior. |
FormatUtilities | formatUtilities | Contains various format helper methods based on the current configuration. |
Properties
| Improve this Doc View SourceMatch
Gets or sets the method used by the resolver to identify itself as the correct resolver to use.
Declaration
public virtual Func<HttpContext, bool> Match { get; set; }
Property Value
Type | Description |
---|---|
Func<HttpContext, Boolean> |
ProcessingBehavior
Gets the processing behavior.
Declaration
public ProcessingBehavior ProcessingBehavior { get; }
Property Value
Type | Description |
---|---|
ProcessingBehavior |
Methods
| Improve this Doc View SourceGetAsync(HttpContext)
Gets the image resolver associated with the context.
Declaration
public Task<IImageResolver> GetAsync(HttpContext context)
Parameters
Type | Name | Description |
---|---|---|
HttpContext | context | The current HTTP request context. |
Returns
Type | Description |
---|---|
Task<IImageResolver> | The IImageResolver. |
IsValidRequest(HttpContext)
Gets a value indicating whether the current request passes sanitizing rules.
Declaration
public virtual bool IsValidRequest(HttpContext context)
Parameters
Type | Name | Description |
---|---|---|
HttpContext | context | The current HTTP request context. |
Returns
Type | Description |
---|---|
Boolean |