private void CaptureAliases(Switch rec, IEnumerable <object> attributes) { foreach (Attribute attribute in attributes) { if (attribute is CommandLineAliasAttribute) { rec.AddAlias(((CommandLineAliasAttribute)attribute).Alias); } } }
public void AddSwitch(string[] names, string description) { var rec = new Switch(names[0], description); for (var s = 1; s < names.Length; s++) { rec.AddAlias(names[s]); } this.SwitchList.Add(rec); }