public Argument()

in src/FabActUtil/CommandLineParser/CommandLineArgumentParser.cs [537:574]


            public Argument(CommandLineArgumentAttribute attribute, FieldInfo field, ErrorReporter reporter)
            {
                this.longName = CommandLineArgumentParser.LongName(attribute, field);
                this.description = CommandLineArgumentParser.Description(attribute);
                this.explicitShortName = CommandLineArgumentParser.ExplicitShortName(attribute);
                this.shortName = CommandLineArgumentParser.ShortName(attribute, field);
                this.elementType = ElementType(field);
                this.flags = Flags(attribute, field);
                this.field = field;
                this.seenValue = false;
                this.reporter = reporter;
                this.isDefault = (attribute != null) && (attribute is DefaultCommandLineArgumentAttribute);

                if (this.IsCollection)
                {
                    this.collectionValues = new ArrayList();
                }

                Debug.Assert(
                    !string.IsNullOrEmpty(this.longName),
                    "The long name must be provided for the argument.");

                Debug.Assert(
                    !this.IsCollection || this.AllowMultiple,
                    "Collection arguments must have allow multiple");

                Debug.Assert(
                    !this.Unique || this.IsCollection,
                    "Unique only applicable to collection arguments");

                Debug.Assert(
                    IsValidElementType(this.Type) || IsCollectionType(this.Type),
                    "The argument type is not valid.");

                Debug.Assert(
                    (this.IsCollection && IsValidElementType(this.elementType)) || (!this.IsCollection && this.elementType == null),
                    "The argument type is not valid.");
            }