Пример #1
0
 public static IApplicationBuilder UseBasicMiddleware(this IApplicationBuilder builder, BasicUser user)
 {
     if (user == null)
     {
         throw new ArgumentException("需设置Basic用户");
     }
     return(builder.UseMiddleware <BasicUserMiddleWare>(user));
 }
Пример #2
0
 public BasicUserMiddleWare(RequestDelegate next, BasicUser user)
 {
     _next = next;
     _user = user;
 }