public static HostsFile Load(string path) { var file = new HostsFile(); file.ReloadFrom(path); return(file); }
public static HostsFile Load(TextReader reader) { var file = new HostsFile(); file.ReloadFrom(reader); return(file); }
static void Run(string commandLine) { var cmdLine = CommandLine.Parse(commandLine); var command = CommandFactory.Find(cmdLine.CommandName); if (command == null) { throw new InvalidOperationException("Unknown command: " + cmdLine.CommandName); } var context = new CommandExecutionContext(HostsFile.Load()); command.Execute(cmdLine, context); }
public static HostsFile Load(TextReader reader) { var file = new HostsFile(); file.ReloadFrom(reader); return file; }
public static HostsFile Load(string path) { var file = new HostsFile(); file.ReloadFrom(path); return file; }