public bool Add(SpellBuilder spell) { if (this.spells.Contains(spell)) { return(false); } else { this.spells.Add(spell); spell.RegisterView(spellSecondaryView); NotifyAdd(); return(true); } }
public SpellBuilder[] ToArray() { if (this.Count > 0) { var res = new SpellBuilder[this.Count]; for (int i = 0; i < this.Count; i++) { res[i] = this[i]; } return(res); } return(new SpellBuilder[] { }); }
public SpellBuilder Remove(SpellBuilder spell) { NotifyAdd(); return(RemoveAt(this.spells.IndexOf(spell))); }
public bool Contains(SpellBuilder spell) { return(this.spells.Contains(spell)); }