Beispiel #1
0
        protected override int RunImpl(string[] args)
        {
            if (!ParseArguments(args))
            {
                ShowHelp();
                return(1);
            }

            if (Arguments.Help)
            {
                ShowHelp();
                return(0);
            }

            RuntimeSetup runtimeSetup = new RuntimeSetup();

            runtimeSetup.RuntimePath = runtimePath;
            foreach (string pluginDirectory in Arguments.PluginDirectories)
            {
                runtimeSetup.AddPluginDirectory(pluginDirectory);
            }

            RichConsoleLogger runtimeLogger  = new RichConsoleLogger(Console);
            FilteredLogger    filteredLogger = new FilteredLogger(runtimeLogger, Arguments.Verbosity);

            RuntimeBootstrap.Initialize(runtimeSetup, filteredLogger);

            runtimeLogger.Log(LogSeverity.Important, "This program is a stub...");
            return(0);
        }
Beispiel #2
0
        private ILogger CreateLogger()
        {
            var logger = new RichConsoleLogger(Console);

            return(new FilteredLogger(logger, Arguments.Verbosity));
        }