public void BindCategories(RuleIndex index) { this.boundCategories.Add(this.name); this.boundCategories.Add(this.id); if (this.category != null) { for (int i = 0; i < this.category.Length; i++) { this.boundCategories.Add(this.category[i]); RuleElement category; if (index.TryGetElement(this.category[i], out category)) { this.boundCategories.Add(category.Name); } } } }
public override void Bind(RuleIndex index) { // TODO: What if binding fails? (Only happens for [Dilettante], I think...) index.TryGetElement(this.name, out this.element); }