Index: dam engine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs
===================================================================
diff -u
--- dam engine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (revision 0)
+++ dam engine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (revision 441)
@@ -0,0 +1,44 @@
+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];
+ }
+ }
+}
\ No newline at end of file
Index: dam engine/trunk/src/Deltares.DamEngine.Data/General/DamProjectData.cs
===================================================================
diff -u -r435 -r441
--- dam engine/trunk/src/Deltares.DamEngine.Data/General/DamProjectData.cs (.../DamProjectData.cs) (revision 435)
+++ dam engine/trunk/src/Deltares.DamEngine.Data/General/DamProjectData.cs (.../DamProjectData.cs) (revision 441)
@@ -44,7 +44,7 @@
private Dike dike;
private DamProjectCalculationSpecification damProjectCalculationSpecification;
private DikeJob dikeJob;
- private DamProjectType damProjectType = DamProjectType.Calamity;
+ private DamProjectType damProjectType = DamProjectType.Operational;
private ProgramType programType = ProgramType.MStab;
private List jobs = new List();
private SchematizationFactorData schematizationFactorData = new SchematizationFactorData();
@@ -137,16 +137,16 @@
{
get
{
- if (DikeJob == null)
+ if (dikeJob == null)
{
-
+
dikeJob = new DikeJob(dike);
foreach (Location location in dike.Locations)
{
LocationJob locationJob = new LocationJob(location);
dikeJob.Jobs.Add(locationJob);
}
-
+
}
return dikeJob;
Fisheye: Tag 441 refers to a dead (removed) revision in file `dam engine/trunk/src/Deltares.DamEngine.Interface/Interface.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: dam engine/trunk/src/Deltares.DamEngine.Interface/InterfaceException.cs
===================================================================
diff -u -r343 -r441
--- dam engine/trunk/src/Deltares.DamEngine.Interface/InterfaceException.cs (.../InterfaceException.cs) (revision 343)
+++ dam engine/trunk/src/Deltares.DamEngine.Interface/InterfaceException.cs (.../EngineInterfaceException.cs) (revision 441)
@@ -6,12 +6,12 @@
/// Excpetion class for the Interface
///
///
- public class InterfaceException: Exception
+ public class EngineInterfaceException: Exception
{
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The message that describes the error.
- public InterfaceException(string message) : base(message) { }
+ public EngineInterfaceException(string message) : base(message) { }
}
}
Index: dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs
===================================================================
diff -u -r436 -r441
--- dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 436)
+++ dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 441)
@@ -3,6 +3,8 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Deltares.DamEngine.Data.General;
+using Deltares.DamEngine.Io.XmlInput;
namespace Deltares.DamEngine.Interface
{
@@ -11,5 +13,12 @@
///
public class FillDamFromXmlInput
{
+ public static DamProjectData CreateDamProjectData(Input input)
+ {
+ var damProjectData = new DamProjectData();
+ damProjectData.DamProjectType = ConversionHelper.ConvertToDamProjectType(input.DamProjectType);
+ return damProjectData;
+ }
+
}
}
Index: dam engine/trunk/src/Deltares.DamEngine.Data/General/Location.cs
===================================================================
diff -u -r435 -r441
--- dam engine/trunk/src/Deltares.DamEngine.Data/General/Location.cs (.../Location.cs) (revision 435)
+++ dam engine/trunk/src/Deltares.DamEngine.Data/General/Location.cs (.../Location.cs) (revision 441)
@@ -44,7 +44,7 @@
private const double newDikeSlopeInsideMinValue = 0.01;
private const double newDikeSlopeOutsideMinValue = 0.01;
private const double penetrationLenghtMinValue = 0.00;
- private static DamProjectType damProjectType = DamProjectType.Calamity;
+ private static DamProjectType damProjectType = DamProjectType.Operational;
private readonly List scenarios = new List();
private bool areLocalXZObjectsCreated = false;
private double boezemLevelHbp = BoezemLevelNotSetValue;
Index: dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/packages.config
===================================================================
diff -u
--- dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/packages.config (revision 0)
+++ dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/packages.config (revision 441)
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
Index: dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/InterfaceTests.cs
===================================================================
diff -u -r312 -r441
--- dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/InterfaceTests.cs (.../InterfaceTests.cs) (revision 312)
+++ dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/InterfaceTests.cs (.../EngineInterfaceTests.cs) (revision 441)
@@ -3,18 +3,20 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Deltares.DamEngine.Interface;
+
using NUnit.Framework;
namespace Deltares.DamEngine.Interface.Tests
{
[TestFixture]
- public class InterfaceTests
+ public class EngineInterfaceTests
{
[Test]
- [ExpectedException(typeof(InterfaceException))]
+ [ExpectedException(typeof(EngineInterfaceException))]
public void ThrowWhenCalledWithEmptyParameters()
{
- var damInterface = new Interface("");
+ EngineInterface engineInterface = new EngineInterface("");
}
}
}
Index: dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/Deltares.DamEngine.Interface.Tests.csproj
===================================================================
diff -u -r436 -r441
--- dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/Deltares.DamEngine.Interface.Tests.csproj (.../Deltares.DamEngine.Interface.Tests.csproj) (revision 436)
+++ dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/Deltares.DamEngine.Interface.Tests.csproj (.../Deltares.DamEngine.Interface.Tests.csproj) (revision 441)
@@ -48,6 +48,10 @@
MinimumRecommendedRules.ruleset
+
+ ..\packages\CompareNETObjects.3.09.0.0\lib\net45\KellermanSoftware.Compare-NET-Objects.dll
+ True
+
False
..\..\lib\NUnit\nunit.framework.dll
@@ -67,15 +71,30 @@
-
+
+
+ {b7a49c1a-1c91-4d72-aba9-9fbac2509d8e}
+ Deltares.DamEngine.Data
+
{750464a3-cbfa-429f-920e-b430867f1120}
Deltares.DamEngine.Interface
+
+ {1560a423-f338-4dec-8583-1dff7077f104}
+ Deltares.DamEngine.Io
+
+
+
+
+
+
+
+