/// <summary> /// Adds Nancy to the OWIN pipeline. /// </summary> /// <param name="builder">The application builder.</param> /// <param name="options">The Nancy options.</param> /// <returns>IAppBuilder.</returns> public static IAppBuilder UseNancy(this IAppBuilder builder, NancyOptions options = null) { NancyOptions nancyOptions = options ?? new NancyOptions(); AppBuilderExtensions.HookDisposal(builder, nancyOptions); return(builder.Use(NancyMiddleware.UseNancy(nancyOptions), new object[0])); }
/// <summary> /// Adds Nancy to the OWIN pipeline. /// </summary> /// <param name="builder">The application builder delegate.</param> /// <param name="options">The Nancy options.</param> /// <returns>The application builder delegate.</returns> public static Action <MidFunc> UseNancy(this Action <MidFunc> builder, NancyOptions options = null) { var nancyOptions = options ?? new NancyOptions(); builder(NancyMiddleware.UseNancy(nancyOptions).Invoke); return(builder); }