mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
🎨🎨🎨 Removed methods in images that only returned what's already in the ImageInfo structure.
This commit is contained in:
@@ -136,13 +136,13 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
ReadableSectorTags = new List<SectorTagType>(),
|
||||
ReadableMediaTags = new List<MediaTagType>(),
|
||||
ImageHasPartitions = false,
|
||||
ImageHasSessions = false,
|
||||
ImageVersion = null,
|
||||
ImageApplication = null,
|
||||
ImageApplicationVersion = null,
|
||||
ImageCreator = null,
|
||||
ImageComments = null,
|
||||
HasPartitions = false,
|
||||
HasSessions = false,
|
||||
Version = null,
|
||||
Application = null,
|
||||
ApplicationVersion = null,
|
||||
Creator = null,
|
||||
Comments = null,
|
||||
MediaManufacturer = null,
|
||||
MediaModel = null,
|
||||
MediaSerialNumber = null,
|
||||
@@ -157,6 +157,17 @@ namespace DiscImageChef.DiscImages
|
||||
};
|
||||
}
|
||||
|
||||
public override string ImageFormat => "VHDX";
|
||||
|
||||
public override List<Partition> Partitions =>
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
|
||||
public override List<Track> Tracks =>
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
|
||||
public override List<Session> Sessions =>
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
|
||||
public override bool IdentifyImage(Filter imageFilter)
|
||||
{
|
||||
Stream stream = imageFilter.GetDataForkStream();
|
||||
@@ -192,7 +203,7 @@ namespace DiscImageChef.DiscImages
|
||||
|
||||
if(vhdxId.signature != VHDX_SIGNATURE) return false;
|
||||
|
||||
ImageInfo.ImageApplication = Encoding.Unicode.GetString(vhdxId.creator);
|
||||
ImageInfo.Application = Encoding.Unicode.GetString(vhdxId.creator);
|
||||
|
||||
stream.Seek(64 * 1024, SeekOrigin.Begin);
|
||||
byte[] vHdrB = new byte[Marshal.SizeOf(vHdr)];
|
||||
@@ -530,9 +541,9 @@ namespace DiscImageChef.DiscImages
|
||||
sectorCache = new Dictionary<ulong, byte[]>();
|
||||
blockCache = new Dictionary<ulong, byte[]>();
|
||||
|
||||
ImageInfo.ImageCreationTime = imageFilter.GetCreationTime();
|
||||
ImageInfo.ImageLastModificationTime = imageFilter.GetLastWriteTime();
|
||||
ImageInfo.ImageName = Path.GetFileNameWithoutExtension(imageFilter.GetFilename());
|
||||
ImageInfo.CreationTime = imageFilter.GetCreationTime();
|
||||
ImageInfo.LastModificationTime = imageFilter.GetLastWriteTime();
|
||||
ImageInfo.MediaTitle = Path.GetFileNameWithoutExtension(imageFilter.GetFilename());
|
||||
ImageInfo.SectorSize = logicalSectorSize;
|
||||
ImageInfo.XmlMediaType = XmlMediaType.BlockMedia;
|
||||
ImageInfo.MediaType = MediaType.GENERIC_HDD;
|
||||
@@ -560,71 +571,6 @@ namespace DiscImageChef.DiscImages
|
||||
return (sectorBitmap[index] & val) == val;
|
||||
}
|
||||
|
||||
public override bool ImageHasPartitions()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override ulong GetImageSize()
|
||||
{
|
||||
return ImageInfo.ImageSize;
|
||||
}
|
||||
|
||||
public override ulong GetSectors()
|
||||
{
|
||||
return ImageInfo.Sectors;
|
||||
}
|
||||
|
||||
public override uint GetSectorSize()
|
||||
{
|
||||
return ImageInfo.SectorSize;
|
||||
}
|
||||
|
||||
public override string GetImageFormat()
|
||||
{
|
||||
return "VHDX";
|
||||
}
|
||||
|
||||
public override string GetImageVersion()
|
||||
{
|
||||
return ImageInfo.ImageVersion;
|
||||
}
|
||||
|
||||
public override string GetImageApplication()
|
||||
{
|
||||
return ImageInfo.ImageApplication;
|
||||
}
|
||||
|
||||
public override string GetImageApplicationVersion()
|
||||
{
|
||||
return ImageInfo.ImageApplicationVersion;
|
||||
}
|
||||
|
||||
public override string GetImageCreator()
|
||||
{
|
||||
return ImageInfo.ImageCreator;
|
||||
}
|
||||
|
||||
public override DateTime GetImageCreationTime()
|
||||
{
|
||||
return ImageInfo.ImageCreationTime;
|
||||
}
|
||||
|
||||
public override DateTime GetImageLastModificationTime()
|
||||
{
|
||||
return ImageInfo.ImageLastModificationTime;
|
||||
}
|
||||
|
||||
public override string GetImageName()
|
||||
{
|
||||
return ImageInfo.ImageName;
|
||||
}
|
||||
|
||||
public override MediaType GetMediaType()
|
||||
{
|
||||
return MediaType.GENERIC_HDD;
|
||||
}
|
||||
|
||||
public override byte[] ReadSector(ulong sectorAddress)
|
||||
{
|
||||
if(sectorAddress > ImageInfo.Sectors - 1)
|
||||
@@ -706,11 +652,6 @@ namespace DiscImageChef.DiscImages
|
||||
return ~checksum;
|
||||
}
|
||||
|
||||
public override string GetImageComments()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override byte[] ReadDiskTag(MediaTagType tag)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
@@ -766,66 +707,6 @@ namespace DiscImageChef.DiscImages
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public override string GetMediaManufacturer()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string GetMediaModel()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string GetMediaSerialNumber()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string GetMediaBarcode()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string GetMediaPartNumber()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override int GetMediaSequence()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override int GetLastDiskSequence()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override string GetDriveManufacturer()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string GetDriveModel()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string GetDriveSerialNumber()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override List<Partition> GetPartitions()
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public override List<Track> GetTracks()
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public override List<Track> GetSessionTracks(Session session)
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
@@ -836,11 +717,6 @@ namespace DiscImageChef.DiscImages
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public override List<Session> GetSessions()
|
||||
{
|
||||
throw new FeatureUnsupportedImageException("Feature not supported by image format");
|
||||
}
|
||||
|
||||
public override bool? VerifySector(ulong sectorAddress)
|
||||
{
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user