Exemplo n.º 1
0
        private static int Main(string[] args) =>
        Parser.Default.ParseArguments <DocGeneratorOptions>(args)
        .MapResult(
            opts =>
        {
            try
            {
                if (!string.IsNullOrEmpty(opts.BranchName))
                {
                    BranchName = opts.BranchName;
                }

                if (!string.IsNullOrEmpty(opts.DocVersion))
                {
                    DocVersion = opts.DocVersion;
                }

                Console.WriteLine($"Using branch name {BranchName} in documentation");
                Console.WriteLine($"Using doc reference version {DocVersion} in documentation");

                return(LitUp.GoAsync(args).GetAwaiter().GetResult());
            }
            catch (AggregateException ae)
            {
                var ex = ae.InnerException ?? ae;
                Console.WriteLine(ex.Message);
                return(1);
            }
        },
            errs => 1);
Exemplo n.º 2
0
 static int Main(string[] args)
 {
     try
     {
         LitUp.GoAsync(args).Wait();
         return(0);
     }
     catch (AggregateException ae)
     {
         var ex = ae.InnerException ?? ae;
         Console.WriteLine(ex.Message);
         return(1);
     }
 }
Exemplo n.º 3
0
        private static int Main(string[] args)
        {
            try
            {
                if (args.Length > 0)
                {
                    BranchName = args[0];
                }

                Console.WriteLine($"Using branch name {BranchName} in documentation");

                LitUp.GoAsync(args).Wait();
                return(0);
            }
            catch (AggregateException ae)
            {
                var ex = ae.InnerException ?? ae;
                Console.WriteLine(ex.Message);
                return(1);
            }
        }
Exemplo n.º 4
0
 static void Main(string[] args) => LitUp.Go(args);