Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            using var logger = new SerilogLogger();

            try
            {
                var parser = new Parser(settings => settings.CaseInsensitiveEnumValues = true);
                var result = parser.ParseArguments <ProgramOptions>(args)
                             .WithParsed((ProgramOptions opts) => RunApp(opts, logger))
                             .ThrowOnParseError();
            }
            catch (Exception e)
            {
                logger.Exception(e);
            }
        }