void Bind(object commando, PropertyInfo property, List <CommandLineParameter> parameters, ArgumentAttribute attribute, BindingContext context) { if (attribute is PositionalArgumentAttribute) { BindPositional(commando, property, parameters, (PositionalArgumentAttribute)attribute, context); } else if (attribute is NamedArgumentAttribute) { BindNamed(commando, property, parameters, (NamedArgumentAttribute)attribute, context); } else { throw Ex("Don't know the attribute type {0}", attribute.GetType().Name); } }