public static IApplicationBuilder UseAlaskaCacheUI(this IApplicationBuilder app, Action<CacheUIOptions> setupAction = null) { var options = new CacheUIOptions(); setupAction?.Invoke(options); CacheUIOptionsRepository.Options = options; app.UseMiddleware<CacheUIIndexMiddleware>(options); //app.UseFileServer(new FileServerOptions //{ // RequestPath = string.IsNullOrEmpty(options.RoutePrefix) ? string.Empty : $"/{options.RoutePrefix}", // FileProvider = new EmbeddedFileProvider(typeof(SwaggerUIBuilderExtensions).GetTypeInfo().Assembly, EmbeddedFilesNamespace), //}); return app; }
public CacheUIIndexMiddleware(RequestDelegate next, CacheUIOptions options) : base(next, options) { }
//private readonly RequestDelegate _next; //private readonly CacheUIOptions _options; public CacheUIIndexMiddleware(RequestDelegate next, CacheUIOptions options) : base(next, options) { //_next = next; //_options = options; }