mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
General code refactor and reformat.
This commit is contained in:
@@ -36,7 +36,5 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
const string REGEX_TRACK =
|
||||
@"\s?(?<track>\d+)\s+(?<start>\d+)\s(?<flags>\d)\s(?<type>2352|2048)\s(?<filename>.+)\s(?<offset>\d+)$";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -30,21 +30,11 @@
|
||||
// Copyright © 2011-2019 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using DiscImageChef.Checksums;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Exceptions;
|
||||
using DiscImageChef.CommonTypes.Interfaces;
|
||||
using DiscImageChef.CommonTypes.Structs;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Filters;
|
||||
using Schemas;
|
||||
using TrackType = DiscImageChef.CommonTypes.Enums.TrackType;
|
||||
|
||||
namespace DiscImageChef.DiscImages
|
||||
{
|
||||
@@ -83,12 +73,5 @@ namespace DiscImageChef.DiscImages
|
||||
DriveFirmwareRevision = null
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
public partial class Gdi
|
||||
{
|
||||
// Due to .gdi format, this method must parse whole file, ignoring errors (those will be thrown by OpenImage()).
|
||||
// Due to .gdi format, this method must parse whole file, ignoring errors (those will be thrown by OpenImage()).
|
||||
public bool Identify(IFilter imageFilter)
|
||||
{
|
||||
try
|
||||
@@ -105,6 +105,5 @@ namespace DiscImageChef.DiscImages
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
public partial class Gdi
|
||||
{
|
||||
public bool Open(IFilter imageFilter)
|
||||
public bool Open(IFilter imageFilter)
|
||||
{
|
||||
if(imageFilter == null) return false;
|
||||
|
||||
@@ -290,25 +290,14 @@ namespace DiscImageChef.DiscImages
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] ReadSector(ulong sectorAddress)
|
||||
{
|
||||
return ReadSectors(sectorAddress, 1);
|
||||
}
|
||||
public byte[] ReadSector(ulong sectorAddress) => ReadSectors(sectorAddress, 1);
|
||||
|
||||
public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag)
|
||||
{
|
||||
return ReadSectorsTag(sectorAddress, 1, tag);
|
||||
}
|
||||
public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) => ReadSectorsTag(sectorAddress, 1, tag);
|
||||
|
||||
public byte[] ReadSector(ulong sectorAddress, uint track)
|
||||
{
|
||||
return ReadSectors(sectorAddress, 1, track);
|
||||
}
|
||||
public byte[] ReadSector(ulong sectorAddress, uint track) => ReadSectors(sectorAddress, 1, track);
|
||||
|
||||
public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag)
|
||||
{
|
||||
return ReadSectorsTag(sectorAddress, 1, track, tag);
|
||||
}
|
||||
public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) =>
|
||||
ReadSectorsTag(sectorAddress, 1, track, tag);
|
||||
|
||||
public byte[] ReadSectors(ulong sectorAddress, uint length)
|
||||
{
|
||||
@@ -601,15 +590,9 @@ namespace DiscImageChef.DiscImages
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public byte[] ReadSectorLong(ulong sectorAddress)
|
||||
{
|
||||
return ReadSectorsLong(sectorAddress, 1);
|
||||
}
|
||||
public byte[] ReadSectorLong(ulong sectorAddress) => ReadSectorsLong(sectorAddress, 1);
|
||||
|
||||
public byte[] ReadSectorLong(ulong sectorAddress, uint track)
|
||||
{
|
||||
return ReadSectorsLong(sectorAddress, 1, track);
|
||||
}
|
||||
public byte[] ReadSectorLong(ulong sectorAddress, uint track) => ReadSectorsLong(sectorAddress, 1, track);
|
||||
|
||||
public byte[] ReadSectorsLong(ulong sectorAddress, uint length)
|
||||
{
|
||||
@@ -849,9 +832,6 @@ namespace DiscImageChef.DiscImages
|
||||
return failingLbas.Count <= 0;
|
||||
}
|
||||
|
||||
public bool? VerifyMediaImage()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public bool? VerifyMediaImage() => null;
|
||||
}
|
||||
}
|
||||
@@ -75,6 +75,5 @@ namespace DiscImageChef.DiscImages
|
||||
/// <summary>Disk type</summary>
|
||||
public MediaType Disktype;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -37,10 +37,7 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
public partial class Gdi
|
||||
{
|
||||
public byte[] ReadDiskTag(MediaTagType tag)
|
||||
{
|
||||
public byte[] ReadDiskTag(MediaTagType tag) =>
|
||||
throw new FeatureSupportedButNotImplementedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user