private List <CalcGenerator> MakeGenerators([NotNull][ItemNotNull] List <CalcGeneratorDto> generators, [NotNull] HouseholdKey householdKey) //, { var cgens = new List <CalcGenerator>(); var gendevcategoryGuid = Guid.NewGuid().ToStrGuid(); var genlocGuid = Guid.NewGuid().ToStrGuid(); foreach (var gen in generators) { //CalcLoadType lt = _ltDict.GetLoadtypeByGuid(gen.LoadType.Guid); CalcDeviceDto deviceDto = new CalcDeviceDto(gen.Name, gendevcategoryGuid, householdKey, OefcDeviceType.Generator, "Generators", "", gen.Guid, genlocGuid, "Generators"); var cgen = new CalcGenerator( _calcRepo.Odap, _ltDict.GetCalcLoadTypeByLoadtype(gen.LoadType), gen.Values, _calcRepo.CalcParameters, deviceDto); cgens.Add(cgen); foreach (var set in _calcDeviceTaggingSets.AllCalcDeviceTaggingSets) { set.AddTag(gen.Name, "House Devices"); } } return(cgens); }
static void Main(string[] args) { if (args.Length == 0) { ShowHelp(); return; } if (args[0] == "/html" && args.Length == 3) { var contentBuilder = new ContentBuilder(args[1]); var formContent = contentBuilder.Build(); var htmlGen = new HtmlGenerator(formContent, GetFullOutDir(args[2])); htmlGen.Do(); var calcGen = new CalcGenerator(formContent, GetFullOutDir(args[2])); calcGen.Do(); return; } ShowHelp(); }