Ejemplo n.º 1
0
        public static HostsFile Load(string path)
        {
            var file = new HostsFile();

            file.ReloadFrom(path);
            return(file);
        }
Ejemplo n.º 2
0
        public static HostsFile Load(TextReader reader)
        {
            var file = new HostsFile();

            file.ReloadFrom(reader);
            return(file);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public static HostsFile Load(TextReader reader)
 {
     var file = new HostsFile();
     file.ReloadFrom(reader);
     return file;
 }
Ejemplo n.º 5
0
 public static HostsFile Load(string path)
 {
     var file = new HostsFile();
     file.ReloadFrom(path);
     return file;
 }