Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/FailureMechanismSectionAssemblyCalculator.cs
===================================================================
diff -u -r39dde22d4fd7ade31327dff84752efd31566f407 -r7f759a1c2129332093f5d58aef1d397363e2c81e
--- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/FailureMechanismSectionAssemblyCalculator.cs (.../FailureMechanismSectionAssemblyCalculator.cs) (revision 39dde22d4fd7ade31327dff84752efd31566f407)
+++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Assembly/FailureMechanismSectionAssemblyCalculator.cs (.../FailureMechanismSectionAssemblyCalculator.cs) (revision 7f759a1c2129332093f5d58aef1d397363e2c81e)
@@ -20,7 +20,6 @@
// All rights reserved.
using System;
-using System.ComponentModel;
using Assembly.Kernel.Exceptions;
using Assembly.Kernel.Interfaces;
using Assembly.Kernel.Model;
@@ -56,11 +55,6 @@
this.factory = factory;
}
- ///
- /// Thrown when
- /// is invalid.
- /// Thrown when
- /// is valid but not supported.
public RiskeerFailureMechanismSectionAssemblyResult AssembleFailureMechanismSection(FailureMechanismSectionAssemblyInput input)
{
if (input == null)
@@ -96,11 +90,6 @@
}
}
- ///
- /// Thrown when
- /// is invalid.
- /// Thrown when
- /// is valid but not supported.
public RiskeerFailureMechanismSectionAssemblyResult AssembleFailureMechanismSection(FailureMechanismSectionWithProfileProbabilityAssemblyInput input)
{
if (input == null)
Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/FailureMechanismAssemblyCalculatorInputCreator.cs
===================================================================
diff -u -r39dde22d4fd7ade31327dff84752efd31566f407 -r7f759a1c2129332093f5d58aef1d397363e2c81e
--- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/FailureMechanismAssemblyCalculatorInputCreator.cs (.../FailureMechanismAssemblyCalculatorInputCreator.cs) (revision 39dde22d4fd7ade31327dff84752efd31566f407)
+++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Creators/FailureMechanismAssemblyCalculatorInputCreator.cs (.../FailureMechanismAssemblyCalculatorInputCreator.cs) (revision 7f759a1c2129332093f5d58aef1d397363e2c81e)
@@ -31,7 +31,7 @@
namespace Riskeer.AssemblyTool.KernelWrapper.Creators
{
///
- /// Creates input instances that can be used in the failure mechanism assembly calculator.
+ /// Creates input that can be used in the failure mechanism assembly calculator.
///
internal static class FailureMechanismAssemblyCalculatorInputCreator
{
@@ -55,19 +55,50 @@
return new AssemblyFailureMechanismSectionAssemblyResult(new Probability(result.ProfileProbability),
new Probability(result.SectionProbability),
- CreateInterpretationCategory(result.AssemblyGroup));
+ ConvertFailureMechanismSectionAssemblyGroup(result.AssemblyGroup));
}
///
- /// Converts a into a .
+ /// Converts a into an
+ /// .
///
+ /// The to convert.
+ /// The converted .
+ /// Thrown when is invalid.
+ /// Thrown when
+ /// is valid but not supported.
+ public static ERefinementStatus ConvertFailureMechanismSectionResultFurtherAnalysisType(FailureMechanismSectionResultFurtherAnalysisType furtherAnalysisType)
+ {
+ if (!Enum.IsDefined(typeof(FailureMechanismSectionResultFurtherAnalysisType), furtherAnalysisType))
+ {
+ throw new InvalidEnumArgumentException(nameof(furtherAnalysisType),
+ (int) furtherAnalysisType,
+ typeof(FailureMechanismSectionResultFurtherAnalysisType));
+ }
+
+ switch (furtherAnalysisType)
+ {
+ case FailureMechanismSectionResultFurtherAnalysisType.NotNecessary:
+ return ERefinementStatus.NotNecessary;
+ case FailureMechanismSectionResultFurtherAnalysisType.Necessary:
+ return ERefinementStatus.Necessary;
+ case FailureMechanismSectionResultFurtherAnalysisType.Executed:
+ return ERefinementStatus.Performed;
+ default:
+ throw new NotSupportedException();
+ }
+ }
+
+ ///
+ /// Converts a into a .
+ ///
/// The to convert.
/// A based on .
/// Thrown when
/// is an invalid value.
/// Thrown when
/// is a valid value, but unsupported.
- private static EInterpretationCategory CreateInterpretationCategory(FailureMechanismSectionAssemblyGroup assemblyGroup)
+ private static EInterpretationCategory ConvertFailureMechanismSectionAssemblyGroup(FailureMechanismSectionAssemblyGroup assemblyGroup)
{
if (!Enum.IsDefined(typeof(FailureMechanismSectionAssemblyGroup), assemblyGroup))
{
@@ -102,36 +133,5 @@
throw new NotSupportedException();
}
}
-
- ///
- /// Converts a into an
- /// .
- ///
- /// The to convert.
- /// The converted .
- /// Thrown when is invalid.
- /// Thrown when
- /// is valid but not supported.
- public static ERefinementStatus ConvertFailureMechanismSectionResultFurtherAnalysisType(FailureMechanismSectionResultFurtherAnalysisType furtherAnalysisType)
- {
- if (!Enum.IsDefined(typeof(FailureMechanismSectionResultFurtherAnalysisType), furtherAnalysisType))
- {
- throw new InvalidEnumArgumentException(nameof(furtherAnalysisType),
- (int) furtherAnalysisType,
- typeof(FailureMechanismSectionResultFurtherAnalysisType));
- }
-
- switch (furtherAnalysisType)
- {
- case FailureMechanismSectionResultFurtherAnalysisType.NotNecessary:
- return ERefinementStatus.NotNecessary;
- case FailureMechanismSectionResultFurtherAnalysisType.Necessary:
- return ERefinementStatus.Necessary;
- case FailureMechanismSectionResultFurtherAnalysisType.Executed:
- return ERefinementStatus.Performed;
- default:
- throw new NotSupportedException();
- }
- }
}
}
\ No newline at end of file