Base class for a tag manipulation command.
コード例 #1
0
ファイル: Program.cs プロジェクト: TheGuardians/TagTool
        private static void ExecuteCommand(Command command, List<string> args)
        {
            if (command.Execute(args))
                return;

            Console.WriteLine("{0}: {1}", command.Name, command.Description);
            Console.WriteLine();
            Console.WriteLine("Usage:");
            Console.WriteLine("{0}", command.Usage);
            Console.WriteLine();
            Console.WriteLine("Use \"help {0}\" for more information.", command.Name);
        }
コード例 #2
0
 /// <summary>
 /// Adds a command to the context.
 /// </summary>
 /// <param name="command">The command to add.</param>
 public void AddCommand(Command command)
 {
     _commandsByName[command.Name] = command;
 }