public void RemoveAddOn(AddOn addOn) { CheckRule(new ConditionMustBeTrueRule(_addOns.Contains(addOn), "add-on not found")); _addOns.Remove(addOn); }
public void NewAddOn(AddOn addOn) { CheckRule(new ConditionMustBeTrueRule(_addOns.All(x => x.Name != addOn.Name), "add on with same name already exists")); _addOns.Add(addOn); }