예제 #1
0
 public Nebula.Drop.DropList GetList(string id)
 {
     Nebula.Drop.DropList resultDropList = null;
     if (dropLists.TryGetValue(id, out resultDropList))
     {
         return(resultDropList);
     }
     return(null);
 }
예제 #2
0
        public void Load(string file)
        {
            dropLists = new ConcurrentDictionary <string, Nebula.Drop.DropList>();
            XDocument document = XDocument.Load(file);

            var dump = document.Element("drop_lists").Elements("drop_list").Select(dropListElement => {
                Nebula.Drop.DropList dropList = new Nebula.Drop.DropList(dropListElement);
                dropLists.TryAdd(dropList.id, dropList);
                return(dropList);
            }).ToList();
        }