Example #1
0
        public static int Main(string[] args)
        {
            var consoleWriter = new ConsoleWriter();

            try
            {
                var settings = new SaucySettings();

                ILogger logger = new VerboseLogger();

                var restoreVerb = new SaucyCommandLine(
                    new PackagesRestorer(
                        new JsonLoader(),
                        new ProviderMatcher(new GitHubProvider(new FolderSync(logger))),
                        consoleWriter,
                        settings),
                    settings);

                var runner = new Runner();
                runner.Register(restoreVerb);

                var exitCode = runner.Run(args);
                return(exitCode);
            }
            catch (Exception e)
            {
                consoleWriter.Write(e.Message);
                consoleWriter.Write(e.StackTrace);
                return(-1);
            }
        }
Example #2
0
 public SaucyCommandLine(
     IRestorePackages packagesRestorer,
     SaucySettings settings)
 {
     _packagesRestorer = packagesRestorer;
     _settings         = settings;
 }