private static int Main(string[] args) { var commandArgs = ParseArguments(args) ?? new ScriptCsArgs { Repl = true }; var compositionRoot = new CompositionRoot(commandArgs); compositionRoot.Initialize(); var logger = compositionRoot.GetLogger(); logger.Debug("Creating ScriptServiceRoot"); var scriptServiceRoot = compositionRoot.GetServiceRoot(); var commandFactory = new CommandFactory(scriptServiceRoot); var command = commandFactory.CreateCommand(commandArgs); var result = command.Execute(); return result == CommandResult.Success ? 0 : -1; }
private static int Main(string[] args) { var commandArgs = ParseArguments(args) ?? new ScriptCsArgs { Repl = true }; var compositionRoot = new CompositionRoot(commandArgs); compositionRoot.Initialize(); var logger = compositionRoot.GetLogger(); logger.Debug("Creating ScriptServiceRoot"); var scriptServiceRoot = compositionRoot.GetServiceRoot(); var commandFactory = new CommandFactory(scriptServiceRoot); var command = commandFactory.CreateCommand(commandArgs); var result = command.Execute(); return(result == CommandResult.Success ? 0 : -1); }