public WebsiteVisitCounterMiddleware(RequestDelegate requestDelegate,
                                             IWebsiteVisitService websiteVisitService)
        {
            requestDelegate.CheckArgumentIsNull(nameof(requestDelegate));
            _requestDelegate = requestDelegate;

            websiteVisitService.CheckArgumentIsNull(nameof(websiteVisitService));
            _websiteVisitService = websiteVisitService;
        }
Exemplo n.º 2
0
        public RequestResponseLoggingMiddleware(RequestDelegate next, IOptions <SiteSettings> siteSettings, IBackgroundTaskQueue backgroundTaskQueue, ILogger <RequestResponseLoggingMiddleware> logger)
        {
            _next = next;
            _next.CheckArgumentIsNull(nameof(_next));

            _siteSettings = siteSettings;
            _siteSettings.CheckArgumentIsNull(nameof(_siteSettings));

            _backgroundTaskQueue = backgroundTaskQueue;
            _backgroundTaskQueue.CheckArgumentIsNull(nameof(_backgroundTaskQueue));

            _logger = logger;
            _logger.CheckArgumentIsNull(nameof(_logger));
        }