Ejemplo n.º 1
0
        protected override string ExecuteInternal(string[] param)
        {
            var allDescriptions = CommandTypes
                                  .Select(_ => _.CustomAttributes
                                          .FirstOrDefault().ConstructorArguments.ElementAt(2).Value.ToString());

            return(allDescriptions.Aggregate((x, y) => x + "\r\n" + y));
        }
Ejemplo n.º 2
0
 private static string GetAvailableCommandsMessage()
 {
     return("Available commands:\r\n" + string.Join("\r\n",
                                                    CommandTypes.Select(t => "  " + CommandContext.GetCommandName(t)).OrderBy(n => n)));
 }