This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ImageMiddleware | |
{ | |
private readonly RequestDelegate _next; | |
private readonly string _path; | |
public ImageMiddleware(RequestDelegate next, string path) | |
{ | |
_next = next; | |
this._path = path; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ImageMiddleware | |
{ | |
private readonly RequestDelegate _next; | |
private readonly string _path; | |
public ImageMiddleware(RequestDelegate next, string path) | |
{ | |
_next = next; | |
this._path = path; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ImageMiddlewareExtensions | |
{ | |
public static IApplicationBuilder | |
UseImageMiddleware(this IApplicationBuilder builder, string path) | |
{ | |
builder.UseMiddleware(typeof(ImageMiddleware), path); | |
return builder; | |
} | |
} |