コード例 #1
0
        public IpFilterMiddleware(
            RequestDelegate next,
            ILogger <IpFilterMiddleware> logger,
            IEnumerable <IpFilter> ipLists,
            IpFilterMiddlewareOptions options
            )
        {
            _ipLists = ipLists;
            _options = options;
            _logger  = logger;

            _next = next;
        }
コード例 #2
0
 public static IApplicationBuilder UseIpFilter(this IApplicationBuilder builder,
                                               IEnumerable <IpFilter> ipWhiteLists, IpFilterMiddlewareOptions options)
 {
     return(builder.UseMiddleware <IpFilterMiddleware>(ipWhiteLists, options));
 }