/// <summary> /// Adds the WelcomePageMiddleware to the pipeline with the given options. /// </summary> /// <param name="builder"></param> /// <param name="options"></param> /// <returns></returns> public static IBuilder UseWelcomePage(this IBuilder builder, WelcomePageOptions options) { if (builder == null) { throw new ArgumentNullException("builder"); } return builder.Use(next => new WelcomePageMiddleware(next, options).Invoke); }
/// <summary> /// Creates a default web page for new applications. /// </summary> /// <param name="next"></param> /// <param name="options"></param> public WelcomePageMiddleware(RequestDelegate next, WelcomePageOptions options) { if (next == null) { throw new ArgumentNullException("next"); } if (options == null) { throw new ArgumentNullException("options"); } _next = next; _options = options; }
/// <summary> /// Creates a default web page for new applications. /// </summary> /// <param name="next"></param> /// <param name="options"></param> public WelcomePageMiddleware([NotNull] RequestDelegate next, [NotNull] WelcomePageOptions options) { _next = next; _options = options; }
/// <summary> /// Adds the WelcomePageMiddleware to the pipeline with the given options. /// </summary> /// <param name="builder"></param> /// <param name="options"></param> /// <returns></returns> public static IApplicationBuilder UseWelcomePage([NotNull] this IApplicationBuilder builder, WelcomePageOptions options) { return builder.Use(next => new WelcomePageMiddleware(next, options).Invoke); }