Override Marshal.SizeOf in Helpers and use it instead of System's.

This commit is contained in:
2019-03-01 07:35:22 +00:00
parent 0ec558da55
commit e14c19279a
116 changed files with 1138 additions and 1182 deletions

View File

@@ -30,12 +30,11 @@
// Copyright © 2011-2019 Natalia Portillo
// ****************************************************************************/
using System;
using System.Runtime.InteropServices;
using System.Text;
using Claunia.Encoding;
using DiscImageChef.CommonTypes;
using DiscImageChef.CommonTypes.Interfaces;
using DiscImageChef.Helpers;
using Schemas;
using Encoding = System.Text.Encoding;
@@ -52,7 +51,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
int spt = imagePlugin.Info.Sectors == 455 ? 13 : 16;
byte[] vtocB = imagePlugin.ReadSector((ulong)(17 * spt));
vtoc = Helpers.Marshal.ByteArrayToStructureLittleEndian<Vtoc>(vtocB);
vtoc = Marshal.ByteArrayToStructureLittleEndian<Vtoc>(vtocB);
return vtoc.catalogSector < spt && vtoc.maxTrackSectorPairsPerSector <= 122 &&
vtoc.sectorsPerTrack == spt && vtoc.bytesPerSector == 256;
@@ -69,7 +68,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
spt = imagePlugin.Info.Sectors == 455 ? 13 : 16;
byte[] vtocB = imagePlugin.ReadSector((ulong)(17 * spt));
vtoc = Helpers.Marshal.ByteArrayToStructureLittleEndian<Vtoc>(vtocB);
vtoc = Marshal.ByteArrayToStructureLittleEndian<Vtoc>(vtocB);
sb.AppendLine("Apple DOS File System");
sb.AppendLine();