public void Remove(IPersonEffect effect) { Items.Remove(effect); effect.Changed -= Effect_Changed; var args = new EffectEventArgs(effect); Removed?.Invoke(this, args); }
public void Add(IPersonEffect effect) { Items.Add(effect); effect.Changed += Effect_Changed; var args = new EffectEventArgs(effect); Added?.Invoke(this, args); }
public void Remove(IPersonEffect effect) { if (effect is null) { throw new ArgumentNullException(nameof(effect)); } _items.Remove(effect); effect.Changed -= Effect_Changed; DoRemoved(effect); }
public void Add(IPersonEffect effect) { if (effect is null) { throw new ArgumentNullException(nameof(effect)); } _items.Add(effect); effect.Changed += Effect_Changed; DoAdd(effect); }
private void DoRemoved(IPersonEffect effect) { var args = new EffectEventArgs(effect); Removed?.Invoke(this, args); }
private static bool IsDeaseSymptom(IPersonEffect x) { return(x is DiseaseSymptomEffect); }
public EffectEventArgs(IPersonEffect effect) { Effect = effect; }