Class ImageSharpMiddleware
- Namespace
- SixLabors.ImageSharp.Web.Middleware
- Assembly
- SixLabors.ImageSharp.Web.dll
Middleware for handling the processing of images via image requests.
public class ImageSharpMiddleware
- Inheritance
-
ImageSharpMiddleware
- Inherited Members
Constructors
ImageSharpMiddleware(RequestDelegate, IOptions<ImageSharpMiddlewareOptions>, ILoggerFactory, IRequestParser, IEnumerable<IImageProvider>, IEnumerable<IImageWebProcessor>, IImageCache, ICacheKey, ICacheHash, CommandParser, FormatUtilities, AsyncKeyReaderWriterLock<string>, RequestAuthorizationUtilities)
Initializes a new instance of the ImageSharpMiddleware class.
public ImageSharpMiddleware(RequestDelegate next, IOptions<ImageSharpMiddlewareOptions> options, ILoggerFactory loggerFactory, IRequestParser requestParser, IEnumerable<IImageProvider> resolvers, IEnumerable<IImageWebProcessor> processors, IImageCache cache, ICacheKey cacheKey, ICacheHash cacheHash, CommandParser commandParser, FormatUtilities formatUtilities, AsyncKeyReaderWriterLock<string> asyncKeyLock, RequestAuthorizationUtilities requestAuthorizationUtilities)
Parameters
nextRequestDelegateThe next middleware in the pipeline.
optionsIOptions<ImageSharpMiddlewareOptions>The middleware configuration options.
loggerFactoryILoggerFactoryAn ILoggerFactory instance used to create loggers.
requestParserIRequestParserAn IRequestParser instance used to parse image requests for commands.
resolversIEnumerable<IImageProvider>A collection of IImageProvider instances used to resolve images.
processorsIEnumerable<IImageWebProcessor>A collection of IImageWebProcessor instances used to process images.
cacheIImageCacheAn IImageCache instance used for caching images.
cacheKeyICacheKeyAn ICacheKey instance used for creating cache keys.
cacheHashICacheHashAn ICacheHashinstance used for calculating cached file names.
commandParserCommandParserThe command parser.
formatUtilitiesFormatUtilitiesContains various format helper methods based on the current configuration.
asyncKeyLockAsyncKeyReaderWriterLock<string>The async key lock.
requestAuthorizationUtilitiesRequestAuthorizationUtilitiesContains helpers that allow authorization of image requests.
Methods
Invoke(HttpContext)
Performs operations upon the current request.
public Task Invoke(HttpContext httpContext)
Parameters
httpContextHttpContextThe current HTTP request context.