Index: Ringtoets/Common/src/Ringtoets.Common.Utils/AssignUnassignCalculations.cs =================================================================== diff -u -r2a0fbe6ec22928831305671ecd4f41030b827250 -r6c3b126a0a9d31abf3bada375416117f6ffb2e97 --- Ringtoets/Common/src/Ringtoets.Common.Utils/AssignUnassignCalculations.cs (.../AssignUnassignCalculations.cs) (revision 2a0fbe6ec22928831305671ecd4f41030b827250) +++ Ringtoets/Common/src/Ringtoets.Common.Utils/AssignUnassignCalculations.cs (.../AssignUnassignCalculations.cs) (revision 6c3b126a0a9d31abf3bada375416117f6ffb2e97) @@ -136,7 +136,7 @@ } if (calculationsPerSegmentName.ContainsKey(sectionName)) { - var calculationsInCurrentSection = calculationsPerSegmentName[sectionName]; + IList calculationsInCurrentSection = calculationsPerSegmentName[sectionName]; if (!calculationsInCurrentSection.Contains(sectionResult.Calculation)) { sectionResult.Calculation = null; @@ -178,43 +178,43 @@ { if (sections == null) { - throw new ArgumentNullException("sections"); + throw new ArgumentNullException(nameof(sections)); } if (sections.Any(s => s == null)) { - throw new ArgumentException(@"Sections contains an entry without value.", "sections"); + throw new ArgumentException(@"Sections contains an entry without value.", nameof(sections)); } } private static void ValidateCalculationWithLocation(CalculationWithLocation calculation) { if (calculation == null) { - throw new ArgumentNullException("calculation"); + throw new ArgumentNullException(nameof(calculation)); } } private static void ValidateCalculations(IEnumerable calculations) { if (calculations == null) { - throw new ArgumentNullException("calculations"); + throw new ArgumentNullException(nameof(calculations)); } if (calculations.Any(s => s == null)) { - throw new ArgumentException(@"Calculations contains an entry without value.", "calculations"); + throw new ArgumentException(@"Calculations contains an entry without value.", nameof(calculations)); } } private static void ValidateSectionResults(IEnumerable sectionResults) { if (sectionResults == null) { - throw new ArgumentNullException("sectionResults"); + throw new ArgumentNullException(nameof(sectionResults)); } if (sectionResults.Any(s => s == null)) { - throw new ArgumentException(@"SectionResults contains an entry without value.", "sectionResults"); + throw new ArgumentException(@"SectionResults contains an entry without value.", nameof(sectionResults)); } } Index: Ringtoets/Common/src/Ringtoets.Common.Utils/StructuresHelper.cs =================================================================== diff -u -r2a0fbe6ec22928831305671ecd4f41030b827250 -r6c3b126a0a9d31abf3bada375416117f6ffb2e97 --- Ringtoets/Common/src/Ringtoets.Common.Utils/StructuresHelper.cs (.../StructuresHelper.cs) (revision 2a0fbe6ec22928831305671ecd4f41030b827250) +++ Ringtoets/Common/src/Ringtoets.Common.Utils/StructuresHelper.cs (.../StructuresHelper.cs) (revision 6c3b126a0a9d31abf3bada375416117f6ffb2e97) @@ -49,7 +49,8 @@ /// Thrown when an element in is /// null. public static Dictionary> CollectCalculationsPerSection(IEnumerable sections, - IEnumerable> calculations) where T : IStructuresCalculationInput, new() + IEnumerable> calculations) + where T : IStructuresCalculationInput, new() { return AssignUnassignCalculations.CollectCalculationsPerSection(sections, AsCalculationsWithLocations(calculations)); } @@ -65,7 +66,8 @@ /// Thrown when an element in is null. /// public static FailureMechanismSection FailureMechanismSectionForCalculation(IEnumerable sections, - StructuresCalculation calculation) where T : IStructuresCalculationInput, new() + StructuresCalculation calculation) + where T : IStructuresCalculationInput, new() { CalculationWithLocation calculationWithLocation = AsCalculationWithLocation(calculation); if (calculationWithLocation != null) @@ -89,7 +91,8 @@ /// Thrown when element in is /// null. public static IEnumerable> UpdateCalculationToSectionResultAssignments(IEnumerable> sectionResults, - IEnumerable> calculations) where T : IStructuresCalculationInput, new() + IEnumerable> calculations) + where T : IStructuresCalculationInput, new() { ValidateSectionResults(sectionResults); @@ -108,32 +111,35 @@ /// A collection of . /// Thrown when is null or when /// an element in is null. - private static IEnumerable AsCalculationsWithLocations(IEnumerable> calculations) where T : IStructuresCalculationInput, new() + private static IEnumerable AsCalculationsWithLocations(IEnumerable> calculations) + where T : IStructuresCalculationInput, new() { if (calculations == null) { - throw new ArgumentNullException("calculations"); + throw new ArgumentNullException(nameof(calculations)); } return calculations.Select(AsCalculationWithLocation).Where(c => c != null); } - private static void ValidateSectionResults(IEnumerable> sectionResults) where T : IStructuresCalculationInput, new() + private static void ValidateSectionResults(IEnumerable> sectionResults) + where T : IStructuresCalculationInput, new() { if (sectionResults == null) { - throw new ArgumentNullException("sectionResults"); + throw new ArgumentNullException(nameof(sectionResults)); } if (sectionResults.Any(sr => sr == null)) { - throw new ArgumentException(@"SectionResults contains an entry without value.", "sectionResults"); + throw new ArgumentException(@"SectionResults contains an entry without value.", nameof(sectionResults)); } } - private static CalculationWithLocation AsCalculationWithLocation(StructuresCalculation calculation) where T : IStructuresCalculationInput, new() + private static CalculationWithLocation AsCalculationWithLocation(StructuresCalculation calculation) + where T : IStructuresCalculationInput, new() { if (calculation == null) { - throw new ArgumentNullException("calculation"); + throw new ArgumentNullException(nameof(calculation)); } if (calculation.InputParameters.Structure == null) { @@ -142,7 +148,8 @@ return new CalculationWithLocation(calculation, calculation.InputParameters.Structure.Location); } - private static SectionResultWithCalculationAssignment AsCalculationAssignment(StructuresFailureMechanismSectionResult failureMechanismSectionResult) where T : IStructuresCalculationInput, new() + private static SectionResultWithCalculationAssignment AsCalculationAssignment(StructuresFailureMechanismSectionResult failureMechanismSectionResult) + where T : IStructuresCalculationInput, new() { return new SectionResultWithCalculationAssignment( failureMechanismSectionResult, Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs =================================================================== diff -u -r2a0fbe6ec22928831305671ecd4f41030b827250 -r6c3b126a0a9d31abf3bada375416117f6ffb2e97 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision 2a0fbe6ec22928831305671ecd4f41030b827250) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision 6c3b126a0a9d31abf3bada375416117f6ffb2e97) @@ -78,28 +78,28 @@ }; yield return new ViewInfo< - GrassCoverErosionInwardsScenariosContext, - CalculationGroup, - GrassCoverErosionInwardsScenariosView> - { - GetViewData = context => context.WrappedData, - GetViewName = (view, calculationGroup) => RingtoetsCommonFormsResources.Scenarios_DisplayName, - AfterCreate = (view, context) => view.FailureMechanism = context.ParentFailureMechanism, - CloseForData = CloseScenariosViewForData, - Image = RingtoetsCommonFormsResources.ScenariosIcon - }; + GrassCoverErosionInwardsScenariosContext, + CalculationGroup, + GrassCoverErosionInwardsScenariosView> + { + GetViewData = context => context.WrappedData, + GetViewName = (view, calculationGroup) => RingtoetsCommonFormsResources.Scenarios_DisplayName, + AfterCreate = (view, context) => view.FailureMechanism = context.ParentFailureMechanism, + CloseForData = CloseScenariosViewForData, + Image = RingtoetsCommonFormsResources.ScenariosIcon + }; yield return new ViewInfo< - FailureMechanismSectionResultContext, - IEnumerable, - GrassCoverErosionInwardsFailureMechanismResultView> - { - GetViewName = (view, results) => RingtoetsCommonFormsResources.FailureMechanism_AssessmentResult_DisplayName, - Image = RingtoetsCommonFormsResources.FailureMechanismSectionResultIcon, - CloseForData = CloseFailureMechanismResultViewForData, - GetViewData = context => context.WrappedData, - AfterCreate = (view, context) => view.FailureMechanism = context.FailureMechanism - }; + FailureMechanismSectionResultContext, + IEnumerable, + GrassCoverErosionInwardsFailureMechanismResultView> + { + GetViewName = (view, results) => RingtoetsCommonFormsResources.FailureMechanism_AssessmentResult_DisplayName, + Image = RingtoetsCommonFormsResources.FailureMechanismSectionResultIcon, + CloseForData = CloseFailureMechanismResultViewForData, + GetViewData = context => context.WrappedData, + AfterCreate = (view, context) => view.FailureMechanism = context.FailureMechanism + }; yield return new ViewInfo { @@ -192,11 +192,11 @@ ActivityProgressDialogRunner.Run( Gui.MainWindow, calculations.Select(calc => - new GrassCoverErosionInwardsCalculationActivity( - calc, - assessmentSection.HydraulicBoundaryDatabase.FilePath, - failureMechanism, - assessmentSection)).ToArray()); + new GrassCoverErosionInwardsCalculationActivity( + calc, + assessmentSection.HydraulicBoundaryDatabase.FilePath, + failureMechanism, + assessmentSection)).ToArray()); } private static string ValidateAllDataAvailableAndGetErrorMessage(IAssessmentSection assessmentSection, GrassCoverErosionInwardsFailureMechanism failureMechanism) @@ -496,9 +496,9 @@ } builder.AddValidateAllCalculationsInGroupItem( - context, - ValidateAll, - ValidateAllDataAvailableAndGetErrorMessageForCalculationsInGroup) + context, + ValidateAll, + ValidateAllDataAvailableAndGetErrorMessageForCalculationsInGroup) .AddPerformAllCalculationsInGroupItem(group, context, CalculateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationsInGroup) .AddSeparator() .AddClearAllCalculationOutputInGroupItem(group); Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs =================================================================== diff -u -r2a0fbe6ec22928831305671ecd4f41030b827250 -r6c3b126a0a9d31abf3bada375416117f6ffb2e97 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs (.../GrassCoverErosionInwardsHelper.cs) (revision 2a0fbe6ec22928831305671ecd4f41030b827250) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs (.../GrassCoverErosionInwardsHelper.cs) (revision 6c3b126a0a9d31abf3bada375416117f6ffb2e97) @@ -92,7 +92,7 @@ /// Thrown when element in is /// null. public static IEnumerable UpdateCalculationToSectionResultAssignments(IEnumerable sectionResults, - IEnumerable calculations) + IEnumerable calculations) { ValidateSectionResults(sectionResults); @@ -116,7 +116,7 @@ { if (calculations == null) { - throw new ArgumentNullException("calculations"); + throw new ArgumentNullException(nameof(calculations)); } return calculations.Select(AsCalculationWithLocation).Where(c => c != null); } @@ -125,11 +125,11 @@ { if (sectionResults == null) { - throw new ArgumentNullException("sectionResults"); + throw new ArgumentNullException(nameof(sectionResults)); } if (sectionResults.Any(sr => sr == null)) { - throw new ArgumentException("SectionResults contains an entry without value.", "sectionResults"); + throw new ArgumentException("SectionResults contains an entry without value.", nameof(sectionResults)); } } @@ -143,7 +143,7 @@ { if (calculation == null) { - throw new ArgumentNullException("calculation"); + throw new ArgumentNullException(nameof(calculation)); } if (calculation.InputParameters.DikeProfile == null) {