public override string ToHelp(OptionArity arity, AbstractType valueType) { StringBuilder help = new StringBuilder(); StringBuilder postfix = new StringBuilder(); if (arity.MinimalOccurs == 0) { postfix.AppendFormat("[={0}]", valueType); } foreach (var sw in Switches) { help.AppendFormat("--{0}{1} ", sw, postfix); } return help.ToString(); }
public abstract string ToHelp(OptionArity arity, AbstractType valueType);
public SwitchesManager(string shortSwitchesString, string longSwitchesString, OptionArity optionArity, AbstractType valueType) { bool intersectionIsEmpty = SwitchesIntersectionIsEmpty(shortSwitchesString, longSwitchesString); if (intersectionIsEmpty) { Short = new ShortSwitches(shortSwitchesString); Long = new LongSwitches(longSwitchesString); } else { throw new DuplicitOptionSwitchException(""); } }
public string ToHelp(OptionArity arity, AbstractType valueType) { StringBuilder help = new StringBuilder(); help.AppendFormat("{0}, {1}", Short.ToHelp(arity, valueType), Long.ToHelp(arity, valueType) ); return help.ToString(); }
public override string ToHelp(OptionArity arity, AbstractType valueType) { StringBuilder help = new StringBuilder(); foreach (var sw in Switches) { help.AppendFormat("-{0}, ", sw); } return help.ToString(); }