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
| Edit this page View SourceImageSharpMiddleware(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.
Declaration
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
| 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.  | 
      
| ICacheKey | cacheKey | An ICacheKey instance used for creating cache keys.  | 
      
| 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.  | 
      
| RequestAuthorizationUtilities | requestAuthorizationUtilities | Contains helpers that allow authorization of image requests.  | 
      
Methods
| Edit this page View SourceInvoke(HttpContext)
Performs operations upon the current request.
Declaration
public Task Invoke(HttpContext httpContext)
  Parameters
| Type | Name | Description | 
|---|---|---|
| HttpContext | httpContext | The current HTTP request context.  | 
      
Returns
| Type | Description | 
|---|---|
| Task | The Task.  |