using System.Collections.Generic; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Io.XmlInput; namespace Deltares.DamEngine.Interface { public static class ConversionHelper { /// /// Converts the type DamProjectType from input object type to Dam Engine type. /// /// Type of the input object. /// Dam Engine type public static DamProjectType ConvertToDamProjectType(InputDamProjectType inputDamProjectType) { var translationTable = new Dictionary() { {InputDamProjectType.Assessment, DamProjectType.Assessment}, {InputDamProjectType.AssessmentRegional, DamProjectType.AssessmentRegional}, {InputDamProjectType.Design, DamProjectType.Design}, {InputDamProjectType.Operational, DamProjectType.Operational}, {InputDamProjectType.NWO, DamProjectType.NWO} }; return translationTable[inputDamProjectType]; } /// /// Converts the type DamProjectType from Dam Engine type to input object type. /// /// Type of the dam project. /// Type of the input object. public static InputDamProjectType ConvertToInputDamProjectType(DamProjectType damProjectType) { var translationTable = new Dictionary() { {DamProjectType.Assessment, InputDamProjectType.Assessment}, {DamProjectType.AssessmentRegional, InputDamProjectType.AssessmentRegional}, {DamProjectType.Design, InputDamProjectType.Design}, {DamProjectType.Operational, InputDamProjectType.Operational}, {DamProjectType.NWO, InputDamProjectType.NWO} }; return translationTable[damProjectType]; } } }