public HowLeakyEngineModule_Pesticide(HowLeakyEngine sim, HowLeakyInputs_Pesticide inputs) : base(sim) { try { Name = inputs.Name; InputModel = inputs; } catch (Exception ex) { throw ErrorLogger.CreateException(ex); } }
private List <HowLeakyInputs_Pesticide> GeneratePesticideInputs(List <HowLeakyInputs_Pesticide> inputslist, List <ParameterDataSetPtr> pesticideData) { if (pesticideData != null && pesticideData.Count > 0) { var list = new List <HowLeakyInputs_Pesticide>(); foreach (var pesticide in pesticideData) { var inputs = new HowLeakyInputs_Pesticide(pesticide.DataSet.Description); var properties = typeof(HowLeakyInputs_Pesticide).GetProperties().ToList(); var errors = LoadValues(pesticide, inputs, properties); if (errors.Count > 0) { Errors.AddRange(errors); } list.Add(inputs); } return(list); } return(null); }