Index: Ringtoets/Common/src/Ringtoets.Common.Data/UpdateDataStrategies/UpdateDataStrategyBase.cs
===================================================================
diff -u -ra940166534b3dd6e778de2e7c8e7e5241f3d3381 -r9540d67453c6a1caf5833d64ab651660dce11595
--- Ringtoets/Common/src/Ringtoets.Common.Data/UpdateDataStrategies/UpdateDataStrategyBase.cs (.../UpdateDataStrategyBase.cs) (revision a940166534b3dd6e778de2e7c8e7e5241f3d3381)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/UpdateDataStrategies/UpdateDataStrategyBase.cs (.../UpdateDataStrategyBase.cs) (revision 9540d67453c6a1caf5833d64ab651660dce11595)
@@ -39,17 +39,16 @@
///
///
/// The target data type.
- /// The failure mechanism in which the target collection should be updated.
+ /// The type of the failure mechanism in which the target collection should be updated.
public abstract class UpdateDataStrategyBase
where TTargetData : Observable
where TFailureMechanism : IFailureMechanism
{
- protected readonly TFailureMechanism FailureMechanism;
private readonly IEqualityComparer equalityComparer;
private readonly ObservableUniqueItemCollectionWithSourcePath targetCollection;
///
- /// Creates a new instance of object.
+ /// Creates a new instance of .
///
/// The failure mechanism which needs to be updated.
/// The collection to add the updated objects to.
@@ -79,19 +78,24 @@
}
///
+ /// Gets the failure mechanism.
+ ///
+ protected TFailureMechanism FailureMechanism { get; }
+
+ ///
/// Updates the unequal object and its dependent data with data from the imported data.
///
- /// Object that needs to be updated.
+ /// The object that needs to be updated.
/// The object to update from.
/// An with affected objects.
/// Thrown when duplicate items are found.
protected abstract IEnumerable UpdateObjectAndDependentData(TTargetData objectToUpdate,
TTargetData objectToUpdateFrom);
///
- /// Removes the objects and their dependent data.
+ /// Removes the object and its dependent data.
///
- /// The object that is removed.
+ /// The object to remove.
/// An with affected objects.
protected abstract IEnumerable RemoveObjectAndDependentData(TTargetData removedObject);
@@ -102,8 +106,9 @@
/// The imported data collection that is used to update
/// the .
/// The source file path.
- /// A of affected objects.
+ /// An of affected objects.
/// Thrown when an error occurred while updating the data.
+ /// Thrown when any input parameter is null.
/// Thrown when contains
/// null elements.
protected IEnumerable UpdateTargetCollectionData(IEnumerable importedDataCollection,
@@ -123,15 +128,15 @@
///
/// Identifies which items were changed, removed and added to the target collection
/// when compared with the imported data and performs the necessary operations for
- /// the dependent data of the affected elements.
+ /// the dependent data of the affected elements.
///
/// The imported data collection which is used to update
/// the .
/// The source file path.
- /// A with affected objects.
+ /// An with affected objects.
/// Thrown when:
///
- /// - duplicate items are being added to the .
+ /// - duplicate items are being added to the ;
/// - duplicate items are found in the .
///
///
@@ -165,7 +170,7 @@
///
/// The objects that need to be updated.
/// The data to update from.
- /// A of affected items.
+ /// An of affected items.
/// Thrown when the imported
/// contains duplicate items.
private IEnumerable UpdateData(IEnumerable objectsToUpdate,
@@ -201,7 +206,7 @@
/// Removes all the objects and their dependent data.
///
/// The objects that need to be removed.
- /// A of affected items.
+ /// An of affected items.
private IEnumerable RemoveData(IEnumerable objectsToRemove)
{
var affectedObjects = new List();
@@ -231,8 +236,8 @@
/// Thrown when
/// or contains a null element.
public CollectionModification(IEnumerable existingObjects,
- IEnumerable updatedObjects,
- IEqualityComparer equalityComparer)
+ IEnumerable updatedObjects,
+ IEqualityComparer equalityComparer)
{
if (existingObjects == null)
{