/// <summary> /// Creates a new instance of <see cref="DesignWaterLevelCalculationActivity"/>. /// </summary> /// <param name="hydraulicBoundaryLocationCalculation">The hydraulic boundary location calculation to perform.</param> /// <param name="calculationSettings">The <see cref="HydraulicBoundaryCalculationSettings"/> with the /// hydraulic boundary calculation settings.</param> /// <param name="targetProbability">The target probability to use during the calculation.</param> /// <param name="calculationIdentifier">The calculation identifier to use in all messages.</param> /// <remarks>Preprocessing is disabled when the preprocessor directory equals <see cref="string.Empty"/>.</remarks> /// <exception cref="ArgumentNullException">Thrown when <paramref name="hydraulicBoundaryLocationCalculation"/> or /// <paramref name="calculationSettings"/> is <c>null</c>.</exception> /// <exception cref="ArgumentException">Thrown when <paramref name="calculationIdentifier"/> is <c>null</c> or empty.</exception> public DesignWaterLevelCalculationActivity(HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation, HydraulicBoundaryCalculationSettings calculationSettings, double targetProbability, string calculationIdentifier) : base(hydraulicBoundaryLocationCalculation) { if (calculationSettings == null) { throw new ArgumentNullException(nameof(calculationSettings)); } messageProvider = new DesignWaterLevelCalculationMessageProvider(calculationIdentifier); this.hydraulicBoundaryLocationCalculation = hydraulicBoundaryLocationCalculation; this.calculationSettings = calculationSettings; this.targetProbability = targetProbability; calculationService = new DesignWaterLevelCalculationService(); Description = messageProvider.GetActivityDescription(hydraulicBoundaryLocationCalculation.HydraulicBoundaryLocation.Name); }
/// <summary> /// Creates a new instance of <see cref="DuneLocationCalculationActivity"/>. /// </summary> /// <param name="duneLocationCalculation">The <see cref="DuneLocationCalculation"/> to perform.</param> /// <param name="calculationSettings">The <see cref="HydraulicBoundaryCalculationSettings"/> with the /// hydraulic boundary calculation settings.</param> /// <param name="targetProbability">The target probability to use during the calculation.</param> /// <param name="calculationIdentifier">The calculation identifier to use in all messages.</param> /// <remarks>Preprocessing is disabled when the preprocessor directory equals <see cref="string.Empty"/>.</remarks> /// <exception cref="ArgumentNullException">Thrown when <paramref name="duneLocationCalculation"/> /// or <paramref name="calculationSettings"/> is <c>null</c>.</exception> /// <exception cref="ArgumentException">Thrown when <paramref name="calculationIdentifier"/> is <c>null</c> or empty.</exception> public DuneLocationCalculationActivity(DuneLocationCalculation duneLocationCalculation, HydraulicBoundaryCalculationSettings calculationSettings, double targetProbability, string calculationIdentifier) : base(duneLocationCalculation) { if (calculationSettings == null) { throw new ArgumentNullException(nameof(calculationSettings)); } messageProvider = new DuneLocationCalculationMessageProvider(calculationIdentifier); this.duneLocationCalculation = duneLocationCalculation; this.calculationSettings = calculationSettings; this.targetProbability = targetProbability; DuneLocation duneLocation = duneLocationCalculation.DuneLocation; Description = messageProvider.GetActivityDescription(duneLocation.Name); calculationService = new DuneLocationCalculationService(); }