Exemple #1
0
        public static int Main(string[] args)
        {
            if (args.Length == 0)
            {
                PrintAvailableTools();

                return(-1);
            }

            string        command = args[0];
            ToolAttribute?tool    = ToolProvider.GetTool(command);

            if (tool is null)
            {
                Console.WriteLine($"{CoreResources.UNKNOWN_COMMAND} `{command}`");
                PrintAvailableTools();

                return(-1);
            }

            return(tool.Run(args[1..]));
Exemple #2
0
 public static int Run(this ToolAttribute tool, string[] args)
 {
     return(ToolProvider.RunTool(tool, args));
 }