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)); }
public bool FindLogFile(string fileName) { List <string> files = dataAccessObject.GetFiles(); foreach (var file in files) { if (file.Contains(fileName)) { return(true); } } return(false); }
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); }
public bool FindLogFile(string name) { var files = dataAccessObject.GetFiles(); return(files.Any(x => x.Contains(name))); }