private static CommandLine ParseCommandLine(string[] args, ILogger logger) { if (args == null || args.Length == 0) { return(null); } try { return(CommandLineBuilder.FromArguments(args)); } catch (Exception e) { logger.Error("Invalid command line: {0}".FormatWith(e.Message)); } return(null); }