Ejemplo n.º 1
0
 public UmiMiddleware(RequestDelegate next, UmiMiddlewareOptions options,
                      IViewRenderService viewRenderService, ITempDataProvider tempDataProvider, IRazorViewEngine razorViewEngine)
 {
     this.next              = next;
     this.options           = options;
     this.viewRenderService = viewRenderService;
 }
Ejemplo n.º 2
0
        public static IApplicationBuilder UseUmi(this IApplicationBuilder builder, Action <UmiMiddlewareOptions> configureOptions = null)
        {
            var options = new UmiMiddlewareOptions();

            if (configureOptions != null)
            {
                configureOptions(options);
            }

            return(builder.UseMiddleware <UmiMiddleware>(options));
        }
Ejemplo n.º 3
0
 public UmiMiddleware(RequestDelegate next,
                      UmiMiddlewareOptions options,
                      JsonOutputer jsonOutputer,
                      HtmlOutputer htmlOutputer,
                      AssetOutputer assetOutputer)
 {
     this.next         = next;
     this.options      = options;
     this.jsonOutputer = jsonOutputer;
     this.jsonOutputer.SetOptions(this.options);
     this.htmlOutputer = htmlOutputer;
     this.htmlOutputer.SetOptions(this.options);
     this.assetOutputer = assetOutputer;
     this.assetOutputer.SetOptions(this.options);
 }