public void NotifyChange(Mob mob, string propertyName) { if (MobChanged != null) { MobChangedEventArgs m = new MobChangedEventArgs(mob, propertyName); foreach (System.EventHandler <MobChangedEventArgs> e in MobChanged?.GetInvocationList()) { e.BeginInvoke(this, m, e.EndInvoke, null); } } }
public void NotifyChange(Mob mob, string propertyName) { if (MobChanged != null) { MobChangedEventArgs m = new MobChangedEventArgs(mob, propertyName); foreach (System.EventHandler <MobChangedEventArgs> e in MobChanged?.GetInvocationList()) { Task.Run(() => e.Invoke(this, m)); } } }