Example #1
0
        /// <summary>
        /// Creates a new instance of <see cref="StabilityPointStructuresCalculationActivity"/>.
        /// </summary>
        /// <param name="calculation">The stability point structures data used for the calculation.</param>
        /// <param name="failureMechanism">The failure mechanism the calculation belongs to.</param>
        /// <param name="assessmentSection">The assessment section the calculation belongs to.</param>
        /// <exception cref="ArgumentNullException">Thrown when any input argument is <c>null</c>.</exception>
        public StabilityPointStructuresCalculationActivity(StructuresCalculation <StabilityPointStructuresInput> calculation,
                                                           StabilityPointStructuresFailureMechanism failureMechanism,
                                                           IAssessmentSection assessmentSection)
            : base(calculation)
        {
            if (failureMechanism == null)
            {
                throw new ArgumentNullException(nameof(failureMechanism));
            }

            if (assessmentSection == null)
            {
                throw new ArgumentNullException(nameof(assessmentSection));
            }

            this.calculation       = calculation;
            this.failureMechanism  = failureMechanism;
            this.assessmentSection = assessmentSection;

            Description = string.Format(RiskeerCommonServiceResources.Perform_calculation_with_name_0_, calculation.Name);

            calculationService = new StabilityPointStructuresCalculationService();
        }
Example #2
0
 protected override bool Validate()
 {
     return(StabilityPointStructuresCalculationService.Validate(calculation, assessmentSection));
 }