public void SaveData(object obj) { databaseSaver.SaveData(obj); mailSender.Send(null); cacheUpdater.UpdateCache(); // I can add more methods }
public void Main(bool b) { var databaseSaver = new DatabaseSaverListener(new DatabaseSaver()); databaseSaver.DataSaved += (sender, args) => { var mailSender = new MailSender(); var cacheUpdated = new CacheUpdater(); mailSender.Send(""); cacheUpdated.UpdateCache(); }; DoSmth(databaseSaver); }
public void Update() { updater.UpdateCache(); }
public void SaveData(object data) { databaseSaver.SaveData(null); mailSender.Send(""); cacheUpdater.UpdateCache(); }
public new void SaveData(object data) { base.SaveData(data); _cacheUpdater.UpdateCache(); }
public void SaveData(object data) { saver.SaveData(data); updater.UpdateCache(); }
public void Update() { var cache = new CacheUpdater(); cache.UpdateCache(); }