コード例 #1
0
        public LoggerMiddleware(ILogger <LoggerMiddleware> logger, IOptions <LoggerMiddlewareOptions> options)
        {
            _logger  = logger ?? throw new ArgumentNullException(nameof(logger));
            _options = options?.Value ?? throw new ArgumentNullException(nameof(options));

            _recyclableMemoryStreamManager = new RecyclableMemoryStreamManager();
        }
コード例 #2
0
 public static IAppBuilder UseLoggerMiddleware(this IAppBuilder app, LoggerMiddlewareOptions options)
 {
     return(app.Use <LoggerMiddleware>(options));
 }