Example #1
0
        public static IApplicationBuilder UseBasicMiddleware(this IApplicationBuilder builder, BasicUser user)
        {
            if (user == null)
            {
                throw  new ArgumentException("需设置Bsaic用户");
            }

            return(builder.UseMiddleware <BasicMiddleware>(user));
        }
Example #2
0
 public BasicMiddleware(RequestDelegate next, BasicUser user)
 {
     this._next = next;
     this._user = user;
 }