예제 #1
0
        public static List <PhysicalWallDto> GetDtoPhysicalWallListFromUcPhysicalWallList(IEnumerable <UcPhysicalWall> UcPhysicalWallList)
        {
            List <PhysicalWallDto> dtoPhysicalWallList = new List <PhysicalWallDto>();

            foreach (var UcPhysicalWall in UcPhysicalWallList)
            {
                dtoPhysicalWallList.Add(PhysicalWallMapper.GetDtoPhysicalWallFromUcPhysicalWall(UcPhysicalWall));
            }

            return(dtoPhysicalWallList);
        }
예제 #2
0
        public static ObservableCollection <UcPhysicalWall> GetUcPhysicalWallListFromDtoPhysicalWallList(IEnumerable <UcSourceInstance> sourceInstances, IEnumerable <PhysicalWallDto> dtoPhysicalWallList, float pixelToUnityUnitScale, Vector3 wallCenterLocation, IUnityMainThreadDispatcher dispatcher)
        {
            ObservableCollection <UcPhysicalWall> UcPhysicalWallList = new ObservableCollection <UcPhysicalWall>();

            foreach (var dtoPhysicalWall in dtoPhysicalWallList)
            {
                var matchingSourceInstanceList = sourceInstances.Where(s => s.WallId == dtoPhysicalWall.Id);
                var matchingSourceInstanceOc   = new ObservableCollection <UcSourceInstance>(matchingSourceInstanceList);
                UcPhysicalWallList.Add(PhysicalWallMapper.GetUcPhysicalWallFromDtoPhysicalWallAndSourceInstances(dtoPhysicalWall, matchingSourceInstanceOc, pixelToUnityUnitScale, wallCenterLocation, dispatcher));
            }

            return(UcPhysicalWallList);
        }