Example #1
0
 public LoggingFilter(
     IScopeInformation scopeInformation,
     ILogger <LoggingFilter> logger)
 {
     _scopeInformation = scopeInformation;
     _logger           = logger;
 }
Example #2
0
 public TrackActionPerformanceFilter(
     ILogger <TrackActionPerformanceFilter> logger,
     IScopeInformation scopeInfo)
 {
     _logger    = logger;
     _scopeInfo = scopeInfo;
 }
Example #3
0
 public BookController(IBookRepository bookRepo, IBookLogic bookLogic,
                       ILogger <BookController> logger, IScopeInformation scopeInfo)
 {
     _bookRepo  = bookRepo;
     _bookLogic = bookLogic;
     _logger    = logger;
     _scopeInfo = scopeInfo;
 }
Example #4
0
 public ApiExceptionMiddleware(RequestDelegate next,
                               ILogger <ApiExceptionMiddleware> logger,
                               ApiExceptionOptions options,
                               IScopeInformation scopeInformation)
 {
     _next             = next;
     _logger           = logger;
     _options          = options;
     _scopeInformation = scopeInformation;
 }
Example #5
0
        public async Task Invoke(HttpContext context, IScopeInformation scopeInfo /* other dependencies */)
        {
            using IDisposable hostScope    = _logger.BeginScope(scopeInfo.HostScopeInfo);
            using IDisposable requestScope = _logger.BeginScope(scopeInfo.RequestScopeInfo);

            try
            {
                await _next(context);
            }
            catch (Exception ex)
            {
                await HandleExceptionAsync(context, ex, hostScope, requestScope);
            }
            finally
            {
                hostScope.Dispose();
                requestScope.Dispose();
            }
        }
Example #6
0
 public UsersController(IUsersService usersService, ILogger <UsersController> logger, IScopeInformation scopeInfo)
 {
     _usersService = usersService;
     _logger       = logger;
     _scopeInfo    = scopeInfo;
 }
 public TrackPerformanceFilter(ILogger <TrackPerformanceFilter> logger, IScopeInformation scopeInformation)
 {
     _logger           = logger;
     _scopeInformation = scopeInformation;
 }
Example #8
0
 public BookListBadModel(ILogger <BookListModel> logger, IScopeInformation scope) : base(logger, scope)
 {
     _logger = logger;
 }
 public AboutModel(ILogger <AboutModel> logger, IScopeInformation scope) : base(logger, scope)
 {
     _logger = logger;
 }
 public BookListBadModel(IHttpClientFactory httpClientFactory, ILogger <BookListModel> logger, IScopeInformation scope) : base(logger, scope)
 {
     _httpClientFactory = httpClientFactory;
 }
Example #11
0
 protected BasePageModel(ILogger logger, IScopeInformation scopeInfo)
 {
     _logger    = logger;
     _scopeInfo = scopeInfo;
     _timer     = new Stopwatch();
 }
Example #12
0
        //private readonly Stopwatch _timer;

        public BookListModel(ILogger <BookListModel> logger, IScopeInformation scope) : base(logger, scope)
        {
            _logger = logger;
            //_timer = new Stopwatch();
        }