Skip to content

Instantly share code, notes, and snippets.

View ajamaeen's full-sized avatar

Amer Aljamaeen ajamaeen

View GitHub Profile
public class ImageMiddleware
{
private readonly RequestDelegate _next;
private readonly string _path;
public ImageMiddleware(RequestDelegate next, string path)
{
_next = next;
this._path = path;
}
public class ImageMiddleware
{
private readonly RequestDelegate _next;
private readonly string _path;
public ImageMiddleware(RequestDelegate next, string path)
{
_next = next;
this._path = path;
}
public static class ImageMiddlewareExtensions
{
public static IApplicationBuilder
UseImageMiddleware(this IApplicationBuilder builder, string path)
{
builder.UseMiddleware(typeof(ImageMiddleware), path);
return builder;
}
}