Ejemplo n.º 1
0
        public override async Task <IGenesisExecutionResult> Execute(GenesisContext genesis, string[] args)
        {
            await CommandLoader.InitAsync(args);

            Text.Line();
            Text.Cyan("Genesis"); Text.GrayLine($" {Program.GetVersionDisplayString()}");
            Text.Line();

            foreach (var cmd in CommandLoader.Commands)
            {
                if (cmd.Name == string.Empty) //default command leaves an empty line otherwise
                {
                    continue;
                }

                Text.Green($"\t{cmd.Name}"); Text.WhiteLine($"\t{cmd.Description}");
            }

            Text.Line();

            return(await Task.FromResult(new BlankGenesisExecutionResult()
            {
                Success = true, Message = ""
            }));
        }
Ejemplo n.º 2
0
        public override async Task <ITaskResult> Execute(GenesisContext genesis, string[] args)
        {
            await CommandLoader.InitAsync(args);

            Text.Line();
            Text.Cyan("Genesis"); Text.GrayLine($" {Program.GetVersionDisplayString()}");
            Text.Line();

            foreach (var cmd in CommandLoader.Commands)
            {
                Text.Green($"\t{cmd.Name}"); Text.WhiteLine($"\t{cmd.Description}");
            }
            return(await Task.FromResult(new BlankTaskResult()
            {
                Success = true, Message = ""
            }));
        }