public bool NotifyListener(int notifyType) { NotifyArgs arg = new NotifyArgs(this, notifyType, null); if (!allListeners.ContainsKey(arg.NotifyType)) { return(false); } foreach (INotifyListener listener in allListeners[arg.NotifyType]) { listener.OnNotify(arg); } return(true); }
public bool NotifyListener(NotifyArgs arg) { if (arg == null) { return(false); } if (!allListeners.ContainsKey(arg.NotifyType)) { return(false); } foreach (INotifyListener listener in allListeners[arg.NotifyType]) { listener.OnNotify(arg); } return(true); }