//private readonly CalcVariableDtoFactory _variableDtoFactory; public CalcModularHouseholdFactory([NotNull] CalcLoadTypeDictionary ltDict, [NotNull] CalcLocationFactory clf, [NotNull] CalcPersonFactory cpf, [NotNull] CalcDeviceFactory cdf, [NotNull] CalcAffordanceFactory caf, [NotNull] CalcTransportationFactory ctf, [NotNull] CalcVariableRepository variableRepository, CalcRepo calcRepo ) { _ltDict = ltDict; _clf = clf; _cpf = cpf; _cdf = cdf; _caf = caf; _ctf = ctf; _calcVariableRepository = variableRepository; _calcRepo = calcRepo; }
public List <CalcLocation> MakeCalcLocations([NotNull][ItemNotNull] List <CalcLocationDto> locations, [NotNull] DtoCalcLocationDict locdict, CalcRepo calcRepo) { var locs = new List <CalcLocation>(); foreach (var t in locations) { // loc anlegen var cloc = new CalcLocation(t.Name, t.Guid); foreach (var locdev in t.LightDevices) { var deviceLoads = CalcDeviceFactory.MakeCalcDeviceLoads(locdev, _calcLoadTypeDict); var deviceName = CalcAffordanceFactory.FixAffordanceName(locdev.Name, _calcRepo.CalcParameters.CSVCharacter); locdev.Name = deviceName; var clightdevice = new CalcDevice(deviceLoads, cloc, locdev, calcRepo); cloc.AddLightDevice(clightdevice); } //deviceLocationDict.Add(cloc, new List<IAssignableDevice>()); locs.Add(cloc); locdict.LocationDtoDict.Add(t, cloc); } return(locs); }