Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs =================================================================== diff -u -r0c84eb5ded5af71c3982410db8d00ad4fcc572bd -r0978d02df195899fb836b7eb6f4d01f2b56f5cab --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs (.../PersistenceRegistry.cs) (revision 0c84eb5ded5af71c3982410db8d00ad4fcc572bd) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/PersistenceRegistry.cs (.../PersistenceRegistry.cs) (revision 0978d02df195899fb836b7eb6f4d01f2b56f5cab) @@ -58,6 +58,7 @@ private readonly Dictionary closingStructures = CreateDictionary(); private readonly Dictionary stabilityPointStructures = CreateDictionary(); private readonly Dictionary> heightStructuresCalculations = CreateDictionary>(); + private readonly Dictionary> closingStructuresCalculations = CreateDictionary>(); private static Dictionary CreateDictionary() { @@ -324,6 +325,20 @@ Register(heightStructuresCalculations, entity, model); } + /// + /// Registers a create operation for and the + /// that was constructed with the information. + /// + /// The + /// to be registered. + /// The to + /// be registered. + /// Thrown when any input parameter is null. + internal void Register(ClosingStructuresCalculationEntity entity, StructuresCalculation model) + { + Register(closingStructuresCalculations, entity, model); + } + #endregion #region Contains Methods @@ -471,6 +486,17 @@ return ContainsValue(heightStructuresCalculations, model); } + /// + /// Checks whether a create operations has been registered for the given . + /// + /// The to check for. + /// true if the was registered before, false otherwise. + /// Thrown when is null. + internal bool Contains(StructuresCalculation model) + { + return ContainsValue(closingStructuresCalculations, model); + } + #endregion #region Get Methods @@ -693,6 +719,23 @@ return Get(heightStructuresCalculations, model); } + /// + /// Obtains the which was + /// registered for the given . + /// + /// The for + /// which a read operation has been registered. + /// The constructed . + /// Thrown when is null. + /// Thrown when no create operation + /// has been registered for . + /// Use to find out + /// whether a create operation has been registered for . + internal ClosingStructuresCalculationEntity Get(StructuresCalculation model) + { + return Get(closingStructuresCalculations, model); + } + #endregion } } \ No newline at end of file