private void loadDimensionsFromFile() { var serializer = _unitSystemXmlSerializerRepository.SerializerFor(_dimensionFactory); var xel = XElement.Load(_pkSimConfiguration.DimensionFilePath); serializer.Deserialize(_dimensionFactory, xel, SerializationTransaction.Create(_container)); }
protected override void DoStart() { var serializer = _unitSystemXmlSerializerRepository.SerializerFor(_dimensionFactory); var xel = XElement.Load(_pkSimConfiguration.DimensionFilePath); serializer.Deserialize(_dimensionFactory, xel, SerializationTransaction.Create()); //add pksim specific dimension var inputDose = _dimensionFactory.AddDimension(new BaseDimensionRepresentation(), CoreConstants.Dimension.InputDose, "kg/kg"); inputDose.AddUnit("mg", 1e-6, 0); inputDose.DefaultUnit = inputDose.AddUnit("mg/kg", 1e-6, 0); inputDose.BaseUnit.Visible = false; _dimensionNames = _dimensionFactory.GetDimensionNames().ToList(); _dimensionFactory.AddDimension(Constants.Dimension.NO_DIMENSION); }