public void WriteLogsToFile(InstallInput input, IEnumerable<LogEntry> entries)
        {
            var document = EntryLogWriter.Write(entries, input.Title() + " at " + DateTime.UtcNow.ToLongDateString());
            document.WriteToFile(input.LogFileFlag);

            ConsoleWriter.Write("Output writing to {0}", input.LogFileFlag.ToFullPath());

            if (input.OpenFlag)
            {
                document.OpenInBrowser();
            }
        }
Beispiel #2
0
        public void WriteLogsToFile(InstallInput input, IEnumerable <LogEntry> entries)
        {
            var document = EntryLogWriter.Write(entries, input.Title() + " at " + DateTime.UtcNow.ToLongDateString());

            document.WriteToFile(input.LogFileFlag);

            Console.WriteLine("Output writing to {0}", input.LogFileFlag.ToFullPath());

            if (input.OpenFlag)
            {
                document.OpenInBrowser();
            }
        }
        private void logEntries(InstallInput input, IEnumerable<LogEntry> entries)
        {
            _logger.WriteLogsToConsole(entries);
            _logger.WriteLogsToFile(input, entries);

            if (entries.Any(x => !x.Success))
            {
                _logger.WriteFailureToConsole();
            }
            else
            {
                _logger.WriteSuccessToConsole();
            }
        }
Beispiel #4
0
        private void logEntries(InstallInput input, IEnumerable <LogEntry> entries)
        {
            _logger.WriteLogsToConsole(entries);
            _logger.WriteLogsToFile(input, entries);

            if (entries.Any(x => !x.Success))
            {
                _logger.WriteFailureToConsole();
            }
            else
            {
                _logger.WriteSuccessToConsole();
            }
        }
        private IEnumerable<LogEntry> execute(InstallInput input)
        {
            ConsoleWriter.Write(input.Title());

            switch (input.ModeFlag)
            {
                case InstallMode.install:
                    return _gateway.Install();

                case InstallMode.check:
                    return _gateway.CheckEnvironment();

                case InstallMode.all:
                    return _gateway.InstallAndCheckEnvironment();
            }

            return new LogEntry[0];
        }
Beispiel #6
0
        private IEnumerable <LogEntry> execute(InstallInput input)
        {
            Console.WriteLine(input.Title());

            switch (input.ModeFlag)
            {
            case InstallMode.install:
                return(_gateway.Install());

            case InstallMode.check:
                return(_gateway.CheckEnvironment());

            case InstallMode.all:
                return(_gateway.InstallAndCheckEnvironment());
            }

            return(new LogEntry[0]);
        }
 // TODO -- this needs to fail!
 public void RunTheInstallation(InstallInput input)
 {
     var entries = execute(input);
     logEntries(input, entries);
 }
Beispiel #8
0
        // TODO -- this needs to fail!
        public void RunTheInstallation(InstallInput input)
        {
            var entries = execute(input);

            logEntries(input, entries);
        }