Index: Riskeer/Integration/src/Riskeer.Integration.IO/Helpers/ExportableModelRegistry.cs =================================================================== diff -u -r2cd36eedaac4fa2986b41823527527a279e4dbe5 -r6a6f6a117900c065b06806358c86d54894760ee8 --- Riskeer/Integration/src/Riskeer.Integration.IO/Helpers/ExportableModelRegistry.cs (.../ExportableModelRegistry.cs) (revision 2cd36eedaac4fa2986b41823527527a279e4dbe5) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Helpers/ExportableModelRegistry.cs (.../ExportableModelRegistry.cs) (revision 6a6f6a117900c065b06806358c86d54894760ee8) @@ -44,6 +44,14 @@ return new Dictionary(new ReferenceEqualityComparer()); } + /// + /// Gets an indicator whether the contains a value for . + /// + /// The collection to determine whether the is registered. + /// The to determine whether it is registered.. + /// The type of model that was registered. + /// The type of exportable model that is registered with . + /// Thrown when is null. private static bool ContainsValue(Dictionary collection, TModel model) { if (model == null) @@ -54,19 +62,28 @@ return collection.ContainsKey(model); } + /// + /// Registers a with the value in a collection. + /// + /// The collection to register to. + /// The to register. + /// The that is associated with the . + /// The type of model that was registered. + /// The type of exportable model to register with . + /// Thrown when or is null. private static void Register(Dictionary collection, TModel model, TExportableModel exportableModel) { + if (model == null) + { + throw new ArgumentNullException(nameof(model)); + } + if (exportableModel == null) { throw new ArgumentNullException(nameof(exportableModel)); } - if (model == null) - { - throw new ArgumentNullException(nameof(model)); - } - collection[model] = exportableModel; } @@ -76,18 +93,13 @@ /// The collection that contains the lookup information of /// and . /// The to retrieve the for. - /// The model that was registered. + /// The type of model that was registered. /// The type of exportable model that was registered with . /// A . - /// Thrown when any parameter is null. + /// Thrown when any is null. /// Thrown when no item was registered for . private static TExportableModel Get(Dictionary collection, TModel model) { - if (collection == null) - { - throw new ArgumentNullException(nameof(collection)); - } - if (model == null) { throw new ArgumentNullException(nameof(model)); @@ -108,7 +120,7 @@ /// /// Registers the with the value . /// - /// The collection of to be registered. + /// The to be registered. /// The to be registered with. /// Thrown when any of the input parameters is null. public void Register(CombinedFailureMechanismSectionAssemblyResult model, ExportableCombinedFailureMechanismSection exportableModel) @@ -134,7 +146,7 @@ /// /// Checks whether a value has been registered for the given . /// - /// The collection of to check for. + /// The to check for. /// true if the was registered before, false otherwise. /// Thrown when is null. internal bool Contains(CombinedFailureMechanismSectionAssemblyResult model)