GetLogger() public method

public GetLogger ( ) : ILog
return ILog
Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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);
        }