示例#1
0
 public void Offer(AbstractBusinessObject obj)
 {
     if (dic.ContainsKey(obj.GetType()))
     {
         return;
     }
     dic.Add(obj.GetType(), obj);
     list.AddLast(obj);
 }
示例#2
0
        public AbstractBusinessObject Poll()
        {
            if (list.Count == 0)
            {
                return(null);
            }
            AbstractBusinessObject obj = list.First.Value;

            list.RemoveFirst();
            dic.Remove(obj.GetType());
            return(obj);
        }
 public Thrift.Protocol.TBase Convert(AbstractBusinessObject o)
 {
     CharBaseData data = o as CharBaseData;
     CharBaseInfo info = new CharBaseInfo();
     info.CharId = data.CharId;
     info.CharName = data.CharName;
     info.Age = data.CharAge;
     info.Fame = data.Fame;
     info.Level = data.Level;
     info.Gender = data.Gender;
     //leo
     info.CharTalentMap = data.CharTalentMap;
     info.Role = data.CharRole;
     info.CharDeail = data.CharDeatail;
     return info;
 }