public void AddVerb(string longName, Action <Verb> config) { Verb.Validate(verbsByName, longName, this.config); Verb v = new(null, longName, FullShortAndLongName, this.config); config(v); verbsByName.Add(longName, v); allVerbs.Add(v); }
public void AddVerb <TVerbClass>(string longName, Action <Verb <TVerbClass> > config) where TVerbClass : class, new() { Verb.Validate(verbsByName, longName, this.config); Verb <TVerbClass> v = new(null, longName, FullShortAndLongName, this.config); config(v); verbsByName.Add(longName, v); allVerbs.Add(v); }