コード例 #1
0
        private bool IsOlderThanMaxFileAge()
        {
            if (_maxFileAgeOfPaketExeInMinutes <= 0)
            {
                return(true);
            }

            try
            {
                var lastModification = _fileProxy.GetLastWriteTime(_target);

                return(DateTimeProxy.Now > lastModification.AddMinutes(_maxFileAgeOfPaketExeInMinutes));
            }
            catch (FileNotFoundException)
            {
                return(true);
            }
        }