private void AddAllLinesFromHostFileIntoEntryList() { string fileContent = FileModification.ReadFile(FileModification.GetHostFileLocation()); using (StringReader reader = new StringReader(fileContent)) { string line; while ((line = reader.ReadLine()) != null) { HostEntry newEntry = new HostEntry() { Content = line, LineNumber = (CurrentLineNumber + 1), IsEnabled = false }; HostEntries.Add(newEntry); CurrentLineNumber++; } } }
public bool HostFileExists() { return(FileModification.FileExists(FileModification.GetHostFileLocation())); }
private string GetHostFileContent() { return(FileModification.ReadFile(FileModification.GetHostFileLocation())); }