public Boolean TryGetPath(String fileName, String directory, out String path) { if (ModuleHelpers.HasExtension(AllowedExtensions, fileName)) { if (ModuleHelpers.TryFindPath(fileName, directory, out path)) { return(true); } else if (_fs.GetDirectory(fileName).Length == 0) { path = fileName; return(true); } } path = null; return(false); }
public Boolean TryGetPath(String fileName, String directory, out String path) { if (ModuleHelpers.HasExtension(AllowedExtensions, fileName)) { if (!ModuleHelpers.TryFindPath(fileName, directory, out path)) { var baseDir = _fs.GetGacDirectory(); var results = _fs.GetAllFiles(baseDir, fileName); if (results.Length == 0) { return(false); } path = results[0]; } return(true); } path = null; return(false); }
public Boolean TryGetPath(String fileName, String directory, out String path) { path = null; return(ModuleHelpers.HasExtension(AllowedExtensions, fileName) && ModuleHelpers.TryFindPath(fileName, directory, out path)); }