Exemplo n.º 1
0
        private static TwoWayMap <string, CommandType> PopulateCommandMap()
        {
            var map = new TwoWayMap <string, CommandType>();

            map.Add("ls", CommandType.GetDirectoryContents);
            map.Add("cd", CommandType.ChangeDirectories);
            map.Add("pwd", CommandType.PrintCurrentDirectory);
            map.Add("cat", CommandType.ReadFile);
            map.Add("sh", CommandType.RunShellScript);
            map.Add("./", CommandType.RunExecutable);
            map.Add("help", CommandType.Help);
            map.Add("exit", CommandType.Exit);
            return(map);
        }