コード例 #1
0
        private void loadDimensionsFromFile()
        {
            var serializer = _unitSystemXmlSerializerRepository.SerializerFor(_dimensionFactory);
            var xel        = XElement.Load(_pkSimConfiguration.DimensionFilePath);

            serializer.Deserialize(_dimensionFactory, xel, SerializationTransaction.Create(_container));
        }
コード例 #2
0
        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);
        }