public Parameter(ICreateParameterCatagory catagoryCreator, IParameterCatagory <TArgumentOptions> currentCatagory, PropertyInfo property, uint position) { if (!ArgumentParser.SupportedTypes.Contains(typeof(TArgument))) { throw new ArgumentException( $"{typeof(TArgument).Name} is not supported as a parameter type for {property.Name}. Please use only one of the supported types as found in {nameof(ArgumentParser.SupportedTypes)}", nameof(TArgument)); } if (property.GetMethod == null || property.SetMethod == null) { throw new ArgumentException( $"Property '{property.Name}' must have both a get and set accessor on catagory '{typeof(TArgumentOptions).Name}'.", nameof(property)); } _catagoryCreator = catagoryCreator; _currentCatagory = currentCatagory; Property = property; Name(property.Name.ToUpperInvariant()); ParameterType = typeof(TArgument); Position = position; }
public ParameterCatagory(ICreateParameterCatagory catagoryCreator, string name, uint startAt) { _catagoryCreator = catagoryCreator; CatagoryName = ArgumentHelper.FormatModuleName(name); PositionStart = startAt; }
public MultiParameter(ICreateParameterCatagory catagoryCreator, IParameterCatagory <TArgumentOptions> currentCatagory, PropertyInfo property, uint position) : base(catagoryCreator, currentCatagory, property, position) { IsMultiple = true; }