Example #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);
        }
Example #2
0
            public SlidingExpirationItem(TItem item, TimeSpan slidingExpiration, IClock clock)
            {
                _slidingExpiration = slidingExpiration;
                _clock             = clock;

                Item = item;

                _lastAccessed = _clock.GetOffsetNow();
            }
Example #3
0
 public void ResetExpirationWindow()
 {
     _lastAccessed = _clock.GetOffsetNow();
 }