示例#1
0
        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);
        }
示例#2
0
        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);
        }