private void PrintAllCommands() { var sb = new StringBuilder() .AppendLine( $"{_hostEnvironment.ApplicationName} - very important app developed for being very useless. It's just for some very important (but still unknown) purposes.") .AppendLine($"It's run on {_hostEnvironment.EnvironmentName} environment."); sb.AppendLine("Supported commands:"); var commands = _commandFactory.CreateAll(); foreach (var command in commands) { sb.AppendLine($" {command.Command} - {command.Description}"); } Console.WriteLine(sb); }