コード例 #1
0
        public ILookup <int, Mst_mapenemylevel> GetMapenemyLevel(int maparea_id, int mapinfo_no)
        {
            string text = Utils.getTableDirMaster(Mst_mapenemylevel.tableName) + "mst_mapenemylevel/";
            string path = string.Concat(new string[]
            {
                text,
                Mst_mapenemylevel.tableName,
                "_",
                maparea_id.ToString(),
                mapinfo_no.ToString(),
                ".xml"
            });
            IEnumerable <XElement> enumerable = Utils.Xml_Result_To_Path(path, Mst_mapenemylevel.tableName, string.Empty);

            if (enumerable == null)
            {
                return(null);
            }
            List <Mst_mapenemylevel> list = new List <Mst_mapenemylevel>();

            using (IEnumerator <XElement> enumerator = enumerable.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    XElement          current           = enumerator.get_Current();
                    Mst_mapenemylevel mst_mapenemylevel = null;
                    Model_Base.SetMaster <Mst_mapenemylevel>(out mst_mapenemylevel, current);
                    list.Add(mst_mapenemylevel);
                }
            }
            return(Enumerable.ToLookup <Mst_mapenemylevel, int>(list, (Mst_mapenemylevel x) => x.Enemy_list_id));
        }
コード例 #2
0
        public ILookup <int, Mst_mapenemylevel> GetMapenemyLevel(int maparea_id, int mapinfo_no)
        {
            string text = Utils.getTableDirMaster(Mst_mapenemylevel.tableName) + "mst_mapenemylevel/";
            string path = text + Mst_mapenemylevel.tableName + "_" + maparea_id.ToString() + mapinfo_no.ToString() + ".xml";
            IEnumerable <XElement> enumerable = Utils.Xml_Result_To_Path(path, Mst_mapenemylevel.tableName, string.Empty);

            if (enumerable == null)
            {
                return(null);
            }
            List <Mst_mapenemylevel> list = new List <Mst_mapenemylevel>();

            foreach (XElement item in enumerable)
            {
                Mst_mapenemylevel instance = null;
                Model_Base.SetMaster(out instance, item);
                list.Add(instance);
            }
            return(list.ToLookup((Mst_mapenemylevel x) => x.Enemy_list_id));
        }