Пример #1
0
        public bool FindFile(string fileName, IDataAccessObject dataAccess)
        {
            if (dataAccess == null)
            {
                throw new ArgumentNullException(nameof(dataAccess));
            }

            var files = dataAccess.GetFiles();

            return(files.Any(x => x == fileName));
        }
Пример #2
0
        public bool FindLogFile(string fileName)
        {
            List <string> files = dataAccessObject.GetFiles();

            foreach (var file in files)
            {
                if (file.Contains(fileName))
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #3
0
        public bool FindLogFile(string fileName, IDataAccessObject dataAccessObject)
        {
            if (dataAccessObject == null)
            {
                throw new ArgumentNullException("dataAccessObject", "Parameter dataAcessObject cannot be null");
            }

            List <string> files = dataAccessObject.GetFiles();

            foreach (var file in files)
            {
                if (file.Contains(fileName))
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #4
0
        public bool FindLogFile(string name)
        {
            var files = dataAccessObject.GetFiles();

            return(files.Any(x => x.Contains(name)));
        }