Exemplo n.º 1
0
        private void HandleTransferError(ITftpTransfer transfer, TftpTransferError error)
        {
            _logger.LogWarning(
                "Transfer {0} has failed with an error: {1}.",
                _transferId,
                error.ToString());

            var evt = new TftpDownloadFailedEvent(
                _clientInfo,
                _clock.GetOffsetNow(),
                _transferId,
                transfer.Filename,
                error.ToString());

            _logService.LogEvent(evt);
        }
Exemplo n.º 2
0
            public SlidingExpirationItem(TItem item, TimeSpan slidingExpiration, IClock clock)
            {
                _slidingExpiration = slidingExpiration;
                _clock             = clock;

                Item = item;

                _lastAccessed = _clock.GetOffsetNow();
            }
Exemplo n.º 3
0
 public void ResetExpirationWindow()
 {
     _lastAccessed = _clock.GetOffsetNow();
 }