コード例 #1
0
        public LookUpManager(PholioReader pholioReader, IAreasReader areasReader,
            IList<int> areaTypeIds, IList<int> categoryTypeIds)
        {
            ageIdToName = pholioReader.GetAllAges().ToDictionary(x => x.Id, x => x.Name);
            sexIdToName = pholioReader.GetAllSexes().ToDictionary(x => x.Id, x => x.Name);
            InitAreaCodeToNameLookUp(areasReader, areaTypeIds);

            var categoryTypes = areasReader.GetCategoryTypes(categoryTypeIds);
            categoryTypeIdToName = categoryTypes.ToDictionary(x => x.Id, x => x.Name);
            categoryTypeIdToCategoryIdToName = GetCategoryTypeIdToCategoryIdToNameLookUp(categoryTypes);

            valueNoteIdToText = pholioReader.GetAllValueNotes().ToDictionary(x => x.Id, x => x.Text);
        }