示例#1
0
        // https://github.com/OctopusDeploy/Octodiff for file sync
        public static void Main(string[] args)
        {
            FtConsole.AddCommand("s.start")
            .Param("port", "")
            .Method(c => FtServer.Start(c.Optional("port", 9001)));

            FtConsole.AddCommand("c.connect")
            .Param("ip", "")
            .Param("port", "")
            .Method(c => FtClient.Connect(c.Optional("ip", "127.0.0.1"), c.Optional("port", 9001)));

            FtConsole.Instance.Start();
        }
示例#2
0
 public static RawConsoleCommand AddCommand(string name, string description = null)
 {
     return(Instance.AddCommand(new RawConsoleCommand(name, description)));
 }