Index: Riskeer/Piping/src/Riskeer.Piping.Data/PipingCalculation.cs
===================================================================
diff -u -rdf1942940ece42a98d022f8c4a8bd873274462fc -r908cf6f1b1d313f7eb83ba544d26056c8f34cab1
--- Riskeer/Piping/src/Riskeer.Piping.Data/PipingCalculation.cs (.../PipingCalculation.cs) (revision df1942940ece42a98d022f8c4a8bd873274462fc)
+++ Riskeer/Piping/src/Riskeer.Piping.Data/PipingCalculation.cs (.../PipingCalculation.cs) (revision 908cf6f1b1d313f7eb83ba544d26056c8f34cab1)
@@ -55,39 +55,19 @@
}
///
- /// Gets or sets the results of the piping calculation.
- ///
- public TPipingOutput Output { get; set; }
-
- ///
/// Gets the input parameters to perform the piping calculation with.
///
public TPipingInput InputParameters { get; private set; }
public string Name { get; set; }
- public bool ShouldCalculate
- {
- get
- {
- return !HasOutput;
- }
- }
+ public bool ShouldCalculate => !HasOutput;
- public bool HasOutput
- {
- get
- {
- return Output != null;
- }
- }
+ public abstract bool HasOutput { get; }
public Comment Comments { get; private set; }
- public void ClearOutput()
- {
- Output = null;
- }
+ public abstract void ClearOutput();
public override object Clone()
{
@@ -96,11 +76,6 @@
clone.Comments = (Comment) Comments.Clone();
clone.InputParameters = (TPipingInput) InputParameters.Clone();
- if (Output != null)
- {
- clone.Output = (TPipingOutput) Output.Clone();
- }
-
return clone;
}
}
Index: Riskeer/Piping/src/Riskeer.Piping.Data/SemiProbabilistic/SemiProbabilisticPipingCalculation.cs
===================================================================
diff -u -rd2d48d2bd3050679db76ec126d31b8f9d9546395 -r908cf6f1b1d313f7eb83ba544d26056c8f34cab1
--- Riskeer/Piping/src/Riskeer.Piping.Data/SemiProbabilistic/SemiProbabilisticPipingCalculation.cs (.../SemiProbabilisticPipingCalculation.cs) (revision d2d48d2bd3050679db76ec126d31b8f9d9546395)
+++ Riskeer/Piping/src/Riskeer.Piping.Data/SemiProbabilistic/SemiProbabilisticPipingCalculation.cs (.../SemiProbabilisticPipingCalculation.cs) (revision 908cf6f1b1d313f7eb83ba544d26056c8f34cab1)
@@ -36,5 +36,29 @@
/// Thrown when
/// is null.
public SemiProbabilisticPipingCalculation(GeneralPipingInput generalInputParameters) : base(new SemiProbabilisticPipingInput(generalInputParameters)) {}
+
+ public override bool HasOutput => Output != null;
+
+ ///
+ /// Gets or sets the results of the piping calculation.
+ ///
+ public PipingOutput Output { get; set; }
+
+ public override void ClearOutput()
+ {
+ Output = null;
+ }
+
+ public override object Clone()
+ {
+ var clone = (SemiProbabilisticPipingCalculation) base.Clone();
+
+ if (Output != null)
+ {
+ clone.Output = (PipingOutput) Output.Clone();
+ }
+
+ return clone;
+ }
}
}
\ No newline at end of file