Esempio n. 1
0
        public AbstractRequest GetRequester(LogicType type)
        {
            AbstractRequest request = null;

            requesters.TryGetValue(type, out request);
            return(request);
        }
Esempio n. 2
0
 private void AddRequest(LogicType type, AbstractRequest request)
 {
     if (!requesters.ContainsKey(type))
     {
         requesters.Add(type, request);
     }
 }
Esempio n. 3
0
 public void AddRequest(LogicType type, AbstractRequest request)
 {
     lock (requesters)
     {
         if (!requesters.ContainsKey(type))
         {
             requesters.Add(type, request);
         }
     }
 }
Esempio n. 4
0
        private AbstractRequest RemoveRequest(LogicType type)
        {
            AbstractRequest request = null;

            if (requesters.TryGetValue(type, out request))
            {
                requesters.Remove(type);
            }
            else
            {
                return(null);
            }
            return(request);
        }
Esempio n. 5
0
        public void AddResqueueter(LogicType type, List <string> paramList)
        {
            AbstractRequest request = logicMng.GetRequester(type);

            if (request != null)
            {
                request.SetOwner(this);
                request.SetParams(paramList);
                requester.AddRequest(type, request);
            }
            else
            {
                Log.ErrorLine("add requst fail:requst type {0} params {1}", type, paramList.ToString());
            }
        }