Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/IllustrationPointControlItemHelper.cs =================================================================== diff -u -r43036ccbb5c4d72a97866f9e5ab2b55d3cc74b43 -rf288f9ccb9ac465f017170a59279909d8431fdc7 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/IllustrationPointControlItemHelper.cs (.../IllustrationPointControlItemHelper.cs) (revision 43036ccbb5c4d72a97866f9e5ab2b55d3cc74b43) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/IllustrationPointControlItemHelper.cs (.../IllustrationPointControlItemHelper.cs) (revision f288f9ccb9ac465f017170a59279909d8431fdc7) @@ -38,7 +38,7 @@ /// The collection of /// to determine the closing situations for. /// true if all items in the collection have the same closing situation; - /// false if otherwise. + /// false otherwise. /// Thrown when /// is null. /// Thrown when @@ -50,14 +50,8 @@ throw new ArgumentNullException(nameof(illustrationPointControlItems)); } - IllustrationPointControlItem[] illustrationPointControlItemArray = illustrationPointControlItems.ToArray(); - if (illustrationPointControlItemArray.Contains(null)) - { - throw new ArgumentException(@"Collection cannot contain null items", nameof(illustrationPointControlItems)); - } - - return illustrationPointControlItemArray.All(item => item.ClosingSituation == - illustrationPointControlItemArray[0].ClosingSituation); + IEnumerable closingSituations = illustrationPointControlItems.Select(it => it.ClosingSituation); + return closingSituations.Distinct().Count() < 2; } } } \ No newline at end of file