General code refactor and reformat.

This commit is contained in:
2018-12-31 13:17:27 +00:00
parent 6b12cd1a8e
commit f2caa8c40f
413 changed files with 3554 additions and 6549 deletions

View File

@@ -155,8 +155,8 @@ namespace DiscImageChef.DiscImages
imageInfo.SectorSize = header.sectorSize;
imageInfo.MediaType = Geometry.GetMediaType(((ushort)header.totalCylinders, (byte)header.heads,
header.sectorsPerTrack, (uint)header.sectorSize,
MediaEncoding.MFM, false));
header.sectorsPerTrack, (uint)header.sectorSize,
MediaEncoding.MFM, false));
switch(imageInfo.MediaType)
{
@@ -187,15 +187,9 @@ namespace DiscImageChef.DiscImages
return true;
}
public bool? VerifyMediaImage()
{
return calculatedDataCrc == header.crc && headerChecksumOk;
}
public bool? VerifyMediaImage() => calculatedDataCrc == header.crc && headerChecksumOk;
public byte[] ReadSector(ulong sectorAddress)
{
return ReadSectors(sectorAddress, 1);
}
public byte[] ReadSector(ulong sectorAddress) => ReadSectors(sectorAddress, 1);
public byte[] ReadSectors(ulong sectorAddress, uint length)
{