SonarQube.Common.CommandLineParser.CommandLineParser C# (CSharp) Метод

CommandLineParser() публичный Метод

Constructs a command line parser
public CommandLineParser ( IEnumerable descriptors, bool allowUnrecognized ) : System
descriptors IEnumerable List of descriptors that specify the valid argument types
allowUnrecognized bool True if unrecognized arguments should be ignored
Результат System
        public CommandLineParser(IEnumerable<ArgumentDescriptor> descriptors, bool allowUnrecognized)
        {
            if (descriptors == null)
            {
                throw new ArgumentNullException("descriptors");
            }

            if (descriptors.Select(d => d.Id).Distinct(ArgumentDescriptor.IdComparer).Count() != descriptors.Count())
            {
                throw new ArgumentException(Resources.ERROR_Parser_UniqueDescriptorIds, "descriptors");
            }

            this.descriptors = descriptors;
            this.allowUnrecognized = allowUnrecognized;
        }