public static string Map(CapeOpenCalculationType type) { switch (type) { case CapeOpenCalculationType.Mixture: return("Mixture"); case CapeOpenCalculationType.Pure: return("Pure"); case CapeOpenCalculationType.Nothing: return("null"); default: throw new CapeOpenException(); } }
public void CalculateProperty(CapeOpenThermoMaterialPropertyType property, CapeOpenPhaseType phase, CapeOpenCalculationType calculationType) { string[] zType = new string[1]; zType[0] = CapeOpenThermoMaterialPropertyTypeHelper.Map(property); string[] zPhase = new string[1]; zPhase[0] = CapeOpenPhaseTypeHelper.Map(phase); string zCalculationType = CapeOpenCalculationTypeHelper.Map(calculationType); //mConnectedObject.CalcProp(CapeOpenThermoMaterialPropertyTypeHelper.Map(property), CapeOpenPhaseTypeHelper.Map(phase), "Mixture"); if (calculationType != CapeOpenCalculationType.Nothing) { mConnectedObject.CalcProp(zType, zPhase, zCalculationType); } else { mConnectedObject.CalcProp(zType, zPhase, null); } }