public void LoadUrls(string filename, IFileLoader loader) { var urlstrings = loader.LoadStrings(filename); foreach (var urlstr in urlstrings) { UrlAddress url; if (_parser.TryParse(urlstr, out url)) { _urls.Add(url); } } }