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)); }
private static string GetAvailableCommandsMessage() { return("Available commands:\r\n" + string.Join("\r\n", CommandTypes.Select(t => " " + CommandContext.GetCommandName(t)).OrderBy(n => n))); }