public CommandLineArgument(CommandLineArgumentAttribute attribute, PropertyInfo propertyInfo)
{
_attribute = attribute;
_propertyInfo = propertyInfo;
_seenValue = false;
_elementType = GetElementType(propertyInfo);
_argumentType = GetArgumentType(attribute, propertyInfo);
if (IsCollection || IsArray) {
_collectionValues = new ArrayList();
} else if (IsNameValueCollection) {
_valuePairs = new NameValueCollection();
}
Debug.Assert(LongName != null && LongName.Length > 0);
Debug.Assert((!IsCollection && !IsArray && !IsNameValueCollection) || AllowMultiple, "Collection and array arguments must have allow multiple");
Debug.Assert(!Unique || (IsCollection || IsArray || IsNameValueCollection), "Unique only applicable to collection arguments");
}