Пример #1
0
        private void StartGeneration(GenerationArgs args, Action <PackageGenerator> action)
        {
            try
            {
                if (args.SourceFolder == "")
                {
                    Console.WriteLine("Please maintain correct source folder which holds all web resources of project.");
                    Environment.Exit(1);
                }

                var generator = new PackageGenerator(args, log);
                action(generator);
            }
            catch (Exception ex)
            {
                log.Error($"Exception occured, terminating. Message: {ex.Message}", ex);
                Environment.Exit(1);
            }
        }
Пример #2
0
 // ReSharper disable once UnusedMember.Global
 public void Generate(GenerationArgs args)
 {
     StartGeneration(args, i => i.GeneratePackagesXml());
 }
 public PackageGenerator(GenerationArgs args, ILog log)
 {
     Args     = args;
     this.log = log;
 }