GetLogger() public method

public GetLogger ( ) : ILog
return ILog
示例#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;
        }
示例#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);
        }