コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }