Exemplo n.º 1
0
 public UserParser(ILogger <UserParser> logger, DownloadService downloadService, SearchParser searchParser, ThreadParser threadParser)
 {
     _downloadService = downloadService;
     _searchParser    = searchParser;
     _threadParser    = threadParser;
     _logger          = logger;
     _userIdCacheLock = new LoggedReaderWriterLock(nameof(_userIdCacheLock), x => _logger.LogDebug(x));
 }
        public UserDataProvider(ILogger<UserDataProvider> logger, IOptions<StorageOptions> storageOptions)
        {
            _logger = logger;
            _storageOptions = storageOptions.Value;

            _lock = new LoggedReaderWriterLock(
                nameof(UserDataProvider),
                x => _logger.LogDebug(x));
        }
        public EventProvider(ILogger <EventProvider> logger, ThreadParser threadParser)
        {
            _logger       = logger;
            _threadParser = threadParser;

            _lock = new LoggedReaderWriterLock(
                nameof(EventProvider),
                x => _logger.LogDebug(x));
        }
 public DownloadService(
     ILogger <DownloadService> logger,
     IOptions <SharedLoginOptions> sharedLoginOptions)
 {
     _anonymousHttpClientLock = new("Anonymous HttpClient", x => logger.LogDebug(x));
     _sharedHttpClientLock    = new("Shared HttpClient", x => logger.LogDebug(x));
     _sharedLoginOptions      = sharedLoginOptions.Value;
     _utf8Encoding            = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);
 }