mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
🎨REFACTOR: Plugins do not need to expose their methods as virtual.
This commit is contained in:
@@ -106,10 +106,10 @@ namespace DiscImageChef.DiscImages
|
||||
byte[] twiggyCache;
|
||||
byte[] twiggyCacheTags;
|
||||
ImageInfo imageInfo;
|
||||
public virtual ImageInfo Info => imageInfo;
|
||||
public ImageInfo Info => imageInfo;
|
||||
|
||||
public virtual string Name => "Apple DiskCopy 4.2";
|
||||
public virtual Guid Id => new Guid("0240B7B1-E959-4CDC-B0BD-386D6E467B88");
|
||||
public string Name => "Apple DiskCopy 4.2";
|
||||
public Guid Id => new Guid("0240B7B1-E959-4CDC-B0BD-386D6E467B88");
|
||||
|
||||
public DiskCopy42()
|
||||
{
|
||||
@@ -138,7 +138,7 @@ namespace DiscImageChef.DiscImages
|
||||
};
|
||||
}
|
||||
|
||||
public virtual bool IdentifyImage(IFilter imageFilter)
|
||||
public bool IdentifyImage(IFilter imageFilter)
|
||||
{
|
||||
Stream stream = imageFilter.GetDataForkStream();
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
@@ -219,7 +219,7 @@ namespace DiscImageChef.DiscImages
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool OpenImage(IFilter imageFilter)
|
||||
public bool OpenImage(IFilter imageFilter)
|
||||
{
|
||||
Stream stream = imageFilter.GetDataForkStream();
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
@@ -567,17 +567,17 @@ namespace DiscImageChef.DiscImages
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual bool? VerifySector(ulong sectorAddress)
|
||||
public bool? VerifySector(ulong sectorAddress)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual bool? VerifySector(ulong sectorAddress, uint track)
|
||||
public bool? VerifySector(ulong sectorAddress, uint track)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List<ulong> failingLbas,
|
||||
public bool? VerifySectors(ulong sectorAddress, uint length, out List<ulong> failingLbas,
|
||||
out List<ulong> unknownLbas)
|
||||
{
|
||||
failingLbas = new List<ulong>();
|
||||
@@ -588,7 +588,7 @@ namespace DiscImageChef.DiscImages
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List<ulong> failingLbas,
|
||||
public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List<ulong> failingLbas,
|
||||
out List<ulong> unknownLbas)
|
||||
{
|
||||
failingLbas = new List<ulong>();
|
||||
@@ -599,7 +599,7 @@ namespace DiscImageChef.DiscImages
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual bool? VerifyMediaImage()
|
||||
public bool? VerifyMediaImage()
|
||||
{
|
||||
byte[] data = new byte[header.DataSize];
|
||||
byte[] tags = new byte[header.TagSize];
|
||||
@@ -631,17 +631,17 @@ namespace DiscImageChef.DiscImages
|
||||
return dataChk == header.DataChecksum && tagsChk == header.TagChecksum;
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSector(ulong sectorAddress)
|
||||
public byte[] ReadSector(ulong sectorAddress)
|
||||
{
|
||||
return ReadSectors(sectorAddress, 1);
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag)
|
||||
public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag)
|
||||
{
|
||||
return ReadSectorsTag(sectorAddress, 1, tag);
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSectors(ulong sectorAddress, uint length)
|
||||
public byte[] ReadSectors(ulong sectorAddress, uint length)
|
||||
{
|
||||
if(sectorAddress > imageInfo.Sectors - 1)
|
||||
throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found");
|
||||
@@ -664,7 +664,7 @@ namespace DiscImageChef.DiscImages
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag)
|
||||
public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag)
|
||||
{
|
||||
if(tag != SectorTagType.AppleSectorTag)
|
||||
throw new FeatureUnsupportedImageException($"Tag {tag} not supported by image format");
|
||||
@@ -690,12 +690,12 @@ namespace DiscImageChef.DiscImages
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSectorLong(ulong sectorAddress)
|
||||
public byte[] ReadSectorLong(ulong sectorAddress)
|
||||
{
|
||||
return ReadSectorsLong(sectorAddress, 1);
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length)
|
||||
public byte[] ReadSectorsLong(ulong sectorAddress, uint length)
|
||||
{
|
||||
if(sectorAddress > imageInfo.Sectors - 1)
|
||||
throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found");
|
||||
@@ -717,58 +717,58 @@ namespace DiscImageChef.DiscImages
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public virtual string ImageFormat => "Apple DiskCopy 4.2";
|
||||
public string ImageFormat => "Apple DiskCopy 4.2";
|
||||
|
||||
public virtual byte[] ReadDiskTag(MediaTagType tag)
|
||||
public byte[] ReadDiskTag(MediaTagType tag)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public virtual List<Partition> Partitions =>
|
||||
public List<Partition> Partitions =>
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
|
||||
public virtual List<Track> Tracks =>
|
||||
public List<Track> Tracks =>
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
|
||||
public virtual List<Track> GetSessionTracks(Session session)
|
||||
public List<Track> GetSessionTracks(Session session)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public virtual List<Track> GetSessionTracks(ushort session)
|
||||
public List<Track> GetSessionTracks(ushort session)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public virtual List<Session> Sessions =>
|
||||
public List<Session> Sessions =>
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
|
||||
public virtual byte[] ReadSector(ulong sectorAddress, uint track)
|
||||
public byte[] ReadSector(ulong sectorAddress, uint track)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag)
|
||||
public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track)
|
||||
public byte[] ReadSectors(ulong sectorAddress, uint length, uint track)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag)
|
||||
public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track)
|
||||
public byte[] ReadSectorLong(ulong sectorAddress, uint track)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track)
|
||||
public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user