Exemple #1
0
        static void Main(string[] args)
        {
            PasswordDictionary           dictionary = new PasswordDictionary();
            Dictionary <string, Command> commandMap = new Dictionary <string, Command>();

            commandMap.Add("add", new AddCommand());
            commandMap.Add("help", new HelpCommand());
            commandMap.Add("remove", new RemoveCommand());
            commandMap.Add("update", new UpdateCommand());

            while (true)
            {
                Console.Write("Cmd: ");
                string cmd    = Console.ReadLine();
                Tokens tokens = new Tokens(cmd);


                commandMap[$"{tokens.advance()}"].Run(tokens, dictionary);
            }
        }
Exemple #2
0
 public override void Run(Tokens xTokens, PasswordDictionary xDictionary)
 {
     Console.WriteLine("AddCommand!");
 }
Exemple #3
0
 public virtual void Run(Tokens xTokens, PasswordDictionary xDictionary)
 {
 }