Class ImageSharpMiddleware
Middleware for handling the processing of images via image requests.
Inherited Members
Namespace: SixLabors.ImageSharp.Web.Middleware
Assembly: SixLabors.ImageSharp.Web.dll
Syntax
public class ImageSharpMiddleware
Constructors
| Improve this Doc View SourceImageSharpMiddleware(RequestDelegate, IOptions<ImageSharpMiddlewareOptions>, ILoggerFactory, IRequestParser, IEnumerable<IImageProvider>, IEnumerable<IImageWebProcessor>, IImageCache, ICacheHash, CommandParser, FormatUtilities, AsyncKeyReaderWriterLock<String>)
Initializes a new instance of the ImageSharpMiddleware class.
Declaration
public ImageSharpMiddleware(RequestDelegate next, IOptions<ImageSharpMiddlewareOptions> options, ILoggerFactory loggerFactory, IRequestParser requestParser, IEnumerable<IImageProvider> resolvers, IEnumerable<IImageWebProcessor> processors, IImageCache cache, ICacheHash cacheHash, CommandParser commandParser, FormatUtilities formatUtilities, AsyncKeyReaderWriterLock<string> asyncKeyLock)
Parameters
Type | Name | Description |
---|---|---|
RequestDelegate | next | The next middleware in the pipeline. |
IOptions<ImageSharpMiddlewareOptions> | options | The middleware configuration options. |
ILoggerFactory | loggerFactory | An ILoggerFactory instance used to create loggers. |
IRequestParser | requestParser | An IRequestParser instance used to parse image requests for commands. |
IEnumerable<IImageProvider> | resolvers | A collection of IImageProvider instances used to resolve images. |
IEnumerable<IImageWebProcessor> | processors | A collection of IImageWebProcessor instances used to process images. |
IImageCache | cache | An IImageCache instance used for caching images. |
ICacheHash | cacheHash | An ICacheHashinstance used for calculating cached file names. |
CommandParser | commandParser | The command parser |
FormatUtilities | formatUtilities | Contains various format helper methods based on the current configuration. |
AsyncKeyReaderWriterLock<String> | asyncKeyLock | The async key lock |
Methods
| Improve this Doc View SourceInvoke(HttpContext)
Performs operations upon the current request.
Declaration
public async Task Invoke(HttpContext context)
Parameters
Type | Name | Description |
---|---|---|
HttpContext | context | The current HTTP request context. |
Returns
Type | Description |
---|---|
Task | The Task. |