Index: Ringtoets/Common/src/Ringtoets.Common.IO/Structures/StructureLocationReader.cs =================================================================== diff -u -rb9e640cceb967cc24e3999c373ddb5040e59a1f0 -r94f14096f9a5565b9f961c7b7e1822ef0976a42a --- Ringtoets/Common/src/Ringtoets.Common.IO/Structures/StructureLocationReader.cs (.../StructureLocationReader.cs) (revision b9e640cceb967cc24e3999c373ddb5040e59a1f0) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Structures/StructureLocationReader.cs (.../StructureLocationReader.cs) (revision 94f14096f9a5565b9f961c7b7e1822ef0976a42a) @@ -103,14 +103,24 @@ { throw new LineParseException(string.Format(Resources.StructuresReader_GetNextStructure_Invalid_KWKIDENT, idAttributeName)); } + return new StructureLocation(attributeIdValue, attributeNameValue, point); } public void Dispose() { - pointsShapeFileReader.Dispose(); + Dispose(true); + GC.SuppressFinalize(this); } + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + pointsShapeFileReader.Dispose(); + } + } + private static string GetIdAttributeValue(IDictionary attributes) { var attributeIdValue = attributes[idAttributeName] as string; @@ -123,6 +133,7 @@ { return defaultName; } + var attributeNameValue = attributes[nameAttributeName] as string; return string.IsNullOrWhiteSpace(attributeNameValue) ? defaultName : attributeNameValue; }