Esempio n. 1
0
        private static ToolOptions ParseArguments(string[] args)
        {
            ResponseSettings settings = new ResponseSettings()
            {
                WorkingDirectory   = Environment.CurrentDirectory,
                IgnoreComments     = true,
                IgnoreMissingFiles = false,
                IgnoreWhitespace   = true,
                DefaultExtension   = ".cli",
            };

            return(ToolOptions.Parse(ApplyDefaultArguments(args), settings));
        }
Esempio n. 2
0
        public static RunnerArgs FromCommandLine(string[] args)
        {
            ToolOptions options = ToolOptions.Parse(args);

            return(new RunnerArgs()
            {
                Command = args.Length > 0 ? args[0] : null,
                Options = options,
                Connection = options["-c", "--connection"]?.Value,
                Namespace = options["-ns", "--namespace"]?.Value,
                Output = options["-o", "--output"]?.Value,
                Verbose = (options["--verbose"] != null),
                IsProxy = IsProxyRunner(),
                Proxy = GetProxyArgs(options),
            });
        }