Ejemplo n.º 1
0
        private void PrintEffectivePack(Context context)
        {
            var options    = context.Options;
            var settings   = context.Settings;
            var fileSystem = context.FileSystem;

            var builder = new PackBuilder();

            builder.ClonePropertiesFrom(context.Pack);

            Queue <Exception> exceptions = new Queue <Exception>();
            var success = false;

            foreach (var uri in settings.RepositoryUris)
            {
                try
                {
                    builder.ResolveDependencies(uri);
                    success = true;
                    break;
                }
                catch (Exception ex)
                {
                    exceptions.Enqueue(ex);
                }
            }

            if (!success)
            {
                Console.WriteLine("[resolver]Não foi possível resolver dependências.");
                while (exceptions.Count > 0)
                {
                    var ex = exceptions.Dequeue();
                    if (Program.Verbose)
                    {
                        Program.DumpException(ex);
                    }
                    else
                    {
                        Console.WriteLine("[resolver][err]" + ex.Message);
                    }
                }
            }

            builder.ResolveDistribution(fileSystem);
            if (options.SetVersionOn)
            {
                builder.SetVersion(options.SetVersionValue);
            }

            var effectivePack = builder.Pack;

            var printer = new PackPrinter();

            printer.PrintPack(effectivePack);
        }
Ejemplo n.º 2
0
        private void PrintPack(Context context)
        {
            var printer = new PackPrinter();

            printer.PrintPack(context.Pack);
        }