コード例 #1
0
 /// <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));
 }
コード例 #2
0
 /// <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;
 }