Refactor IMediaImage.ReadSector(s)Long to return error status instead of buffer.

This commit is contained in:
2021-09-20 14:22:22 +01:00
parent 88aeda7240
commit a6690aa121
77 changed files with 1048 additions and 555 deletions

View File

@@ -46,12 +46,20 @@ namespace Aaru.DiscImages
throw new FeatureUnsupportedImageException("Feature not supported by image format");
/// <inheritdoc />
public byte[] ReadSectorLong(ulong sectorAddress) =>
throw new FeatureUnsupportedImageException("Feature not supported by image format");
public ErrorNumber ReadSectorLong(ulong sectorAddress, out byte[] buffer)
{
buffer = null;
return ErrorNumber.NotSupported;
}
/// <inheritdoc />
public byte[] ReadSectorsLong(ulong sectorAddress, uint length) =>
throw new FeatureUnsupportedImageException("Feature not supported by image format");
public ErrorNumber ReadSectorsLong(ulong sectorAddress, uint length, out byte[] buffer)
{
buffer = null;
return ErrorNumber.NotSupported;
}
/// <inheritdoc />
public ErrorNumber ReadMediaTag(MediaTagType tag, out byte[] buffer)