Ejemplo n.º 1
0
        private static void initializeDimensions()
        {
            var dimensionFactory = IoC.Resolve <IDimensionFactory>();
            var persistor        = IoC.Resolve <IDimensionFactoryPersistor>();

            persistor.Load(dimensionFactory, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Constants.Files.DIMENSIONS_FILE_NAME));
            dimensionFactory.AddDimension(Constants.Dimension.NO_DIMENSION);

            var molarConcentrationDimension = dimensionFactory.Dimension(Constants.Dimension.MOLAR_CONCENTRATION);
            var massConcentrationDimension  = dimensionFactory.Dimension(Constants.Dimension.MASS_CONCENTRATION);

            var concentrationDimensionsMergingInformation = new SimpleDimensionMergingInformation(molarConcentrationDimension, massConcentrationDimension);

            dimensionFactory.AddMergingInformation(concentrationDimensionsMergingInformation);
        }
        private static void initializeDimensions()
        {
            var dimensionFactory = IoC.Resolve <IDimensionFactory>();
            var persistor        = IoC.Resolve <IDimensionFactoryPersistor>();

            persistor.Load(dimensionFactory, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "OSPSuite.Dimensions.xml"));
            dimensionFactory.AddDimension(Constants.Dimension.NO_DIMENSION);
            var dimensionMapper = IoC.Resolve <IDimensionMapper>();

            dimensionMapper.DummyDimensionsForConversion.Each(dimensionFactory.AddDimension);

            var molarConcentrationDimension = dimensionFactory.Dimension(Constants.Dimension.MOLAR_CONCENTRATION);
            var massConcentrationDimension  = dimensionFactory.Dimension(Constants.Dimension.MASS_CONCENTRATION);

            var concentrationDimensionsMergingInformation = new SimpleDimensionMergingInformation(molarConcentrationDimension, massConcentrationDimension);

            dimensionFactory.AddMergingInformation(concentrationDimensionsMergingInformation);
        }
Ejemplo n.º 3
0
        protected override void PerformPostStartProcessing()
        {
            //Create merging dimension info
            var molarToMassConcentrationMerging = new SimpleDimensionMergingInformation(MolarConcentration, MassConcentration);

            _dimensionFactory.AddMergingInformation(molarToMassConcentrationMerging);

            var massToMolarConcentrationMerging = new SimpleDimensionMergingInformation(MassConcentration, MolarConcentration);

            _dimensionFactory.AddMergingInformation(massToMolarConcentrationMerging);

            var aucMolarToAucMassConcentrationMerging = new SimpleDimensionMergingInformation(AucMolar, Auc);

            _dimensionFactory.AddMergingInformation(aucMolarToAucMassConcentrationMerging);

            var molarToMassAmountMerging = new SimpleDimensionMergingInformation(Amount, Mass);

            _dimensionFactory.AddMergingInformation(molarToMassAmountMerging);
        }