private static CellType GetCellType(MapCell cell, IReadOnlyDictionary<int, List<MapCellData>> cellData) { if (!cellData.ContainsKey(cell.MapInfoId)) return CellType.None; var datas = cellData[cell.MapInfoId]; var data = datas.SingleOrDefault(x => cell.IdInEachMapInfo == x.No); if (data == default(MapCellData)) return CellType.None; return data.EventId.ToCellType(); }