Index: Riskeer/Storage/src/Riskeer.Storage.Core/Create/StructuresFailureMechanismSectionResultCreateExtensions.cs
===================================================================
diff -u -re6b6b39b1a5f22ede35c53c3b16f571f63e59717 -r2c97eb0986e186670e4978a85b62b50ff584bbad
--- Riskeer/Storage/src/Riskeer.Storage.Core/Create/StructuresFailureMechanismSectionResultCreateExtensions.cs (.../StructuresFailureMechanismSectionResultCreateExtensions.cs) (revision e6b6b39b1a5f22ede35c53c3b16f571f63e59717)
+++ Riskeer/Storage/src/Riskeer.Storage.Core/Create/StructuresFailureMechanismSectionResultCreateExtensions.cs (.../StructuresFailureMechanismSectionResultCreateExtensions.cs) (revision 2c97eb0986e186670e4978a85b62b50ff584bbad)
@@ -27,19 +27,18 @@
{
///
/// Extension methods for related to creating an
- /// instance of .
+ /// instance of .
///
internal static class StructuresFailureMechanismSectionResultCreateExtensions
{
///
- /// Creates an instance of
+ /// Creates an instance of
/// based on the information of the .
///
/// The result to create a database entity for.
- /// An instance of .
+ /// An instance of .
/// Thrown when is null.
- internal static T Create(this AdoptableFailureMechanismSectionResult result)
- where T : IStructuresSectionResultEntity, new()
+ internal static T Create(this AdoptableFailureMechanismSectionResult result) where T : IAdoptableFailureMechanismSectionResultEntity, new()
{
if (result == null)
{
Index: Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Interfaces/IAdoptableFailureMechanismSectionResultEntity.cs
===================================================================
diff -u
--- Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Interfaces/IAdoptableFailureMechanismSectionResultEntity.cs (revision 0)
+++ Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Interfaces/IAdoptableFailureMechanismSectionResultEntity.cs (revision 2c97eb0986e186670e4978a85b62b50ff584bbad)
@@ -0,0 +1,54 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+namespace Riskeer.Storage.Core.DbContext
+{
+ ///
+ /// Interface for a failure mechanism section result entity with an adoptable initial failure mechanism result type.
+ ///
+ public interface IAdoptableFailureMechanismSectionResultEntity
+ {
+ ///
+ /// Gets or sets whether the section result is relevant.
+ ///
+ byte IsRelevant { get; set; }
+
+ ///
+ /// Gets or sets the type of the initial failure mechanism result.
+ ///
+ byte InitialAdoptableFailureMechanismResultType { get; set; }
+
+ ///
+ /// Gets or sets the value of the manual initial failure mechanism result per failure mechanism section as a probability.
+ ///
+ double? ManualInitialFailureMechanismResultSectionProbability { get; set; }
+
+ ///
+ /// Gets or sets whether further analysis is needed.
+ ///
+ byte FurtherAnalysisNeeded { get; set; }
+
+ ///
+ /// Gets or sets the value of the refined probability per failure mechanism section result.
+ ///
+ double? RefinedSectionProbability { get; set; }
+ }
+}
\ No newline at end of file
Fisheye: Tag 2c97eb0986e186670e4978a85b62b50ff584bbad refers to a dead (removed) revision in file `Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Interfaces/IStructuresSectionResultEntity.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Partials/PartialClosingStructuresSectionResultEntity.cs
===================================================================
diff -u -r5f692ba886dae614fc0cad92e92f7a0184b13cfe -r2c97eb0986e186670e4978a85b62b50ff584bbad
--- Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Partials/PartialClosingStructuresSectionResultEntity.cs (.../PartialClosingStructuresSectionResultEntity.cs) (revision 5f692ba886dae614fc0cad92e92f7a0184b13cfe)
+++ Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Partials/PartialClosingStructuresSectionResultEntity.cs (.../PartialClosingStructuresSectionResultEntity.cs) (revision 2c97eb0986e186670e4978a85b62b50ff584bbad)
@@ -23,7 +23,7 @@
{
///
/// Partial implementation of that implements
- /// .
+ /// .
///
- public partial class ClosingStructuresSectionResultEntity : IStructuresSectionResultEntity {}
+ public partial class ClosingStructuresSectionResultEntity : IAdoptableFailureMechanismSectionResultEntity {}
}
\ No newline at end of file
Index: Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Partials/PartialHeightStructuresSectionResultEntity.cs
===================================================================
diff -u -r5f692ba886dae614fc0cad92e92f7a0184b13cfe -r2c97eb0986e186670e4978a85b62b50ff584bbad
--- Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Partials/PartialHeightStructuresSectionResultEntity.cs (.../PartialHeightStructuresSectionResultEntity.cs) (revision 5f692ba886dae614fc0cad92e92f7a0184b13cfe)
+++ Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Partials/PartialHeightStructuresSectionResultEntity.cs (.../PartialHeightStructuresSectionResultEntity.cs) (revision 2c97eb0986e186670e4978a85b62b50ff584bbad)
@@ -23,7 +23,7 @@
{
///
/// Partial implementation of that implements
- /// .
+ /// .
///
- public partial class HeightStructuresSectionResultEntity : IStructuresSectionResultEntity {}
+ public partial class HeightStructuresSectionResultEntity : IAdoptableFailureMechanismSectionResultEntity {}
}
\ No newline at end of file
Index: Riskeer/Storage/src/Riskeer.Storage.Core/Read/StructuresSectionResultEntityReadExtensions.cs
===================================================================
diff -u -re6b6b39b1a5f22ede35c53c3b16f571f63e59717 -r2c97eb0986e186670e4978a85b62b50ff584bbad
--- Riskeer/Storage/src/Riskeer.Storage.Core/Read/StructuresSectionResultEntityReadExtensions.cs (.../StructuresSectionResultEntityReadExtensions.cs) (revision e6b6b39b1a5f22ede35c53c3b16f571f63e59717)
+++ Riskeer/Storage/src/Riskeer.Storage.Core/Read/StructuresSectionResultEntityReadExtensions.cs (.../StructuresSectionResultEntityReadExtensions.cs) (revision 2c97eb0986e186670e4978a85b62b50ff584bbad)
@@ -39,7 +39,7 @@
/// the .
/// The target of the read operation.
/// Thrown when any input parameter is null.
- internal static void Read(this IStructuresSectionResultEntity entity,
+ internal static void Read(this IAdoptableFailureMechanismSectionResultEntity entity,
AdoptableFailureMechanismSectionResult sectionResult)
{
if (entity == null)
Index: Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/StructuresFailureMechanismSectionResultCreateExtensionsTest.cs
===================================================================
diff -u -re6b6b39b1a5f22ede35c53c3b16f571f63e59717 -r2c97eb0986e186670e4978a85b62b50ff584bbad
--- Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/StructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../StructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e6b6b39b1a5f22ede35c53c3b16f571f63e59717)
+++ Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/StructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../StructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 2c97eb0986e186670e4978a85b62b50ff584bbad)
@@ -35,7 +35,7 @@
public void Create_FailureMechanismSectionResultNull_ThrowsArgumentNullException()
{
// Call
- void Call() => ((AdoptableFailureMechanismSectionResult) null).Create();
+ void Call() => ((AdoptableFailureMechanismSectionResult) null).Create();
// Assert
var exception = Assert.Throws(Call);
@@ -63,7 +63,7 @@
};
// Call
- var entity = sectionResult.Create();
+ var entity = sectionResult.Create();
// Assert
Assert.AreEqual(Convert.ToByte(isRelevant), entity.IsRelevant);
@@ -84,7 +84,7 @@
};
// Call
- var entity = sectionResult.Create();
+ var entity = sectionResult.Create();
// Assert
Assert.IsNull(entity.ManualInitialFailureMechanismResultSectionProbability);
Index: Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/StructuresSectionResultEntityReadExtensionsTest.cs
===================================================================
diff -u -re6b6b39b1a5f22ede35c53c3b16f571f63e59717 -r2c97eb0986e186670e4978a85b62b50ff584bbad
--- Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/StructuresSectionResultEntityReadExtensionsTest.cs (.../StructuresSectionResultEntityReadExtensionsTest.cs) (revision e6b6b39b1a5f22ede35c53c3b16f571f63e59717)
+++ Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/StructuresSectionResultEntityReadExtensionsTest.cs (.../StructuresSectionResultEntityReadExtensionsTest.cs) (revision 2c97eb0986e186670e4978a85b62b50ff584bbad)
@@ -36,8 +36,8 @@
public void Read_EntityNull_ThrowsArgumentNullException()
{
// Call
- void Call() => ((TestStructuresFailureMechanismSectionResultEntity) null).Read(new AdoptableFailureMechanismSectionResult(
- FailureMechanismSectionTestFactory.CreateFailureMechanismSection()));
+ void Call() => ((TestAdoptableFailureMechanismFailureMechanismSectionResultEntity) null).Read(new AdoptableFailureMechanismSectionResult(
+ FailureMechanismSectionTestFactory.CreateFailureMechanismSection()));
// Assert
var exception = Assert.Throws(Call);
@@ -48,7 +48,7 @@
public void Read_SectionResultNull_ThrowsArgumentNullException()
{
// Setup
- var entity = new TestStructuresFailureMechanismSectionResultEntity();
+ var entity = new TestAdoptableFailureMechanismFailureMechanismSectionResultEntity();
// Call
void Call() => entity.Read(null);
@@ -69,7 +69,7 @@
bool furtherAnalysisNeeded = random.NextBoolean();
double refinedSectionProbability = random.NextDouble();
- var entity = new TestStructuresFailureMechanismSectionResultEntity
+ var entity = new TestAdoptableFailureMechanismFailureMechanismSectionResultEntity
{
IsRelevant = Convert.ToByte(isRelevant),
InitialAdoptableFailureMechanismResultType = Convert.ToByte(initialFailureMechanismResultType),
@@ -95,7 +95,7 @@
{
// Setup
var failureMechanismSectionEntity = new FailureMechanismSectionEntity();
- var entity = new TestStructuresFailureMechanismSectionResultEntity
+ var entity = new TestAdoptableFailureMechanismFailureMechanismSectionResultEntity
{
FailureMechanismSectionEntity = failureMechanismSectionEntity
};