Пример #1
0
        static int Main(string[] args)
        {
            ApplicationStartup.Initialize();

            Parser.Default.ParseArguments <JsonRunCommand, SnapshotRunCommand, ExportRunCommand, QualificationRunCommand>(args)
            .WithParsed <JsonRunCommand>(startCommand)
            .WithParsed <SnapshotRunCommand>(startCommand)
            .WithParsed <ExportRunCommand>(startCommand)
            .WithParsed <QualificationRunCommand>(startCommand)
            .WithNotParsed(err => _valid = false);

            if (!_valid)
            {
                return((int)ExitCodes.Error);
            }

            return((int)ExitCodes.Success);
        }
Пример #2
0
        static int Main(string[] args)
        {
            //starting batch tool with arguments
            var valid = true;

            ApplicationStartup.Initialize();

            Parser.Default.ParseArguments <JsonRunCommand, SnapshotRunCommand, ExportRunCommand>(args)
            .WithParsed <JsonRunCommand>(startCommand)
            .WithParsed <SnapshotRunCommand>(startCommand)
            .WithParsed <ExportRunCommand>(startCommand)
            .WithNotParsed(err => valid = false);

            if (!valid)
            {
                return((int)ExitCodes.Error);
            }

            return((int)ExitCodes.Success);
        }