/// <summary> /// Adds the WelcomePageMiddleware to the pipeline with the given options. /// </summary> /// <param name="builder"></param> /// <param name="options"></param> /// <returns></returns> public static IAppBuilder UseApiIndexPage( this IAppBuilder builder, ApiIndexPageOptions options) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } return(builder.Use((object)typeof(ApiIndexPageMiddleware), (object)options)); }
/// <summary>Creates a default web page for new applications.</summary> /// <param name="next"></param> /// <param name="options"></param> public ApiIndexPageMiddleware( Func <IDictionary <string, object>, Task> next, ApiIndexPageOptions options) { if (next == null) { throw new ArgumentNullException(nameof(next)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } this._next = next; this._options = options; }