From 0e8ecab865ae8e5d4a78bd6baa4274f0a862a8b0 Mon Sep 17 00:00:00 2001 From: Richard Webb Date: Mon, 18 Nov 2024 18:16:08 +0000 Subject: [PATCH] Read data for PropertyIdentifierAndOffset using the Read() member function Just a thought - the code coverage report shows the Read() function as unused (the Write function is used for writes, so this is maybe a bit more consistent) --- OpenMcdf.Ole/PropertySetStream.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/OpenMcdf.Ole/PropertySetStream.cs b/OpenMcdf.Ole/PropertySetStream.cs index 57caf285..b76f30ac 100644 --- a/OpenMcdf.Ole/PropertySetStream.cs +++ b/OpenMcdf.Ole/PropertySetStream.cs @@ -58,11 +58,8 @@ public void Read(BinaryReader br) // Read property offsets (P0) for (int i = 0; i < propertyCount; i++) { - PropertyIdentifierAndOffset pio = new() - { - PropertyIdentifier = br.ReadUInt32(), - Offset = br.ReadUInt32() - }; + PropertyIdentifierAndOffset pio = new(); + pio.Read(br); PropertySet0.PropertyIdentifierAndOffsets.Add(pio); } @@ -92,11 +89,8 @@ public void Read(BinaryReader br) // Read property offsets for (int i = 0; i < propertyCount; i++) { - PropertyIdentifierAndOffset pio = new() - { - PropertyIdentifier = br.ReadUInt32(), - Offset = br.ReadUInt32() - }; + PropertyIdentifierAndOffset pio = new(); + pio.Read(br); PropertySet1.PropertyIdentifierAndOffsets.Add(pio); }