Exemplo n.º 1
0
        /// <summary>
        /// Parses the specified string arguments into a new instance of the Options class.
        /// </summary>
        /// <param name="args">The arguments to parse.</param>
        /// <returns>A new instance of the Options class initialized from the specidifed string arguments</returns>
        /// <exception cref="ArgumentException">There is an error parsing an argument.</exception>
        public static Options Parse(string[] args)
        {
            var parameters = CommandLineParameters.Parse(args);

            var options = CreateOptions(parameters);

            CheckForInvalidParameters(parameters);

            return(options);
        }