Index: Core/Components/src/Core.Components.DotSpatial/Projections/ReprojectExtensions.cs =================================================================== diff -u -rfcc528ff894c3ef3521a3d4ec8adcda05ea5b54e -r13ff5ce8f0a94bd34b9d9fcdc2c73a121907d357 --- Core/Components/src/Core.Components.DotSpatial/Projections/ReprojectExtensions.cs (.../ReprojectExtensions.cs) (revision fcc528ff894c3ef3521a3d4ec8adcda05ea5b54e) +++ Core/Components/src/Core.Components.DotSpatial/Projections/ReprojectExtensions.cs (.../ReprojectExtensions.cs) (revision 13ff5ce8f0a94bd34b9d9fcdc2c73a121907d357) @@ -181,6 +181,11 @@ @"Number of additional points cannot be negative."); } + return GetEdgePoints(start, end, numberOfAdditionalPoints); + } + + private static IEnumerable GetEdgePoints(Coordinate start, Coordinate end, int numberOfAdditionalPoints) + { double dx = (end.X - start.X) / (numberOfAdditionalPoints + 1); double dy = (end.Y - start.Y) / (numberOfAdditionalPoints + 1); Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/Stack/RowChartDataSeriesFactory.cs =================================================================== diff -u -r6ba910c7ac3e3ccb156c0cad0e2913eaed180611 -r13ff5ce8f0a94bd34b9d9fcdc2c73a121907d357 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/Stack/RowChartDataSeriesFactory.cs (.../RowChartDataSeriesFactory.cs) (revision 6ba910c7ac3e3ccb156c0cad0e2913eaed180611) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/Stack/RowChartDataSeriesFactory.cs (.../RowChartDataSeriesFactory.cs) (revision 13ff5ce8f0a94bd34b9d9fcdc2c73a121907d357) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.Linq; using Core.Components.Stack.Data; namespace Core.Components.OxyPlot.DataSeries.Stack @@ -43,10 +44,7 @@ throw new ArgumentNullException(nameof(data)); } - foreach (RowChartData row in data.Rows) - { - yield return new RowChartDataSeries(row); - } + return data.Rows.Select(row => new RowChartDataSeries(row)); } } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.IO/Configurations/Export/CalculationConfigurationExporter.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r13ff5ce8f0a94bd34b9d9fcdc2c73a121907d357 --- Riskeer/Common/src/Riskeer.Common.IO/Configurations/Export/CalculationConfigurationExporter.cs (.../CalculationConfigurationExporter.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.IO/Configurations/Export/CalculationConfigurationExporter.cs (.../CalculationConfigurationExporter.cs) (revision 13ff5ce8f0a94bd34b9d9fcdc2c73a121907d357) @@ -111,22 +111,16 @@ { foreach (ICalculationBase child in calculations) { - var innerGroup = child as CalculationGroup; - if (innerGroup != null) - { - yield return ToConfiguration(innerGroup); + switch (child) { + case CalculationGroup innerGroup: + yield return ToConfiguration(innerGroup); + break; + case TCalculation calculation: + yield return ToConfiguration(calculation); + break; + default: + throw new ArgumentException($"Cannot export calculation of type '{child.GetType()}' using this exporter."); } - - var calculation = child as TCalculation; - if (calculation != null) - { - yield return ToConfiguration(calculation); - } - - if (innerGroup == null && calculation == null) - { - throw new ArgumentException($"Cannot export calculation of type '{child.GetType()}' using this exporter."); - } } } Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Creators/Output/UpliftVanKernelMessagesCreator.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r13ff5ce8f0a94bd34b9d9fcdc2c73a121907d357 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Creators/Output/UpliftVanKernelMessagesCreator.cs (.../UpliftVanKernelMessagesCreator.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Creators/Output/UpliftVanKernelMessagesCreator.cs (.../UpliftVanKernelMessagesCreator.cs) (revision 13ff5ce8f0a94bd34b9d9fcdc2c73a121907d357) @@ -48,6 +48,30 @@ throw new ArgumentNullException(nameof(logMessages)); } + return CreateLogMessages(logMessages); + } + + /// + /// Creates an of + /// based on the given in the . + /// + /// The validation results to create the Uplift Van kernel messages for. + /// A new of with information + /// taken from the . + /// Thrown when + /// is null. + public static IEnumerable CreateFromValidationResults(IEnumerable validationResults) + { + if (validationResults == null) + { + throw new ArgumentNullException(nameof(validationResults)); + } + + return CreateValidationMessages(validationResults); + } + + private static IEnumerable CreateLogMessages(IEnumerable logMessages) + { foreach (LogMessage logMessage in logMessages) { UpliftVanKernelMessageType type; @@ -64,26 +88,12 @@ continue; } - yield return new UpliftVanKernelMessage(type, logMessage.Message ?? Resources.UpliftVanKernelMessagesCreator_Create_Unknown); + yield return CreateMessage(type, logMessage.Message); } } - /// - /// Creates an of - /// based on the given in the . - /// - /// The validation results to create the Uplift Van kernel messages for. - /// A new of with information - /// taken from the . - /// Thrown when - /// is null. - public static IEnumerable CreateFromValidationResults(IEnumerable validationResults) + private static IEnumerable CreateValidationMessages(IEnumerable validationResults) { - if (validationResults == null) - { - throw new ArgumentNullException(nameof(validationResults)); - } - foreach (ValidationResult logMessage in validationResults) { UpliftVanKernelMessageType type; @@ -99,8 +109,13 @@ continue; } - yield return new UpliftVanKernelMessage(type, logMessage.Text ?? Resources.UpliftVanKernelMessagesCreator_Create_Unknown); + yield return CreateMessage(type, logMessage.Text); } } + + private static UpliftVanKernelMessage CreateMessage(UpliftVanKernelMessageType type, string message) + { + return new UpliftVanKernelMessage(type, message ?? Resources.UpliftVanKernelMessagesCreator_Create_Unknown); + } } } \ No newline at end of file