diff --git a/DiscImageChef.DiscImages/Alcohol120.cs b/DiscImageChef.DiscImages/Alcohol120.cs index c41da6253..1074991f3 100644 --- a/DiscImageChef.DiscImages/Alcohol120.cs +++ b/DiscImageChef.DiscImages/Alcohol120.cs @@ -93,15 +93,15 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; - public virtual string Name => "Alcohol 120% Media Descriptor Structure"; - public virtual Guid Id => new Guid("A78FBEBA-0307-4915-BDE3-B8A3B57F843F"); + public ImageInfo Info => imageInfo; + public string Name => "Alcohol 120% Media Descriptor Structure"; + public Guid Id => new Guid("A78FBEBA-0307-4915-BDE3-B8A3B57F843F"); - public virtual string ImageFormat => "Alcohol 120% Media Descriptor Structure"; + public string ImageFormat => "Alcohol 120% Media Descriptor Structure"; - public virtual List Partitions => partitions; + public List Partitions => partitions; - public virtual List Tracks + public List Tracks { get { @@ -154,9 +154,9 @@ namespace DiscImageChef.DiscImages } } - public virtual List Sessions => sessions; + public List Sessions => sessions; - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -172,7 +172,7 @@ namespace DiscImageChef.DiscImages return header.signature == "MEDIA DESCRIPTO"; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -697,7 +697,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { switch(tag) { @@ -730,27 +730,27 @@ namespace DiscImageChef.DiscImages } } - 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[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { return ReadSectors(sectorAddress, 1, track); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) { return ReadSectorsTag(sectorAddress, 1, track, tag); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in offsetmap) if(sectorAddress >= kvp.Value) @@ -766,7 +766,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { foreach(KeyValuePair kvp in offsetmap) if(sectorAddress >= kvp.Value) @@ -782,7 +782,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { if(!alcTracks.TryGetValue((int)track, out AlcoholTrack alcTrack) || !alcTrackExtras.TryGetValue((int)track, out AlcoholTrackExtra alcExtra)) @@ -875,7 +875,7 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) { if(!alcTracks.TryGetValue((int)track, out AlcoholTrack alcTrack) || !alcTrackExtras.TryGetValue((int)track, out AlcoholTrackExtra alcExtra)) @@ -1198,17 +1198,17 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { return ReadSectorsLong(sectorAddress, 1); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { return ReadSectorsLong(sectorAddress, 1, track); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in offsetmap) if(sectorAddress >= kvp.Value) @@ -1224,7 +1224,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { if(!alcTracks.TryGetValue((int)track, out AlcoholTrack alcTrack) || !alcTrackExtras.TryGetValue((int)track, out AlcoholTrackExtra alcExtra)) @@ -1266,14 +1266,14 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { if(sessions.Contains(session)) return GetSessionTracks(session.SessionSequence); throw new ImageNotSupportedException("Session does not exist in disc image"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { List tracks = new List(); @@ -1324,19 +1324,19 @@ namespace DiscImageChef.DiscImages return tracks; } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { byte[] buffer = ReadSectorLong(sectorAddress); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { byte[] buffer = ReadSectorLong(sectorAddress, track); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length); @@ -1366,7 +1366,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length, track); @@ -1396,7 +1396,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/Anex86.cs b/DiscImageChef.DiscImages/Anex86.cs index 956203abe..103782fe0 100644 --- a/DiscImageChef.DiscImages/Anex86.cs +++ b/DiscImageChef.DiscImages/Anex86.cs @@ -73,23 +73,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Anex86 Disk Image"; - public virtual Guid Id => new Guid("0410003E-6E7B-40E6-9328-BA5651ADF6B7"); + public string Name => "Anex86 Disk Image"; + public Guid Id => new Guid("0410003E-6E7B-40E6-9328-BA5651ADF6B7"); - public virtual string ImageFormat => "Anex86 disk image"; + public string ImageFormat => "Anex86 disk image"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -118,7 +118,7 @@ namespace DiscImageChef.DiscImages fdihdr.dskSize == fdihdr.bps * fdihdr.spt * fdihdr.heads * fdihdr.cylinders; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -329,12 +329,12 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -353,82 +353,82 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -438,13 +438,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/Apple2MG.cs b/DiscImageChef.DiscImages/Apple2MG.cs index 89fc6c61b..5ab9005df 100644 --- a/DiscImageChef.DiscImages/Apple2MG.cs +++ b/DiscImageChef.DiscImages/Apple2MG.cs @@ -115,23 +115,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Apple 2IMG"; - public virtual Guid Id => new Guid("CBAF8824-BA5F-415F-953A-19A03519B2D1"); + public string Name => "Apple 2IMG"; + public Guid Id => new Guid("CBAF8824-BA5F-415F-953A-19A03519B2D1"); - public virtual string ImageFormat => "Apple 2IMG"; + public string ImageFormat => "Apple 2IMG"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -165,7 +165,7 @@ namespace DiscImageChef.DiscImages return creatoroff + creatorsize <= stream.Length; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -351,12 +351,12 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -375,82 +375,82 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -460,13 +460,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/AppleDOS.cs b/DiscImageChef.DiscImages/AppleDOS.cs index 194557249..f211b784b 100644 --- a/DiscImageChef.DiscImages/AppleDOS.cs +++ b/DiscImageChef.DiscImages/AppleDOS.cs @@ -72,29 +72,29 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Apple ][ Interleaved Disk Image"; - public virtual Guid Id => new Guid("A5828AC0-62C9-4304-81D4-EFD4AAE47360"); + public string Name => "Apple ][ Interleaved Disk Image"; + public Guid Id => new Guid("A5828AC0-62C9-4304-81D4-EFD4AAE47360"); - public virtual string ImageFormat => extension == ".po" + public string ImageFormat => extension == ".po" ? "Apple ][ Interleaved Disk Image (ProDOS order)" : "Apple ][ Interleaved Disk Image (DOS order)"; - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { extension = Path.GetExtension(imageFilter.GetFilename())?.ToLower(); return imageFilter.GetDataForkLength() == 143360 && (extension == ".po" || extension == ".do"); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -129,12 +129,12 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -149,17 +149,17 @@ namespace DiscImageChef.DiscImages return buffer; } - 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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -170,7 +170,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -181,37 +181,37 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { 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[] 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[] 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"); } @@ -222,40 +222,40 @@ namespace DiscImageChef.DiscImages #endregion #region Unsupported features - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List Partitions => + public List Partitions => 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[] 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"); } diff --git a/DiscImageChef.DiscImages/AppleNIB.cs b/DiscImageChef.DiscImages/AppleNIB.cs index f6c8412a3..2caf1d17b 100644 --- a/DiscImageChef.DiscImages/AppleNIB.cs +++ b/DiscImageChef.DiscImages/AppleNIB.cs @@ -91,23 +91,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Apple NIB"; - public virtual Guid Id => new Guid("AE171AE8-6747-49CC-B861-9D450B7CD42E"); + public string Name => "Apple NIB"; + public Guid Id => new Guid("AE171AE8-6747-49CC-B861-9D450B7CD42E"); - public virtual string ImageFormat => "Apple nibbles"; + public string ImageFormat => "Apple nibbles"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -120,7 +120,7 @@ namespace DiscImageChef.DiscImages return Apple2.IsApple2GCR(test); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -270,7 +270,7 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -280,7 +280,7 @@ namespace DiscImageChef.DiscImages return temp; } - 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), @@ -300,7 +300,7 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -313,7 +313,7 @@ namespace DiscImageChef.DiscImages return temp; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -336,7 +336,7 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -346,7 +346,7 @@ namespace DiscImageChef.DiscImages return temp; } - 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), @@ -366,62 +366,62 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -431,13 +431,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/Apridisk.cs b/DiscImageChef.DiscImages/Apridisk.cs index d86be7829..b3c42911e 100644 --- a/DiscImageChef.DiscImages/Apridisk.cs +++ b/DiscImageChef.DiscImages/Apridisk.cs @@ -86,23 +86,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "ACT Apricot Disk Image"; - public virtual Guid Id => new Guid("43408CF3-6DB3-449F-A779-2B0E497C5B14"); + public string Name => "ACT Apricot Disk Image"; + public Guid Id => new Guid("43408CF3-6DB3-449F-A779-2B0E497C5B14"); - public virtual string ImageFormat => "ACT Apricot disk image"; + public string ImageFormat => "ACT Apricot disk image"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -115,7 +115,7 @@ namespace DiscImageChef.DiscImages return sigB.SequenceEqual(signature); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -322,7 +322,7 @@ namespace DiscImageChef.DiscImages return uLen; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { (ushort cylinder, byte head, byte sector) = LbaToChs(sectorAddress); @@ -338,7 +338,7 @@ namespace DiscImageChef.DiscImages return sectorsData[cylinder][head][sector]; } - 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"); @@ -365,82 +365,82 @@ namespace DiscImageChef.DiscImages return (cylinder, head, sector); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -450,13 +450,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/BLU.cs b/DiscImageChef.DiscImages/BLU.cs index 385df80ae..997760a2f 100644 --- a/DiscImageChef.DiscImages/BLU.cs +++ b/DiscImageChef.DiscImages/BLU.cs @@ -78,23 +78,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Basic Lisa Utility"; - public virtual Guid Id => new Guid("A153E2F8-4235-432D-9A7F-20807B0BCD74"); + public string Name => "Basic Lisa Utility"; + public Guid Id => new Guid("A153E2F8-4235-432D-9A7F-20807B0BCD74"); - public virtual string ImageFormat => "Basic Lisa Utility"; + public string ImageFormat => "Basic Lisa Utility"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -117,7 +117,7 @@ namespace DiscImageChef.DiscImages return (tmpHdr.BytesPerBlock & 0xFE00) == 0x200; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -207,17 +207,17 @@ namespace DiscImageChef.DiscImages return true; } - 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"); @@ -245,7 +245,7 @@ namespace DiscImageChef.DiscImages return buffer.ToArray(); } - 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"); @@ -278,12 +278,12 @@ namespace DiscImageChef.DiscImages return buffer.ToArray(); } - 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"); @@ -299,47 +299,47 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { 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"); } @@ -353,17 +353,17 @@ namespace DiscImageChef.DiscImages } #region Verification, should add tag checksum checks - 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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -374,7 +374,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -385,7 +385,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/BlindWrite4.cs b/DiscImageChef.DiscImages/BlindWrite4.cs index 6e4e2953c..b2afd396d 100644 --- a/DiscImageChef.DiscImages/BlindWrite4.cs +++ b/DiscImageChef.DiscImages/BlindWrite4.cs @@ -88,20 +88,20 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "BlindWrite 4"; - public virtual Guid Id => new Guid("664568B2-15D4-4E64-8A7A-20BDA8B8386F"); + public string Name => "BlindWrite 4"; + public Guid Id => new Guid("664568B2-15D4-4E64-8A7A-20BDA8B8386F"); - public virtual string ImageFormat => "BlindWrite 4 TOC file"; + public string ImageFormat => "BlindWrite 4 TOC file"; - public virtual List Partitions => partitions; + public List Partitions => partitions; - public virtual List Tracks => tracks; + public List Tracks => tracks; - public virtual List Sessions => sessions; + public List Sessions => sessions; - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -113,7 +113,7 @@ namespace DiscImageChef.DiscImages return bw4Signature.SequenceEqual(signature); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -744,7 +744,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { switch(tag) { @@ -759,27 +759,27 @@ namespace DiscImageChef.DiscImages } } - 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[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { return ReadSectors(sectorAddress, 1, track); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) { return ReadSectorsTag(sectorAddress, 1, track, tag); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -793,7 +793,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -807,7 +807,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { Track dicTrack = new Track {TrackSequence = 0}; @@ -881,7 +881,7 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) { Track dicTrack = new Track {TrackSequence = 0}; @@ -1040,17 +1040,17 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { return ReadSectorsLong(sectorAddress, 1); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { return ReadSectorsLong(sectorAddress, 1, track); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1064,7 +1064,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { Track dicTrack = new Track {TrackSequence = 0}; @@ -1110,31 +1110,31 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { if(sessions.Contains(session)) return GetSessionTracks(session.SessionSequence); throw new ImageNotSupportedException("Session does not exist in disc image"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { return tracks.Where(track => track.TrackSession == session).ToList(); } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { byte[] buffer = ReadSectorLong(sectorAddress); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { byte[] buffer = ReadSectorLong(sectorAddress, track); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length); @@ -1164,7 +1164,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length, track); @@ -1194,7 +1194,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/BlindWrite5.cs b/DiscImageChef.DiscImages/BlindWrite5.cs index 2f4670900..1ed4b5edd 100644 --- a/DiscImageChef.DiscImages/BlindWrite5.cs +++ b/DiscImageChef.DiscImages/BlindWrite5.cs @@ -106,20 +106,20 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "BlindWrite 5"; - public virtual Guid Id => new Guid("9CB7A381-0509-4F9F-B801-3F65434BC3EE"); + public string Name => "BlindWrite 5"; + public Guid Id => new Guid("9CB7A381-0509-4F9F-B801-3F65434BC3EE"); - public virtual string ImageFormat => "BlindWrite 5 TOC file"; + public string ImageFormat => "BlindWrite 5 TOC file"; - public virtual List Partitions => partitions; + public List Partitions => partitions; - public virtual List Tracks => tracks; + public List Tracks => tracks; - public virtual List Sessions => sessions; + public List Sessions => sessions; - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -135,7 +135,7 @@ namespace DiscImageChef.DiscImages return bw5Signature.SequenceEqual(signature) && bw5Footer.SequenceEqual(footer); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -1035,7 +1035,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { switch(tag) { @@ -1093,27 +1093,27 @@ namespace DiscImageChef.DiscImages } } - 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[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { return ReadSectors(sectorAddress, 1, track); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) { return ReadSectorsTag(sectorAddress, 1, track, tag); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1127,7 +1127,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1141,7 +1141,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { // TODO: Cross data files Track dicTrack = new Track(); @@ -1260,7 +1260,7 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) { // TODO: Cross data files Track dicTrack = new Track(); @@ -1544,17 +1544,17 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { return ReadSectorsLong(sectorAddress, 1); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { return ReadSectorsLong(sectorAddress, 1, track); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1568,7 +1568,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { // TODO: Cross data files Track dicTrack = new Track(); @@ -1662,31 +1662,31 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { if(sessions.Contains(session)) return GetSessionTracks(session.SessionSequence); throw new ImageNotSupportedException("Session does not exist in disc image"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { return tracks.Where(dicTrack => dicTrack.TrackSession == session).ToList(); } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { byte[] buffer = ReadSectorLong(sectorAddress); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { byte[] buffer = ReadSectorLong(sectorAddress, track); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length); @@ -1716,7 +1716,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length, track); @@ -1746,7 +1746,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/CDRDAO.cs b/DiscImageChef.DiscImages/CDRDAO.cs index e9244f5a2..c52523a53 100644 --- a/DiscImageChef.DiscImages/CDRDAO.cs +++ b/DiscImageChef.DiscImages/CDRDAO.cs @@ -136,16 +136,16 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "CDRDAO tocfile"; - public virtual Guid Id => new Guid("04D7BA12-1BE8-44D4-97A4-1B48A505463E"); + public string Name => "CDRDAO tocfile"; + public Guid Id => new Guid("04D7BA12-1BE8-44D4-97A4-1B48A505463E"); - public virtual string ImageFormat => "CDRDAO tocfile"; + public string ImageFormat => "CDRDAO tocfile"; - public virtual List Partitions => partitions; + public List Partitions => partitions; - public virtual List Tracks + public List Tracks { get { @@ -191,9 +191,9 @@ namespace DiscImageChef.DiscImages } } - public virtual List Sessions => throw new NotImplementedException(); + public List Sessions => throw new NotImplementedException(); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { try { @@ -248,7 +248,7 @@ namespace DiscImageChef.DiscImages } } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { if(imageFilter == null) return false; @@ -933,7 +933,7 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { switch(tag) { @@ -948,27 +948,27 @@ namespace DiscImageChef.DiscImages } } - 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[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { return ReadSectors(sectorAddress, 1, track); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) { return ReadSectorsTag(sectorAddress, 1, track, tag); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -981,7 +981,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -994,7 +994,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { CdrdaoTrack dicTrack = new CdrdaoTrack {Sequence = 0}; @@ -1086,7 +1086,7 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) { CdrdaoTrack dicTrack = new CdrdaoTrack {Sequence = 0}; @@ -1252,17 +1252,17 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { return ReadSectorsLong(sectorAddress, 1); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { return ReadSectorsLong(sectorAddress, 1, track); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1275,7 +1275,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { CdrdaoTrack dicTrack = new CdrdaoTrack {Sequence = 0}; @@ -1358,31 +1358,31 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { return GetSessionTracks(session.SessionSequence); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { if(session == 1) return Tracks; throw new ImageNotSupportedException("Session does not exist in disc image"); } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { byte[] buffer = ReadSectorLong(sectorAddress); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { byte[] buffer = ReadSectorLong(sectorAddress, track); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length); @@ -1412,7 +1412,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length, track); @@ -1442,7 +1442,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/CDRWin.cs b/DiscImageChef.DiscImages/CDRWin.cs index b9550bcd8..98e2497a4 100644 --- a/DiscImageChef.DiscImages/CDRWin.cs +++ b/DiscImageChef.DiscImages/CDRWin.cs @@ -203,16 +203,16 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "CDRWin cuesheet"; - public virtual Guid Id => new Guid("664568B2-15D4-4E64-8A7A-20BDA8B8386F"); + public string Name => "CDRWin cuesheet"; + public Guid Id => new Guid("664568B2-15D4-4E64-8A7A-20BDA8B8386F"); - public virtual string ImageFormat => "CDRWin CUESheet"; + public string ImageFormat => "CDRWin CUESheet"; - public virtual List Partitions => partitions; + public List Partitions => partitions; - public virtual List Tracks + public List Tracks { get { @@ -259,10 +259,10 @@ namespace DiscImageChef.DiscImages } } - public virtual List Sessions => discimage.Sessions; + public List Sessions => discimage.Sessions; // Due to .cue format, this method must parse whole file, ignoring errors (those will be thrown by OpenImage()). - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { cdrwinFilter = imageFilter; @@ -323,7 +323,7 @@ namespace DiscImageChef.DiscImages } } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { if(imageFilter == null) return false; @@ -1192,7 +1192,7 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { switch(tag) { @@ -1215,27 +1215,27 @@ namespace DiscImageChef.DiscImages } } - 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[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { return ReadSectors(sectorAddress, 1, track); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) { return ReadSectorsTag(sectorAddress, 1, track, tag); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1248,7 +1248,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1261,7 +1261,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { CdrWinTrack dicTrack = new CdrWinTrack {Sequence = 0}; @@ -1365,7 +1365,7 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) { CdrWinTrack dicTrack = new CdrWinTrack {Sequence = 0}; @@ -1546,17 +1546,17 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { return ReadSectorsLong(sectorAddress, 1); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { return ReadSectorsLong(sectorAddress, 1, track); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1569,7 +1569,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { CdrWinTrack dicTrack = new CdrWinTrack {Sequence = 0}; @@ -1658,14 +1658,14 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { if(discimage.Sessions.Contains(session)) return GetSessionTracks(session.SessionSequence); throw new ImageNotSupportedException("Session does not exist in disc image"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { List tracks = new List(); @@ -1706,19 +1706,19 @@ namespace DiscImageChef.DiscImages return tracks; } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { byte[] buffer = ReadSectorLong(sectorAddress); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { byte[] buffer = ReadSectorLong(sectorAddress, track); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length); @@ -1748,7 +1748,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length, track); @@ -1778,7 +1778,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/CHD.cs b/DiscImageChef.DiscImages/CHD.cs index abba93052..feb9ff7c0 100644 --- a/DiscImageChef.DiscImages/CHD.cs +++ b/DiscImageChef.DiscImages/CHD.cs @@ -160,14 +160,14 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "MAME Compressed Hunks of Data"; - public virtual Guid Id => new Guid("0D50233A-08BD-47D4-988B-27EAA0358597"); + public string Name => "MAME Compressed Hunks of Data"; + public Guid Id => new Guid("0D50233A-08BD-47D4-988B-27EAA0358597"); - public virtual string ImageFormat => "Compressed Hunks of Data"; + public string ImageFormat => "Compressed Hunks of Data"; - public virtual List Partitions + public List Partitions { get { @@ -179,7 +179,7 @@ namespace DiscImageChef.DiscImages } } - public virtual List Tracks + public List Tracks { get { @@ -191,7 +191,7 @@ namespace DiscImageChef.DiscImages } } - public virtual List Sessions + public List Sessions { get { @@ -203,7 +203,7 @@ namespace DiscImageChef.DiscImages } } - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -213,7 +213,7 @@ namespace DiscImageChef.DiscImages return chdTag.SequenceEqual(magic); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -1348,7 +1348,7 @@ namespace DiscImageChef.DiscImages return hunk; } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { if(isHdd) return null; @@ -1356,7 +1356,7 @@ namespace DiscImageChef.DiscImages return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { if(isHdd) throw new FeaturedNotSupportedByDiscImageException("Cannot access optical tracks on a hard disk image"); @@ -1364,7 +1364,7 @@ namespace DiscImageChef.DiscImages return VerifySector(GetAbsoluteSector(sectorAddress, track)); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { unknownLbas = new List(); @@ -1396,7 +1396,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { unknownLbas = new List(); @@ -1428,7 +1428,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { byte[] calculated; if(mapVersion >= 3) @@ -1451,7 +1451,7 @@ namespace DiscImageChef.DiscImages return expectedChecksum.SequenceEqual(calculated); } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -1553,7 +1553,7 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { if(isHdd) throw new FeatureNotPresentImageException("Hard disk images do not have sector tags"); @@ -1769,7 +1769,7 @@ namespace DiscImageChef.DiscImages return buffer; } - 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), @@ -1790,7 +1790,7 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -1811,7 +1811,7 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { if(isHdd) return ReadSector(sectorAddress); @@ -1854,7 +1854,7 @@ namespace DiscImageChef.DiscImages return buffer; } - 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), @@ -1875,7 +1875,7 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { if(imageInfo.ReadableMediaTags.Contains(MediaTagType.ATA_IDENTIFY)) return identify; @@ -1884,7 +1884,7 @@ namespace DiscImageChef.DiscImages throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { if(isHdd) throw new FeaturedNotSupportedByDiscImageException("Cannot access optical tracks on a hard disk image"); @@ -1892,7 +1892,7 @@ namespace DiscImageChef.DiscImages return GetSessionTracks(session.SessionSequence); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { if(isHdd) throw new FeaturedNotSupportedByDiscImageException("Cannot access optical tracks on a hard disk image"); @@ -1900,7 +1900,7 @@ namespace DiscImageChef.DiscImages return tracks.Values.Where(track => track.TrackSession == session).ToList(); } - public virtual byte[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { if(isHdd) throw new FeaturedNotSupportedByDiscImageException("Cannot access optical tracks on a hard disk image"); @@ -1908,7 +1908,7 @@ namespace DiscImageChef.DiscImages return ReadSector(GetAbsoluteSector(sectorAddress, track)); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) { if(isHdd) throw new FeaturedNotSupportedByDiscImageException("Cannot access optical tracks on a hard disk image"); @@ -1916,7 +1916,7 @@ namespace DiscImageChef.DiscImages return ReadSectorTag(GetAbsoluteSector(sectorAddress, track), tag); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { if(isHdd) throw new FeaturedNotSupportedByDiscImageException("Cannot access optical tracks on a hard disk image"); @@ -1924,7 +1924,7 @@ namespace DiscImageChef.DiscImages return ReadSectors(GetAbsoluteSector(sectorAddress, track), length); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) { if(isHdd) throw new FeaturedNotSupportedByDiscImageException("Cannot access optical tracks on a hard disk image"); @@ -1932,7 +1932,7 @@ namespace DiscImageChef.DiscImages return ReadSectorsTag(GetAbsoluteSector(sectorAddress, track), length, tag); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { if(isHdd) throw new FeaturedNotSupportedByDiscImageException("Cannot access optical tracks on a hard disk image"); @@ -1940,7 +1940,7 @@ namespace DiscImageChef.DiscImages return ReadSectorLong(GetAbsoluteSector(sectorAddress, track)); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { if(isHdd) throw new FeaturedNotSupportedByDiscImageException("Cannot access optical tracks on a hard disk image"); diff --git a/DiscImageChef.DiscImages/CPCDSK.cs b/DiscImageChef.DiscImages/CPCDSK.cs index 834c3484a..b922a7b85 100644 --- a/DiscImageChef.DiscImages/CPCDSK.cs +++ b/DiscImageChef.DiscImages/CPCDSK.cs @@ -106,23 +106,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "CPCEMU Disk-File and Extended CPC Disk-File"; - public virtual Guid Id => new Guid("724B16CC-ADB9-492E-BA07-CAEEC1012B16"); + public string Name => "CPCEMU Disk-File and Extended CPC Disk-File"; + public Guid Id => new Guid("724B16CC-ADB9-492E-BA07-CAEEC1012B16"); - public virtual string ImageFormat => extended ? "CPCEMU Extended disk image" : "CPCEMU disk image"; + public string ImageFormat => extended ? "CPCEMU Extended disk image" : "CPCEMU disk image"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -143,7 +143,7 @@ namespace DiscImageChef.DiscImages du54Id.SequenceEqual(header.magic); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -368,14 +368,14 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectors.TryGetValue(sectorAddress, out byte[] sector)) return sector; throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - 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), @@ -395,7 +395,7 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { if(tag != SectorTagType.FloppyAddressMark) throw new FeatureUnsupportedImageException($"Tag {tag} not supported by image format"); @@ -405,7 +405,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { if(tag != SectorTagType.FloppyAddressMark) throw new FeatureUnsupportedImageException($"Tag {tag} not supported by image format"); @@ -428,72 +428,72 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -503,13 +503,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/CisCopy.cs b/DiscImageChef.DiscImages/CisCopy.cs index 546906581..908f1217c 100644 --- a/DiscImageChef.DiscImages/CisCopy.cs +++ b/DiscImageChef.DiscImages/CisCopy.cs @@ -87,22 +87,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "CisCopy Disk Image (DC-File)"; - public virtual Guid Id => new Guid("EDF20CC7-6012-49E2-9E92-663A53E42130"); + public string Name => "CisCopy Disk Image (DC-File)"; + public Guid Id => new Guid("EDF20CC7-6012-49E2-9E92-663A53E42130"); - public virtual string ImageFormat => "CisCopy"; + public string ImageFormat => "CisCopy"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -172,7 +172,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -316,17 +316,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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -337,7 +337,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -348,17 +348,17 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -374,67 +374,67 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { 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"); } diff --git a/DiscImageChef.DiscImages/CloneCD.cs b/DiscImageChef.DiscImages/CloneCD.cs index 256cb0466..f58e9ce84 100644 --- a/DiscImageChef.DiscImages/CloneCD.cs +++ b/DiscImageChef.DiscImages/CloneCD.cs @@ -116,20 +116,20 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "CloneCD"; - public virtual Guid Id => new Guid("EE9C2975-2E79-427A-8EE9-F86F19165784"); + public string Name => "CloneCD"; + public Guid Id => new Guid("EE9C2975-2E79-427A-8EE9-F86F19165784"); - public virtual string ImageFormat => "CloneCD"; + public string ImageFormat => "CloneCD"; - public virtual List Partitions => partitions; + public List Partitions => partitions; - public virtual List Tracks => tracks; + public List Tracks => tracks; - public virtual List Sessions => sessions; + public List Sessions => sessions; - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { ccdFilter = imageFilter; @@ -176,7 +176,7 @@ namespace DiscImageChef.DiscImages } } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { if(imageFilter == null) return false; @@ -842,7 +842,7 @@ namespace DiscImageChef.DiscImages return (ulong)(hour * 60 * 60 * 75 + minute * 60 * 75 + second * 75 + frame - 150); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { switch(tag) { @@ -861,27 +861,27 @@ namespace DiscImageChef.DiscImages } } - 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[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { return ReadSectors(sectorAddress, 1, track); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) { return ReadSectorsTag(sectorAddress, 1, track, tag); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -894,7 +894,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -907,7 +907,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { Track dicTrack = new Track {TrackSequence = 0}; @@ -989,7 +989,7 @@ namespace DiscImageChef.DiscImages } // TODO: Flags - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) { Track dicTrack = new Track {TrackSequence = 0}; @@ -1229,17 +1229,17 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { return ReadSectorsLong(sectorAddress, 1); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { return ReadSectorsLong(sectorAddress, 1, track); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1253,7 +1253,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { Track dicTrack = new Track {TrackSequence = 0}; @@ -1278,31 +1278,31 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { if(sessions.Contains(session)) return GetSessionTracks(session.SessionSequence); throw new ImageNotSupportedException("Session does not exist in disc image"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { return tracks.Where(track => track.TrackSession == session).ToList(); } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { byte[] buffer = ReadSectorLong(sectorAddress); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { byte[] buffer = ReadSectorLong(sectorAddress, track); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length); @@ -1332,7 +1332,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length, track); @@ -1362,7 +1362,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/CopyQM.cs b/DiscImageChef.DiscImages/CopyQM.cs index 387047332..7d92e73c6 100644 --- a/DiscImageChef.DiscImages/CopyQM.cs +++ b/DiscImageChef.DiscImages/CopyQM.cs @@ -123,23 +123,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Sydex CopyQM"; - public virtual Guid Id => new Guid("147E927D-3A92-4E0C-82CD-142F5A4FA76D"); + public string Name => "Sydex CopyQM"; + public Guid Id => new Guid("147E927D-3A92-4E0C-82CD-142F5A4FA76D"); - public virtual string ImageFormat => "Sydex CopyQM"; + public string ImageFormat => "Sydex CopyQM"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -153,7 +153,7 @@ namespace DiscImageChef.DiscImages return magic == COPYQM_MAGIC && hdr[0x02] == COPYQM_MARK && 133 + hdr[0x6F] < stream.Length; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -361,17 +361,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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -382,7 +382,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -393,17 +393,17 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return calculatedDataCrc == header.crc && headerChecksumOk; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -419,67 +419,67 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { 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"); } diff --git a/DiscImageChef.DiscImages/D88.cs b/DiscImageChef.DiscImages/D88.cs index 5ce6fba46..2f1e49860 100644 --- a/DiscImageChef.DiscImages/D88.cs +++ b/DiscImageChef.DiscImages/D88.cs @@ -81,22 +81,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "D88 Disk Image"; - public virtual Guid Id => new Guid("669EDC77-EC41-4720-A88C-49C38CFFBAA0"); - public virtual ImageInfo Info => imageInfo; + public string Name => "D88 Disk Image"; + public Guid Id => new Guid("669EDC77-EC41-4720-A88C-49C38CFFBAA0"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "D88 disk image"; + public string ImageFormat => "D88 disk image"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -143,7 +143,7 @@ namespace DiscImageChef.DiscImages return counter > 0; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -427,12 +427,12 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -447,82 +447,82 @@ namespace DiscImageChef.DiscImages return buffer.ToArray(); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -532,13 +532,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/DART.cs b/DiscImageChef.DiscImages/DART.cs index 18708d13e..b362847b1 100644 --- a/DiscImageChef.DiscImages/DART.cs +++ b/DiscImageChef.DiscImages/DART.cs @@ -116,22 +116,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "Apple Disk Archival/Retrieval Tool"; - public virtual Guid Id => new Guid("B3E06BF8-F98D-4F9B-BBE2-342C373BAF3E"); - public virtual ImageInfo Info => imageInfo; + public string Name => "Apple Disk Archival/Retrieval Tool"; + public Guid Id => new Guid("B3E06BF8-F98D-4F9B-BBE2-342C373BAF3E"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "Apple Disk Archival/Retrieval Tool"; + public string ImageFormat => "Apple Disk Archival/Retrieval Tool"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -182,7 +182,7 @@ namespace DiscImageChef.DiscImages return stream.Length <= expectedMaxSize; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -412,17 +412,17 @@ namespace DiscImageChef.DiscImages return true; } - 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"); @@ -437,7 +437,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"); @@ -458,12 +458,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"); @@ -486,62 +486,62 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -551,13 +551,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/DIM.cs b/DiscImageChef.DiscImages/DIM.cs index 591846fb8..db616b983 100644 --- a/DiscImageChef.DiscImages/DIM.cs +++ b/DiscImageChef.DiscImages/DIM.cs @@ -81,22 +81,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "DIM Disk Image"; - public virtual Guid Id => new Guid("0240B7B1-E959-4CDC-B0BD-386D6E467B88"); - public virtual ImageInfo Info => imageInfo; + public string Name => "DIM Disk Image"; + public Guid Id => new Guid("0240B7B1-E959-4CDC-B0BD-386D6E467B88"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "DIM disk image"; + public string ImageFormat => "DIM disk image"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -115,7 +115,7 @@ namespace DiscImageChef.DiscImages return headerId.SequenceEqual(hdrId); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -268,12 +268,12 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -292,82 +292,82 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -377,13 +377,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/DiscFerret.cs b/DiscImageChef.DiscImages/DiscFerret.cs index d53cc3cbe..23ff3a9ab 100644 --- a/DiscImageChef.DiscImages/DiscFerret.cs +++ b/DiscImageChef.DiscImages/DiscFerret.cs @@ -82,22 +82,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "DiscFerret"; - public virtual Guid Id => new Guid("70EA7B9B-5323-42EB-9B40-8DDA37C5EB4D"); - public virtual ImageInfo Info => imageInfo; + public string Name => "DiscFerret"; + public Guid Id => new Guid("70EA7B9B-5323-42EB-9B40-8DDA37C5EB4D"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "DiscFerret"; + public string ImageFormat => "DiscFerret"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { byte[] magicB = new byte[4]; Stream stream = imageFilter.GetDataForkStream(); @@ -107,7 +107,7 @@ namespace DiscImageChef.DiscImages return magic == DFI_MAGIC || magic == DFI_MAGIC2; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { byte[] magicB = new byte[4]; Stream stream = imageFilter.GetDataForkStream(); @@ -178,104 +178,104 @@ namespace DiscImageChef.DiscImages throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - 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) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - 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[] 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } diff --git a/DiscImageChef.DiscImages/DiscJuggler.cs b/DiscImageChef.DiscImages/DiscJuggler.cs index 5ffa86698..571e44986 100644 --- a/DiscImageChef.DiscImages/DiscJuggler.cs +++ b/DiscImageChef.DiscImages/DiscJuggler.cs @@ -78,19 +78,19 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "DiscJuggler"; - public virtual Guid Id => new Guid("2444DBC6-CD35-424C-A227-39B0C4DB01B2"); - public virtual ImageInfo Info => imageInfo; + public string Name => "DiscJuggler"; + public Guid Id => new Guid("2444DBC6-CD35-424C-A227-39B0C4DB01B2"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "DiscJuggler"; + public string ImageFormat => "DiscJuggler"; - public virtual List Partitions => partitions; + public List Partitions => partitions; - public virtual List Tracks => tracks; + public List Tracks => tracks; - public virtual List Sessions => sessions; + public List Sessions => sessions; - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { imageStream = imageFilter.GetDataForkStream(); @@ -120,7 +120,7 @@ namespace DiscImageChef.DiscImages return descriptor[2] <= 99; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { imageStream = imageFilter.GetDataForkStream(); @@ -649,7 +649,7 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { switch(tag) { @@ -664,27 +664,27 @@ namespace DiscImageChef.DiscImages } } - 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[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { return ReadSectors(sectorAddress, 1, track); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) { return ReadSectorsTag(sectorAddress, 1, track, tag); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -697,7 +697,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { foreach(KeyValuePair kvp in offsetmap .Where(kvp => sectorAddress >= kvp.Value) @@ -708,7 +708,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { Track dicTrack = new Track {TrackSequence = 0}; @@ -801,7 +801,7 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) { Track dicTrack = new Track {TrackSequence = 0}; @@ -1016,17 +1016,17 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { return ReadSectorsLong(sectorAddress, 1); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { return ReadSectorsLong(sectorAddress, 1, track); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1040,7 +1040,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { Track dicTrack = new Track {TrackSequence = 0}; @@ -1091,31 +1091,31 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { if(sessions.Contains(session)) return GetSessionTracks(session.SessionSequence); throw new ImageNotSupportedException("Session does not exist in disc image"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { return tracks.Where(track => track.TrackSession == session).ToList(); } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { byte[] buffer = ReadSectorLong(sectorAddress); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { byte[] buffer = ReadSectorLong(sectorAddress, track); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length); @@ -1145,7 +1145,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length, track); @@ -1175,7 +1175,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/DiskCopy42.cs b/DiscImageChef.DiscImages/DiskCopy42.cs index dd769f643..5235f15de 100644 --- a/DiscImageChef.DiscImages/DiskCopy42.cs +++ b/DiscImageChef.DiscImages/DiskCopy42.cs @@ -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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -588,7 +588,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -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 Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List Sessions => + public List 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"); } diff --git a/DiscImageChef.DiscImages/DriDiskCopy.cs b/DiscImageChef.DiscImages/DriDiskCopy.cs index 87bbb1589..6b1c6c078 100644 --- a/DiscImageChef.DiscImages/DriDiskCopy.cs +++ b/DiscImageChef.DiscImages/DriDiskCopy.cs @@ -78,23 +78,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Digital Research DiskCopy"; - public virtual Guid Id => new Guid("9F0BE551-8BAB-4038-8B5A-691F1BF5FFF3"); + public string Name => "Digital Research DiskCopy"; + public Guid Id => new Guid("9F0BE551-8BAB-4038-8B5A-691F1BF5FFF3"); - public virtual string ImageFormat => "Digital Research DiskCopy"; + public string ImageFormat => "Digital Research DiskCopy"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -149,7 +149,7 @@ namespace DiscImageChef.DiscImages return tmpFooter.bpb.sectors * tmpFooter.bpb.bps + Marshal.SizeOf(tmpFooter) == stream.Length; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -278,17 +278,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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -299,7 +299,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -310,22 +310,22 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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"); @@ -342,62 +342,62 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { 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"); } diff --git a/DiscImageChef.DiscImages/GDI.cs b/DiscImageChef.DiscImages/GDI.cs index ddedb9ba7..962d565cf 100644 --- a/DiscImageChef.DiscImages/GDI.cs +++ b/DiscImageChef.DiscImages/GDI.cs @@ -82,15 +82,15 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "Dreamcast GDI image"; - public virtual Guid Id => new Guid("281ECBF2-D2A7-414C-8497-1A33F6DCB2DD"); - public virtual ImageInfo Info => imageInfo; + public string Name => "Dreamcast GDI image"; + public Guid Id => new Guid("281ECBF2-D2A7-414C-8497-1A33F6DCB2DD"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "Dreamcast GDI image"; + public string ImageFormat => "Dreamcast GDI image"; - public virtual List Partitions => partitions; + public List Partitions => partitions; - public virtual List Tracks + public List Tracks { get { @@ -125,10 +125,10 @@ namespace DiscImageChef.DiscImages } } - public virtual List Sessions => discimage.Sessions; + public List Sessions => discimage.Sessions; // Due to .gdi format, this method must parse whole file, ignoring errors (those will be thrown by OpenImage()). - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { try { @@ -190,7 +190,7 @@ namespace DiscImageChef.DiscImages } } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { if(imageFilter == null) return false; @@ -433,32 +433,32 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureSupportedButNotImplementedImageException("Feature not supported by image format"); } - 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[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { return ReadSectors(sectorAddress, 1, track); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) { return ReadSectorsTag(sectorAddress, 1, track, tag); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -475,7 +475,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -492,7 +492,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { if(track == 0) { @@ -592,7 +592,7 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) { if(track == 0) { @@ -748,17 +748,17 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { return ReadSectorsLong(sectorAddress, 1); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { return ReadSectorsLong(sectorAddress, 1, track); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -771,7 +771,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), "Sector address not found"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { if(track == 0) { @@ -871,14 +871,14 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { if(discimage.Sessions.Contains(session)) return GetSessionTracks(session.SessionSequence); throw new ImageNotSupportedException("Session does not exist in disc image"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { List tracks = new List(); bool expectedDensity; @@ -923,19 +923,19 @@ namespace DiscImageChef.DiscImages return tracks; } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { byte[] buffer = ReadSectorLong(sectorAddress); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { byte[] buffer = ReadSectorLong(sectorAddress, track); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length); @@ -965,7 +965,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length, track); @@ -995,7 +995,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/HDCopy.cs b/DiscImageChef.DiscImages/HDCopy.cs index 85c1205fe..eb6c24ca7 100644 --- a/DiscImageChef.DiscImages/HDCopy.cs +++ b/DiscImageChef.DiscImages/HDCopy.cs @@ -135,22 +135,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "HD-Copy disk image"; - public virtual Guid Id => new Guid("8D57483F-71A5-42EC-9B87-66AEC439C792"); + public string Name => "HD-Copy disk image"; + public Guid Id => new Guid("8D57483F-71A5-42EC-9B87-66AEC439C792"); - public virtual string ImageFormat => "HD-Copy image"; - public virtual List Partitions => + public string ImageFormat => "HD-Copy image"; + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -184,7 +184,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { long currentOffset; @@ -299,7 +299,7 @@ namespace DiscImageChef.DiscImages trackCache[tracknum] = trackData; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { int trackNum = (int)(sectorAddress / imageInfo.SectorsPerTrack); int sectorOffset = (int)(sectorAddress % (imageInfo.SectorsPerTrack * imageInfo.SectorSize)); @@ -323,7 +323,7 @@ namespace DiscImageChef.DiscImages return result; } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { byte[] result = new byte[length * imageInfo.SectorSize]; @@ -336,82 +336,82 @@ namespace DiscImageChef.DiscImages return result; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -421,13 +421,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/IMD.cs b/DiscImageChef.DiscImages/IMD.cs index 37e665431..9c8f981a5 100644 --- a/DiscImageChef.DiscImages/IMD.cs +++ b/DiscImageChef.DiscImages/IMD.cs @@ -80,22 +80,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "Dunfield's IMD"; - public virtual Guid Id => new Guid("0D67162E-38A3-407D-9B1A-CF40080A48CB"); - public virtual ImageInfo Info => imageInfo; + public string Name => "Dunfield's IMD"; + public Guid Id => new Guid("0D67162E-38A3-407D-9B1A-CF40080A48CB"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "IMageDisk"; + public string ImageFormat => "IMageDisk"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -110,7 +110,7 @@ namespace DiscImageChef.DiscImages return hm.Success; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -324,17 +324,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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -345,7 +345,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -356,17 +356,17 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -381,67 +381,67 @@ namespace DiscImageChef.DiscImages return buffer.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { 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"); } diff --git a/DiscImageChef.DiscImages/KryoFlux.cs b/DiscImageChef.DiscImages/KryoFlux.cs index cda4c5c94..7270c6740 100644 --- a/DiscImageChef.DiscImages/KryoFlux.cs +++ b/DiscImageChef.DiscImages/KryoFlux.cs @@ -60,10 +60,10 @@ namespace DiscImageChef.DiscImages // TODO: These variables have been made public so create-sidecar can access to this information until I define an API >4.0 public SortedDictionary tracks; public ImageInfo imageInfo; - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "KryoFlux STREAM"; - public virtual Guid Id => new Guid("4DBC95E4-93EE-4F7A-9492-919887E60EFE"); + public string Name => "KryoFlux STREAM"; + public Guid Id => new Guid("4DBC95E4-93EE-4F7A-9492-919887E60EFE"); public KryoFlux() { @@ -92,7 +92,7 @@ namespace DiscImageChef.DiscImages }; } - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { OobBlock header = new OobBlock(); Stream stream = imageFilter.GetDataForkStream(); @@ -122,7 +122,7 @@ namespace DiscImageChef.DiscImages footer.blockId == BlockIds.Oob && footer.blockType == OobTypes.EOF && footer.length == 0x0D0D; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { OobBlock header = new OobBlock(); Stream stream = imageFilter.GetDataForkStream(); @@ -312,115 +312,115 @@ namespace DiscImageChef.DiscImages throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - 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) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual string ImageFormat => "KryoFlux STREAM"; + public string ImageFormat => "KryoFlux STREAM"; - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - 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[] 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"); } - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } diff --git a/DiscImageChef.DiscImages/MaxiDisk.cs b/DiscImageChef.DiscImages/MaxiDisk.cs index 5b8f029bc..d8c7e0bad 100644 --- a/DiscImageChef.DiscImages/MaxiDisk.cs +++ b/DiscImageChef.DiscImages/MaxiDisk.cs @@ -71,23 +71,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "MAXI Disk image"; - public virtual Guid Id => new Guid("D27D924A-7034-466E-ADE1-B81EF37E469E"); + public string Name => "MAXI Disk image"; + public Guid Id => new Guid("D27D924A-7034-466E-ADE1-B81EF37E469E"); - public virtual string ImageFormat => "MAXI Disk"; + public string ImageFormat => "MAXI Disk"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -132,7 +132,7 @@ namespace DiscImageChef.DiscImages return expectedFileSize == stream.Length; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -233,17 +233,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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -254,7 +254,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -265,22 +265,22 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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"); @@ -297,62 +297,62 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { 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"); } diff --git a/DiscImageChef.DiscImages/NDIF.cs b/DiscImageChef.DiscImages/NDIF.cs index daf301e81..9dbf553d8 100644 --- a/DiscImageChef.DiscImages/NDIF.cs +++ b/DiscImageChef.DiscImages/NDIF.cs @@ -120,23 +120,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Apple New Disk Image Format"; - public virtual Guid Id => new Guid("5A7FF7D8-491E-458D-8674-5B5EADBECC24"); + public string Name => "Apple New Disk Image Format"; + public Guid Id => new Guid("5A7FF7D8-491E-458D-8674-5B5EADBECC24"); - public virtual string ImageFormat => "Apple New Disk Image Format"; + public string ImageFormat => "Apple New Disk Image Format"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { if(!imageFilter.HasResourceFork() || imageFilter.GetResourceForkLength() == 0) return false; @@ -154,7 +154,7 @@ namespace DiscImageChef.DiscImages return false; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { if(!imageFilter.HasResourceFork() || imageFilter.GetResourceForkLength() == 0) return false; @@ -374,7 +374,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -464,7 +464,7 @@ namespace DiscImageChef.DiscImages throw new ImageNotSupportedException($"Unsupported chunk type 0x{currentChunk.type:X8} found"); } - 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), @@ -484,82 +484,82 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -569,13 +569,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/NHDr0.cs b/DiscImageChef.DiscImages/NHDr0.cs index c8c9c8246..fe22e6f62 100644 --- a/DiscImageChef.DiscImages/NHDr0.cs +++ b/DiscImageChef.DiscImages/NHDr0.cs @@ -79,22 +79,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "T98-Next NHD r0 Disk Image"; - public virtual Guid Id => new Guid("6ECACD0A-8F4D-4465-8815-AEA000D370E3"); - public virtual ImageInfo Info => imageInfo; + public string Name => "T98-Next NHD r0 Disk Image"; + public Guid Id => new Guid("6ECACD0A-8F4D-4465-8815-AEA000D370E3"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "NHDr0 disk image"; + public string ImageFormat => "NHDr0 disk image"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -128,7 +128,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -165,12 +165,12 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -189,82 +189,82 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -274,13 +274,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/Nero.cs b/DiscImageChef.DiscImages/Nero.cs index 32ec81158..25776cf5b 100644 --- a/DiscImageChef.DiscImages/Nero.cs +++ b/DiscImageChef.DiscImages/Nero.cs @@ -99,7 +99,7 @@ namespace DiscImageChef.DiscImages List imageSessions; Stream imageStream; ImageInfo imageInfo; - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; List imageTracks; NeroCdText neroCdtxt; @@ -121,8 +121,8 @@ namespace DiscImageChef.DiscImages Dictionary trackIsrCs; byte[] upc; - public virtual string Name => "Nero Burning ROM image"; - public virtual Guid Id => new Guid("D160F9FF-5941-43FC-B037-AD81DD141F05"); + public string Name => "Nero Burning ROM image"; + public Guid Id => new Guid("D160F9FF-5941-43FC-B037-AD81DD141F05"); public Nero() { @@ -140,7 +140,7 @@ namespace DiscImageChef.DiscImages } // Due to .cue format, this method must parse whole file, ignoring errors (those will be thrown by OpenImage()). - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { imageStream = imageFilter.GetDataForkStream(); BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian; @@ -171,7 +171,7 @@ namespace DiscImageChef.DiscImages return footerV1.ChunkId == NERO_FOOTER_V1 && footerV1.FirstChunkOffset < (ulong)imageStream.Length; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { try { @@ -1042,7 +1042,7 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { switch(tag) { @@ -1053,27 +1053,27 @@ namespace DiscImageChef.DiscImages } } - 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[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { return ReadSectors(sectorAddress, 1, track); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag) { return ReadSectorsTag(sectorAddress, 1, track, tag); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1087,7 +1087,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1101,7 +1101,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { if(!neroTracks.TryGetValue(track, out NeroTrack dicTrack)) throw new ArgumentOutOfRangeException(nameof(track), "Track not found"); @@ -1196,7 +1196,7 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag) { if(!neroTracks.TryGetValue(track, out NeroTrack dicTrack)) throw new ArgumentOutOfRangeException(nameof(track), "Track not found"); @@ -1419,17 +1419,17 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { return ReadSectorsLong(sectorAddress, 1); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { return ReadSectorsLong(sectorAddress, 1, track); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { foreach(KeyValuePair kvp in from kvp in offsetmap where sectorAddress >= kvp.Value @@ -1443,7 +1443,7 @@ namespace DiscImageChef.DiscImages throw new ArgumentOutOfRangeException(nameof(sectorAddress), $"Sector address {sectorAddress} not found"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { if(!neroTracks.TryGetValue(track, out NeroTrack dicTrack)) throw new ArgumentOutOfRangeException(nameof(track), "Track not found"); @@ -1516,37 +1516,37 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual string ImageFormat => "Nero Burning ROM"; + public string ImageFormat => "Nero Burning ROM"; - public virtual List Partitions => imagePartitions; + public List Partitions => imagePartitions; - public virtual List Tracks => imageTracks; + public List Tracks => imageTracks; - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { return GetSessionTracks(session.SessionSequence); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { return imageTracks.Where(track => track.TrackSession == session).ToList(); } - public virtual List Sessions => imageSessions; + public List Sessions => imageSessions; - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { byte[] buffer = ReadSectorLong(sectorAddress); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { byte[] buffer = ReadSectorLong(sectorAddress, track); return CdChecksums.CheckCdSector(buffer); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length); @@ -1576,7 +1576,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { byte[] buffer = ReadSectorsLong(sectorAddress, length, track); @@ -1606,7 +1606,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/Parallels.cs b/DiscImageChef.DiscImages/Parallels.cs index de0f0c6e4..de3a8bd8a 100644 --- a/DiscImageChef.DiscImages/Parallels.cs +++ b/DiscImageChef.DiscImages/Parallels.cs @@ -95,22 +95,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "Parallels disk image"; - public virtual Guid Id => new Guid("E314DE35-C103-48A3-AD36-990F68523C46"); - public virtual ImageInfo Info => imageInfo; + public string Name => "Parallels disk image"; + public Guid Id => new Guid("E314DE35-C103-48A3-AD36-990F68523C46"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "Parallels"; + public string ImageFormat => "Parallels"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -128,7 +128,7 @@ namespace DiscImageChef.DiscImages return parallelsMagic.SequenceEqual(pHdr.magic) || parallelsExtMagic.SequenceEqual(pHdr.magic); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -188,7 +188,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -222,7 +222,7 @@ namespace DiscImageChef.DiscImages return sector; } - 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), @@ -244,82 +244,82 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -329,13 +329,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/PartClone.cs b/DiscImageChef.DiscImages/PartClone.cs index be64238b7..4cd39eed5 100644 --- a/DiscImageChef.DiscImages/PartClone.cs +++ b/DiscImageChef.DiscImages/PartClone.cs @@ -91,22 +91,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "PartClone disk image"; - public virtual Guid Id => new Guid("AB1D7518-B548-4099-A4E2-C29C53DDE0C3"); - public virtual ImageInfo Info => imageInfo; + public string Name => "PartClone disk image"; + public Guid Id => new Guid("AB1D7518-B548-4099-A4E2-C29C53DDE0C3"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "PartClone"; + public string ImageFormat => "PartClone"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -131,7 +131,7 @@ namespace DiscImageChef.DiscImages return partCloneMagic.SequenceEqual(pHdr.magic) && biTmAgIc.SequenceEqual(bitmagic); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -226,7 +226,7 @@ namespace DiscImageChef.DiscImages return extentStartingOffset + (sectorAddress - extentStart); } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -249,7 +249,7 @@ namespace DiscImageChef.DiscImages return sector; } - 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), @@ -279,82 +279,82 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -364,14 +364,14 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } // TODO: All blocks contain a CRC32 that's incompatible with current implementation. Need to check for compatibility. - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/Partimage.cs b/DiscImageChef.DiscImages/Partimage.cs index f118ad36f..db5e9f438 100644 --- a/DiscImageChef.DiscImages/Partimage.cs +++ b/DiscImageChef.DiscImages/Partimage.cs @@ -119,23 +119,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Partimage disk image"; - public virtual Guid Id => new Guid("AAFDB99D-2B77-49EA-831C-C9BB58C68C95"); + public string Name => "Partimage disk image"; + public Guid Id => new Guid("AAFDB99D-2B77-49EA-831C-C9BB58C68C95"); - public virtual string ImageFormat => "Partimage"; + public string ImageFormat => "Partimage"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -153,7 +153,7 @@ namespace DiscImageChef.DiscImages return partimageMagic.SequenceEqual(cVolumeHeader.magic); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -413,7 +413,7 @@ namespace DiscImageChef.DiscImages return extentStartingOffset + (sectorAddress - extentStart); } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -450,7 +450,7 @@ namespace DiscImageChef.DiscImages return sector; } - 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), @@ -480,82 +480,82 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -565,14 +565,14 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } // TODO: All blocks contain a CRC32 that's incompatible with current implementation. Need to check for compatibility. - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/QCOW.cs b/DiscImageChef.DiscImages/QCOW.cs index e1c4dbd02..4f778be2b 100644 --- a/DiscImageChef.DiscImages/QCOW.cs +++ b/DiscImageChef.DiscImages/QCOW.cs @@ -105,23 +105,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "QEMU Copy-On-Write disk image"; - public virtual Guid Id => new Guid("A5C35765-9FE2-469D-BBBF-ACDEBDB7B954"); + public string Name => "QEMU Copy-On-Write disk image"; + public Guid Id => new Guid("A5C35765-9FE2-469D-BBBF-ACDEBDB7B954"); - public virtual string ImageFormat => "QEMU Copy-On-Write"; + public string ImageFormat => "QEMU Copy-On-Write"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -135,7 +135,7 @@ namespace DiscImageChef.DiscImages return qHdr.magic == QCOW_MAGIC && qHdr.version == QCOW_VERSION; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -257,7 +257,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -349,7 +349,7 @@ namespace DiscImageChef.DiscImages return sector; } - 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), @@ -369,82 +369,82 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -454,13 +454,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/QCOW2.cs b/DiscImageChef.DiscImages/QCOW2.cs index e24cffb4c..8fcd9862e 100644 --- a/DiscImageChef.DiscImages/QCOW2.cs +++ b/DiscImageChef.DiscImages/QCOW2.cs @@ -120,23 +120,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "QEMU Copy-On-Write disk image v2"; - public virtual Guid Id => new Guid("F20107CB-95B3-4398-894B-975261F1E8C5"); + public string Name => "QEMU Copy-On-Write disk image v2"; + public Guid Id => new Guid("F20107CB-95B3-4398-894B-975261F1E8C5"); - public virtual string ImageFormat => "QEMU Copy-On-Write"; + public string ImageFormat => "QEMU Copy-On-Write"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -153,7 +153,7 @@ namespace DiscImageChef.DiscImages return qHdr.magic == QCOW_MAGIC && (qHdr.version == QCOW_VERSION2 || qHdr.version == QCOW_VERSION3); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -287,7 +287,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -380,7 +380,7 @@ namespace DiscImageChef.DiscImages return sector; } - 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), @@ -400,82 +400,82 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -485,13 +485,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/QED.cs b/DiscImageChef.DiscImages/QED.cs index 3d391668f..dadba8284 100644 --- a/DiscImageChef.DiscImages/QED.cs +++ b/DiscImageChef.DiscImages/QED.cs @@ -117,23 +117,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "QEMU Enhanced Disk image"; - public virtual Guid Id => new Guid("B9DBB155-A69A-4C10-BF91-96BF431B9BB6"); + public string Name => "QEMU Enhanced Disk image"; + public Guid Id => new Guid("B9DBB155-A69A-4C10-BF91-96BF431B9BB6"); - public virtual string ImageFormat => "QEMU Enhanced Disk"; + public string ImageFormat => "QEMU Enhanced Disk"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -151,7 +151,7 @@ namespace DiscImageChef.DiscImages return qHdr.magic == QED_MAGIC; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -265,7 +265,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -328,7 +328,7 @@ namespace DiscImageChef.DiscImages return sector; } - 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), @@ -388,82 +388,82 @@ namespace DiscImageChef.DiscImages return cnt; } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -473,13 +473,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/RayDIM.cs b/DiscImageChef.DiscImages/RayDIM.cs index 74fb0b015..004d4eb91 100644 --- a/DiscImageChef.DiscImages/RayDIM.cs +++ b/DiscImageChef.DiscImages/RayDIM.cs @@ -76,22 +76,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "Ray Arachelian's Disk IMage"; - public virtual Guid Id => new Guid("F541F4E7-C1E3-4A2D-B07F-D863E87AB961"); - public virtual ImageInfo Info => imageInfo; + public string Name => "Ray Arachelian's Disk IMage"; + public Guid Id => new Guid("F541F4E7-C1E3-4A2D-B07F-D863E87AB961"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "Ray Arachelian's Disk IMage"; + public string ImageFormat => "Ray Arachelian's Disk IMage"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -124,7 +124,7 @@ namespace DiscImageChef.DiscImages return sm.Success; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -221,17 +221,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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -242,7 +242,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -253,22 +253,22 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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"); @@ -284,62 +284,62 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { 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"); } diff --git a/DiscImageChef.DiscImages/RsIde.cs b/DiscImageChef.DiscImages/RsIde.cs index ec36730ae..22b25c7fe 100644 --- a/DiscImageChef.DiscImages/RsIde.cs +++ b/DiscImageChef.DiscImages/RsIde.cs @@ -77,22 +77,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "RS-IDE Hard Disk Image"; - public virtual Guid Id => new Guid("47C3E78D-2BE2-4BA5-AA6B-FEE27C86FC65"); - public virtual ImageInfo Info => imageInfo; + public string Name => "RS-IDE Hard Disk Image"; + public Guid Id => new Guid("47C3E78D-2BE2-4BA5-AA6B-FEE27C86FC65"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "RS-IDE disk image"; + public string ImageFormat => "RS-IDE disk image"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -103,7 +103,7 @@ namespace DiscImageChef.DiscImages return magic.SequenceEqual(signature); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -162,12 +162,12 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -186,7 +186,7 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { if(!imageInfo.ReadableMediaTags.Contains(tag) || tag != MediaTagType.ATA_IDENTIFY) throw new FeatureUnsupportedImageException("Feature not supported by image format"); @@ -196,77 +196,77 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -276,13 +276,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/SaveDskF.cs b/DiscImageChef.DiscImages/SaveDskF.cs index 10700e9e8..4626e1c52 100644 --- a/DiscImageChef.DiscImages/SaveDskF.cs +++ b/DiscImageChef.DiscImages/SaveDskF.cs @@ -79,22 +79,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "IBM SaveDskF"; - public virtual Guid Id => new Guid("288CE058-1A51-4034-8C45-5A256CAE1461"); - public virtual ImageInfo Info => imageInfo; + public string Name => "IBM SaveDskF"; + public Guid Id => new Guid("288CE058-1A51-4034-8C45-5A256CAE1461"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "IBM SaveDskF"; + public string ImageFormat => "IBM SaveDskF"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -114,7 +114,7 @@ namespace DiscImageChef.DiscImages header.commentOffset < stream.Length && header.dataOffset < stream.Length; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -295,17 +295,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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -316,7 +316,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -327,17 +327,17 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return calculatedChk == header.checksum; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -353,67 +353,67 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { 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"); } diff --git a/DiscImageChef.DiscImages/SuperCardPro.cs b/DiscImageChef.DiscImages/SuperCardPro.cs index 624923c39..1e892a839 100644 --- a/DiscImageChef.DiscImages/SuperCardPro.cs +++ b/DiscImageChef.DiscImages/SuperCardPro.cs @@ -146,23 +146,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "SuperCardPro"; - public virtual Guid Id => new Guid("C5D3182E-1D45-4767-A205-E6E5C83444DC"); + public string Name => "SuperCardPro"; + public Guid Id => new Guid("C5D3182E-1D45-4767-A205-E6E5C83444DC"); - public virtual string ImageFormat => "SuperCardPro"; + public string ImageFormat => "SuperCardPro"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Header = new ScpHeader(); Stream stream = imageFilter.GetDataForkStream(); @@ -180,7 +180,7 @@ namespace DiscImageChef.DiscImages return scpSignature.SequenceEqual(Header.signature); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Header = new ScpHeader(); scpStream = imageFilter.GetDataForkStream(); @@ -382,58 +382,58 @@ namespace DiscImageChef.DiscImages return Encoding.UTF8.GetString(str); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - 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) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { throw new NotImplementedException("Flux decoding is not yet implemented."); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { if(Header.flags.HasFlag(ScpFlags.Writable)) return null; @@ -448,47 +448,47 @@ namespace DiscImageChef.DiscImages return Header.checksum == sum; } - 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[] 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySector(ulong sectorAddress, uint track) + public bool? VerifySector(ulong sectorAddress, uint track) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); diff --git a/DiscImageChef.DiscImages/T98.cs b/DiscImageChef.DiscImages/T98.cs index 3a99b1348..8580dd872 100644 --- a/DiscImageChef.DiscImages/T98.cs +++ b/DiscImageChef.DiscImages/T98.cs @@ -71,22 +71,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "T98 Hard Disk Image"; - public virtual Guid Id => new Guid("0410003E-6E7B-40E6-9328-BA5651ADF6B7"); - public virtual ImageInfo Info => imageInfo; + public string Name => "T98 Hard Disk Image"; + public Guid Id => new Guid("0410003E-6E7B-40E6-9328-BA5651ADF6B7"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "T98 disk image"; + public string ImageFormat => "T98 disk image"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -107,7 +107,7 @@ namespace DiscImageChef.DiscImages return stream.Length == cylinders * 8 * 33 * 256 + 256; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -139,12 +139,12 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -163,82 +163,82 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -248,13 +248,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/TeleDisk.cs b/DiscImageChef.DiscImages/TeleDisk.cs index f01b76d39..b29992087 100644 --- a/DiscImageChef.DiscImages/TeleDisk.cs +++ b/DiscImageChef.DiscImages/TeleDisk.cs @@ -149,23 +149,23 @@ namespace DiscImageChef.DiscImages sectorsWhereCrcHasFailed = new List(); } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Sydex TeleDisk"; - public virtual Guid Id => new Guid("0240B7B1-E959-4CDC-B0BD-386D6E467B88"); + public string Name => "Sydex TeleDisk"; + public Guid Id => new Guid("0240B7B1-E959-4CDC-B0BD-386D6E467B88"); - public virtual string ImageFormat => "Sydex TeleDisk"; + public string ImageFormat => "Sydex TeleDisk"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { header = new TeleDiskHeader(); byte[] headerBytes = new byte[12]; @@ -221,7 +221,7 @@ namespace DiscImageChef.DiscImages header.DriveType == DRIVE_TYPE_8_INCH; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { header = new TeleDiskHeader(); byte[] headerBytes = new byte[12]; @@ -664,7 +664,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { (ushort cylinder, byte head, byte sector) = LbaToChs(sectorAddress); @@ -680,7 +680,7 @@ namespace DiscImageChef.DiscImages return sectorsData[cylinder][head][sector]; } - 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"); @@ -707,27 +707,27 @@ namespace DiscImageChef.DiscImages return (cylinder, head, sector); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { return ReadSectors(sectorAddress, length); } - public virtual bool? VerifySector(ulong sectorAddress) + public bool? VerifySector(ulong sectorAddress) { return !sectorsWhereCrcHasFailed.Contains(sectorAddress); } - 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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -739,7 +739,7 @@ namespace DiscImageChef.DiscImages return failingLbas.Count <= 0; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -750,7 +750,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return aDiskCrcHasFailed; } @@ -1013,7 +1013,7 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { if(tag != MediaTagType.Floppy_LeadOut) throw new FeatureUnsupportedImageException("Feature not supported by image format"); @@ -1023,52 +1023,52 @@ namespace DiscImageChef.DiscImages throw new FeatureNotPresentImageException("Lead-out not present in disk image"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { 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"); } diff --git a/DiscImageChef.DiscImages/UDIF.cs b/DiscImageChef.DiscImages/UDIF.cs index d743a3274..ca9b54ae1 100644 --- a/DiscImageChef.DiscImages/UDIF.cs +++ b/DiscImageChef.DiscImages/UDIF.cs @@ -115,23 +115,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Apple Universal Disk Image Format"; - public virtual Guid Id => new Guid("5BEB9002-CF3D-429C-8E06-9A96F49203FF"); + public string Name => "Apple Universal Disk Image Format"; + public Guid Id => new Guid("5BEB9002-CF3D-429C-8E06-9A96F49203FF"); - public virtual string ImageFormat => "Apple Universal Disk Image Format"; + public string ImageFormat => "Apple Universal Disk Image Format"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -155,7 +155,7 @@ namespace DiscImageChef.DiscImages return footer.signature == UDIF_SIGNATURE; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -452,7 +452,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -568,7 +568,7 @@ namespace DiscImageChef.DiscImages throw new ImageNotSupportedException($"Unsupported chunk type 0x{currentChunk.type:X8} found"); } - 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), @@ -588,82 +588,82 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -673,13 +673,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/UkvFdi.cs b/DiscImageChef.DiscImages/UkvFdi.cs index d0d834b36..bd4752e5d 100644 --- a/DiscImageChef.DiscImages/UkvFdi.cs +++ b/DiscImageChef.DiscImages/UkvFdi.cs @@ -76,22 +76,22 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "Spectrum Floppy Disk Image"; - public virtual Guid Id => new Guid("DADFC9B2-67C1-42A3-B124-825528163FC0"); + public string Name => "Spectrum Floppy Disk Image"; + public Guid Id => new Guid("DADFC9B2-67C1-42A3-B124-825528163FC0"); - public virtual string ImageFormat => "Spectrum floppy disk image"; + public string ImageFormat => "Spectrum floppy disk image"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -110,7 +110,7 @@ namespace DiscImageChef.DiscImages return hdr.magic.SequenceEqual(signature); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -244,7 +244,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { (ushort cylinder, byte head, byte sector) = LbaToChs(sectorAddress); @@ -260,7 +260,7 @@ namespace DiscImageChef.DiscImages return sectorsData[cylinder][head][sector - 1]; } - 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"); @@ -287,82 +287,82 @@ namespace DiscImageChef.DiscImages return (cylinder, head, sector); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -372,13 +372,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/VDI.cs b/DiscImageChef.DiscImages/VDI.cs index 0285bbda6..ebba08724 100644 --- a/DiscImageChef.DiscImages/VDI.cs +++ b/DiscImageChef.DiscImages/VDI.cs @@ -89,23 +89,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "VirtualBox Disk Image"; - public virtual Guid Id => new Guid("E314DE35-C103-48A3-AD36-990F68523C46"); + public string Name => "VirtualBox Disk Image"; + public Guid Id => new Guid("E314DE35-C103-48A3-AD36-990F68523C46"); - public virtual string ImageFormat => "VDI"; + public string ImageFormat => "VDI"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -123,7 +123,7 @@ namespace DiscImageChef.DiscImages return vHdr.magic == VDI_MAGIC; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -211,7 +211,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -242,7 +242,7 @@ namespace DiscImageChef.DiscImages return sector; } - 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), @@ -263,82 +263,82 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -348,13 +348,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/VHD.cs b/DiscImageChef.DiscImages/VHD.cs index 922def176..f7b716ae4 100644 --- a/DiscImageChef.DiscImages/VHD.cs +++ b/DiscImageChef.DiscImages/VHD.cs @@ -222,12 +222,12 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "VirtualPC"; - public virtual Guid Id => new Guid("8014d88f-64cd-4484-9441-7635c632958a"); + public string Name => "VirtualPC"; + public Guid Id => new Guid("8014d88f-64cd-4484-9441-7635c632958a"); - public virtual string ImageFormat + public string ImageFormat { get { @@ -241,16 +241,16 @@ namespace DiscImageChef.DiscImages } } - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream imageStream = imageFilter.GetDataForkStream(); ulong headerCookie; @@ -273,7 +273,7 @@ namespace DiscImageChef.DiscImages return headerCookie == IMAGE_COOKIE || footerCookie == IMAGE_COOKIE; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream imageStream = imageFilter.GetDataForkStream(); byte[] header = new byte[512]; @@ -819,7 +819,7 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { switch(thisFooter.DiskType) { @@ -884,7 +884,7 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { switch(thisFooter.DiskType) { @@ -983,82 +983,82 @@ namespace DiscImageChef.DiscImages return ~checksum; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -1068,13 +1068,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/VHDX.cs b/DiscImageChef.DiscImages/VHDX.cs index 188e11298..a094cfeac 100644 --- a/DiscImageChef.DiscImages/VHDX.cs +++ b/DiscImageChef.DiscImages/VHDX.cs @@ -156,23 +156,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Microsoft VHDX"; - public virtual Guid Id => new Guid("536B141B-D09C-4799-AB70-34631286EB9D"); + public string Name => "Microsoft VHDX"; + public Guid Id => new Guid("536B141B-D09C-4799-AB70-34631286EB9D"); - public virtual string ImageFormat => "VHDX"; + public string ImageFormat => "VHDX"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -190,7 +190,7 @@ namespace DiscImageChef.DiscImages return vhdxId.signature == VHDX_SIGNATURE; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -575,7 +575,7 @@ namespace DiscImageChef.DiscImages return (sectorBitmap[index] & val) == val; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -628,7 +628,7 @@ namespace DiscImageChef.DiscImages return sector; } - 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), @@ -656,82 +656,82 @@ namespace DiscImageChef.DiscImages return ~checksum; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -741,13 +741,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/VMware.cs b/DiscImageChef.DiscImages/VMware.cs index 1e4ce9cee..eb72c7eb8 100644 --- a/DiscImageChef.DiscImages/VMware.cs +++ b/DiscImageChef.DiscImages/VMware.cs @@ -150,23 +150,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "VMware disk image"; - public virtual Guid Id => new Guid("E314DE35-C103-48A3-AD36-990F68523C46"); + public string Name => "VMware disk image"; + public Guid Id => new Guid("E314DE35-C103-48A3-AD36-990F68523C46"); - public virtual string ImageFormat => "VMware"; + public string ImageFormat => "VMware"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -209,7 +209,7 @@ namespace DiscImageChef.DiscImages return ddfMagicBytes.SequenceEqual(ddfMagic); } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); @@ -649,7 +649,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { if(sectorAddress > imageInfo.Sectors - 1) throw new ArgumentOutOfRangeException(nameof(sectorAddress), @@ -736,7 +736,7 @@ namespace DiscImageChef.DiscImages return sector; } - 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), @@ -756,82 +756,82 @@ namespace DiscImageChef.DiscImages return ms.ToArray(); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -841,13 +841,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/Virtual98.cs b/DiscImageChef.DiscImages/Virtual98.cs index 4dd121fd1..ccaecff6c 100644 --- a/DiscImageChef.DiscImages/Virtual98.cs +++ b/DiscImageChef.DiscImages/Virtual98.cs @@ -78,23 +78,23 @@ namespace DiscImageChef.DiscImages }; } - public virtual ImageInfo Info => imageInfo; + public ImageInfo Info => imageInfo; - public virtual string Name => "Virtual98 Disk Image"; - public virtual Guid Id => new Guid("C0CDE13D-04D0-4913-8740-AFAA44D0A107"); + public string Name => "Virtual98 Disk Image"; + public Guid Id => new Guid("C0CDE13D-04D0-4913-8740-AFAA44D0A107"); - public virtual string ImageFormat => "Virtual98 disk image"; + public string ImageFormat => "Virtual98 disk image"; - public virtual List Partitions => + public List Partitions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Tracks => + public List Tracks => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual List Sessions => + public List Sessions => throw new FeatureUnsupportedImageException("Feature not supported by image format"); - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -129,7 +129,7 @@ namespace DiscImageChef.DiscImages return true; } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -166,12 +166,12 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - 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"); @@ -197,82 +197,82 @@ namespace DiscImageChef.DiscImages return buffer; } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { 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[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, 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) + public byte[] ReadSectorLong(ulong sectorAddress) { 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) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { 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"); } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - 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) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -282,13 +282,13 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } diff --git a/DiscImageChef.DiscImages/ZZZRawImage.cs b/DiscImageChef.DiscImages/ZZZRawImage.cs index f362f5118..63732cff0 100644 --- a/DiscImageChef.DiscImages/ZZZRawImage.cs +++ b/DiscImageChef.DiscImages/ZZZRawImage.cs @@ -73,14 +73,14 @@ namespace DiscImageChef.DiscImages }; } - public virtual string Name => "Raw Disk Image"; + public string Name => "Raw Disk Image"; // Non-random UUID to recognize this specific plugin - public virtual Guid Id => new Guid("12345678-AAAA-BBBB-CCCC-123456789000"); - public virtual ImageInfo Info => imageInfo; + public Guid Id => new Guid("12345678-AAAA-BBBB-CCCC-123456789000"); + public ImageInfo Info => imageInfo; - public virtual string ImageFormat => "Raw disk image (sector by sector copy)"; + public string ImageFormat => "Raw disk image (sector by sector copy)"; - public virtual List Tracks + public List Tracks { get { @@ -106,7 +106,7 @@ namespace DiscImageChef.DiscImages } } - public virtual List Sessions + public List Sessions { get { @@ -126,7 +126,7 @@ namespace DiscImageChef.DiscImages } } - public virtual List Partitions + public List Partitions { get { @@ -148,7 +148,7 @@ namespace DiscImageChef.DiscImages } } - public virtual bool IdentifyImage(IFilter imageFilter) + public bool IdentifyImage(IFilter imageFilter) { // Check if file is not multiple of 512 if(imageFilter.GetDataForkLength() % 512 == 0) return true; @@ -187,7 +187,7 @@ namespace DiscImageChef.DiscImages } } - public virtual bool OpenImage(IFilter imageFilter) + public bool OpenImage(IFilter imageFilter) { Stream stream = imageFilter.GetDataForkStream(); stream.Seek(0, SeekOrigin.Begin); @@ -724,12 +724,12 @@ namespace DiscImageChef.DiscImages return true; } - public virtual byte[] ReadSector(ulong sectorAddress) + public byte[] ReadSector(ulong sectorAddress) { return ReadSectors(sectorAddress, 1); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length) + public byte[] ReadSectors(ulong sectorAddress, uint length) { if(differentTrackZeroSize) throw new NotImplementedException("Not yet implemented"); @@ -750,17 +750,17 @@ namespace DiscImageChef.DiscImages return buffer; } - 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 failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -771,7 +771,7 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { failingLbas = new List(); @@ -782,12 +782,12 @@ namespace DiscImageChef.DiscImages return null; } - public virtual bool? VerifyMediaImage() + public bool? VerifyMediaImage() { return null; } - public virtual List GetSessionTracks(Session session) + public List GetSessionTracks(Session session) { if(imageInfo.XmlMediaType != XmlMediaType.OpticalDisc) throw new FeatureUnsupportedImageException("Feature not supported by image format"); @@ -814,7 +814,7 @@ namespace DiscImageChef.DiscImages return lst; } - public virtual List GetSessionTracks(ushort session) + public List GetSessionTracks(ushort session) { if(imageInfo.XmlMediaType != XmlMediaType.OpticalDisc) throw new FeatureUnsupportedImageException("Feature not supported by image format"); @@ -841,7 +841,7 @@ namespace DiscImageChef.DiscImages return lst; } - public virtual byte[] ReadSector(ulong sectorAddress, uint track) + public byte[] ReadSector(ulong sectorAddress, uint track) { if(imageInfo.XmlMediaType != XmlMediaType.OpticalDisc) throw new FeatureUnsupportedImageException("Feature not supported by image format"); @@ -851,7 +851,7 @@ namespace DiscImageChef.DiscImages return ReadSector(sectorAddress); } - public virtual byte[] ReadSectors(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectors(ulong sectorAddress, uint length, uint track) { if(imageInfo.XmlMediaType != XmlMediaType.OpticalDisc) throw new FeatureUnsupportedImageException("Feature not supported by image format"); @@ -861,7 +861,7 @@ namespace DiscImageChef.DiscImages return ReadSectors(sectorAddress, length); } - public virtual byte[] ReadSectorLong(ulong sectorAddress, uint track) + public byte[] ReadSectorLong(ulong sectorAddress, uint track) { if(imageInfo.XmlMediaType != XmlMediaType.OpticalDisc) throw new FeatureUnsupportedImageException("Feature not supported by image format"); @@ -871,7 +871,7 @@ namespace DiscImageChef.DiscImages return ReadSector(sectorAddress); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length, uint track) { if(imageInfo.XmlMediaType != XmlMediaType.OpticalDisc) throw new FeatureUnsupportedImageException("Feature not supported by image format"); @@ -994,37 +994,37 @@ namespace DiscImageChef.DiscImages } } - public virtual byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) + public byte[] ReadSectorTag(ulong sectorAddress, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) + public byte[] ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorLong(ulong sectorAddress) + public byte[] ReadSectorLong(ulong sectorAddress) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadSectorsLong(ulong sectorAddress, uint length) + public byte[] ReadSectorsLong(ulong sectorAddress, uint length) { throw new FeatureUnsupportedImageException("Feature not supported by image format"); } - public virtual byte[] ReadDiskTag(MediaTagType tag) + public byte[] ReadDiskTag(MediaTagType tag) { 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[] 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"); } diff --git a/DiscImageChef.Filesystems/AODOS.cs b/DiscImageChef.Filesystems/AODOS.cs index 601d9fcef..f55344e15 100644 --- a/DiscImageChef.Filesystems/AODOS.cs +++ b/DiscImageChef.Filesystems/AODOS.cs @@ -48,12 +48,12 @@ namespace DiscImageChef.Filesystems readonly byte[] AODOSIdentifier = {0x20, 0x41, 0x4F, 0x2D, 0x44, 0x4F, 0x53, 0x20}; Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual string Name => "Alexander Osipov DOS file system"; - public virtual Guid Id => new Guid("668E5039-9DDD-442A-BE1B-A315D6E38E26"); - public virtual Encoding Encoding => currentEncoding; + public FileSystemType XmlFsType => xmlFsType; + public string Name => "Alexander Osipov DOS file system"; + public Guid Id => new Guid("668E5039-9DDD-442A-BE1B-A315D6E38E26"); + public Encoding Encoding => currentEncoding; - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { // Does AO-DOS support hard disks? if(partition.Start > 0) return false; @@ -74,7 +74,7 @@ namespace DiscImageChef.Filesystems return bb.identifier.SequenceEqual(AODOSIdentifier); } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = Encoding.GetEncoding("koi8-r"); byte[] sector = imagePlugin.ReadSector(0); diff --git a/DiscImageChef.Filesystems/APFS.cs b/DiscImageChef.Filesystems/APFS.cs index c6e9fe989..49179df38 100644 --- a/DiscImageChef.Filesystems/APFS.cs +++ b/DiscImageChef.Filesystems/APFS.cs @@ -45,14 +45,14 @@ namespace DiscImageChef.Filesystems const uint APFS_CONTAINER_MAGIC = 0x4253584E; // "NXSB" const uint APFS_VOLUME_MAGIC = 0x42535041; // "APSB" FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; Encoding currentEncoding; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Apple File System"; - public virtual Guid Id => new Guid("A4060F9D-2909-42E2-9D95-DB31FA7EA797"); + public Encoding Encoding => currentEncoding; + public string Name => "Apple File System"; + public Guid Id => new Guid("A4060F9D-2909-42E2-9D95-DB31FA7EA797"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start >= partition.End) return false; @@ -71,7 +71,7 @@ namespace DiscImageChef.Filesystems return nxSb.magic == APFS_CONTAINER_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = Encoding.UTF8; diff --git a/DiscImageChef.Filesystems/Acorn.cs b/DiscImageChef.Filesystems/Acorn.cs index 463d764b0..c10e0d975 100644 --- a/DiscImageChef.Filesystems/Acorn.cs +++ b/DiscImageChef.Filesystems/Acorn.cs @@ -79,13 +79,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual string Name => "Acorn Advanced Disc Filing System"; - public virtual Guid Id => new Guid("BAFC1E50-9C64-4CD3-8400-80628CC27AFA"); - public virtual Encoding Encoding => currentEncoding; + public FileSystemType XmlFsType => xmlFsType; + public string Name => "Acorn Advanced Disc Filing System"; + public Guid Id => new Guid("BAFC1E50-9C64-4CD3-8400-80628CC27AFA"); + public Encoding Encoding => currentEncoding; // TODO: BBC Master hard disks are untested... - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start >= partition.End) return false; @@ -250,7 +250,7 @@ namespace DiscImageChef.Filesystems // TODO: Find root directory on volumes with DiscRecord // TODO: Support big directories (ADFS-G?) // TODO: Find the real freemap on volumes with DiscRecord, as DiscRecord's discid may be empty but this one isn't - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-1"); StringBuilder sbInformation = new StringBuilder(); diff --git a/DiscImageChef.Filesystems/AmigaDOS.cs b/DiscImageChef.Filesystems/AmigaDOS.cs index ec25b675b..837501b29 100644 --- a/DiscImageChef.Filesystems/AmigaDOS.cs +++ b/DiscImageChef.Filesystems/AmigaDOS.cs @@ -53,12 +53,12 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual string Name => "Amiga DOS filesystem"; - public virtual Guid Id => new Guid("3c882400-208c-427d-a086-9119852a1bc7"); - public virtual Encoding Encoding => currentEncoding; + public FileSystemType XmlFsType => xmlFsType; + public string Name => "Amiga DOS filesystem"; + public Guid Id => new Guid("3c882400-208c-427d-a086-9119852a1bc7"); + public Encoding Encoding => currentEncoding; - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start >= partition.End) return false; @@ -154,7 +154,7 @@ namespace DiscImageChef.Filesystems return false; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-1"); StringBuilder sbInformation = new StringBuilder(); diff --git a/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs b/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs index f553ea1b0..b1066c100 100644 --- a/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs +++ b/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs @@ -56,10 +56,10 @@ namespace DiscImageChef.Filesystems.AppleDOS Vtoc vtoc; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Apple DOS File System"; - public virtual Guid Id => new Guid("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n"); + public FileSystemType XmlFsType => xmlFsType; + public Encoding Encoding => currentEncoding; + public string Name => "Apple DOS File System"; + public Guid Id => new Guid("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n"); #region Caches /// Caches track/sector lists diff --git a/DiscImageChef.Filesystems/AppleDOS/Dir.cs b/DiscImageChef.Filesystems/AppleDOS/Dir.cs index 6b5214703..6120107f3 100644 --- a/DiscImageChef.Filesystems/AppleDOS/Dir.cs +++ b/DiscImageChef.Filesystems/AppleDOS/Dir.cs @@ -45,7 +45,7 @@ namespace DiscImageChef.Filesystems.AppleDOS /// /// Link path. /// Link destination. - public virtual Errno ReadLink(string path, ref string dest) + public Errno ReadLink(string path, ref string dest) { return !mounted ? Errno.AccessDenied : Errno.NotSupported; } @@ -55,7 +55,7 @@ namespace DiscImageChef.Filesystems.AppleDOS /// /// Directory path. /// Directory contents. - public virtual Errno ReadDir(string path, ref List contents) + public Errno ReadDir(string path, ref List contents) { if(!mounted) return Errno.AccessDenied; diff --git a/DiscImageChef.Filesystems/AppleDOS/File.cs b/DiscImageChef.Filesystems/AppleDOS/File.cs index 4fc3dcdb7..8be489232 100644 --- a/DiscImageChef.Filesystems/AppleDOS/File.cs +++ b/DiscImageChef.Filesystems/AppleDOS/File.cs @@ -40,7 +40,7 @@ namespace DiscImageChef.Filesystems.AppleDOS { public partial class AppleDOS { - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) + public Errno GetAttributes(string path, ref FileAttributes attributes) { if(!mounted) return Errno.AccessDenied; @@ -64,7 +64,7 @@ namespace DiscImageChef.Filesystems.AppleDOS return Errno.NoError; } - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) + public Errno Read(string path, long offset, long size, ref byte[] buf) { if(!mounted) return Errno.AccessDenied; @@ -103,7 +103,7 @@ namespace DiscImageChef.Filesystems.AppleDOS return Errno.NoError; } - public virtual Errno Stat(string path, ref FileEntryInfo stat) + public Errno Stat(string path, ref FileEntryInfo stat) { if(!mounted) return Errno.AccessDenied; @@ -148,7 +148,7 @@ namespace DiscImageChef.Filesystems.AppleDOS return Errno.NoError; } - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) + public Errno MapBlock(string path, long fileBlock, ref long deviceBlock) { // TODO: Not really important. return !mounted ? Errno.AccessDenied : Errno.NotImplemented; diff --git a/DiscImageChef.Filesystems/AppleDOS/Info.cs b/DiscImageChef.Filesystems/AppleDOS/Info.cs index 52961810b..e52c1afd3 100644 --- a/DiscImageChef.Filesystems/AppleDOS/Info.cs +++ b/DiscImageChef.Filesystems/AppleDOS/Info.cs @@ -43,7 +43,7 @@ namespace DiscImageChef.Filesystems.AppleDOS { public partial class AppleDOS { - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.Sectors != 455 && imagePlugin.Info.Sectors != 560) return false; @@ -63,7 +63,7 @@ namespace DiscImageChef.Filesystems.AppleDOS vtoc.sectorsPerTrack == spt && vtoc.bytesPerSector == 256; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { // TODO: Until Apple ][ encoding is implemented currentEncoding = new LisaRoman(); diff --git a/DiscImageChef.Filesystems/AppleDOS/Super.cs b/DiscImageChef.Filesystems/AppleDOS/Super.cs index a8033413f..597a06f26 100644 --- a/DiscImageChef.Filesystems/AppleDOS/Super.cs +++ b/DiscImageChef.Filesystems/AppleDOS/Super.cs @@ -46,7 +46,7 @@ namespace DiscImageChef.Filesystems.AppleDOS /// /// Mounts an Apple DOS filesystem /// - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) + public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) { device = imagePlugin; start = partition.Start; @@ -120,7 +120,7 @@ namespace DiscImageChef.Filesystems.AppleDOS /// /// Umounts this DOS filesystem /// - public virtual Errno Unmount() + public Errno Unmount() { mounted = false; extentCache = null; @@ -135,7 +135,7 @@ namespace DiscImageChef.Filesystems.AppleDOS /// Gets information about the mounted volume. /// /// Information about the mounted volume. - public virtual Errno StatFs(ref FileSystemInfo stat) + public Errno StatFs(ref FileSystemInfo stat) { stat = new FileSystemInfo { diff --git a/DiscImageChef.Filesystems/AppleDOS/Xattr.cs b/DiscImageChef.Filesystems/AppleDOS/Xattr.cs index 7fb43e9db..688fa675f 100644 --- a/DiscImageChef.Filesystems/AppleDOS/Xattr.cs +++ b/DiscImageChef.Filesystems/AppleDOS/Xattr.cs @@ -43,7 +43,7 @@ namespace DiscImageChef.Filesystems.AppleDOS /// Error number. /// Path. /// List of extended attributes, alternate data streams and forks. - public virtual Errno ListXAttr(string path, ref List xattrs) + public Errno ListXAttr(string path, ref List xattrs) { if(!mounted) return Errno.AccessDenied; @@ -77,7 +77,7 @@ namespace DiscImageChef.Filesystems.AppleDOS /// File path. /// Extended attribute, alternate data stream or fork name. /// Buffer. - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) + public Errno GetXattr(string path, string xattr, ref byte[] buf) { if(!mounted) return Errno.AccessDenied; diff --git a/DiscImageChef.Filesystems/AppleHFS.cs b/DiscImageChef.Filesystems/AppleHFS.cs index 28b319289..adb133793 100644 --- a/DiscImageChef.Filesystems/AppleHFS.cs +++ b/DiscImageChef.Filesystems/AppleHFS.cs @@ -58,13 +58,13 @@ namespace DiscImageChef.Filesystems const ushort HFSBB_MAGIC = 0x4C4B; Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Apple Hierarchical File System"; - public virtual Guid Id => new Guid("36405F8D-0D26-6ECC-0BBB-1D5225FF404F"); + public Encoding Encoding => currentEncoding; + public string Name => "Apple Hierarchical File System"; + public Guid Id => new Guid("36405F8D-0D26-6ECC-0BBB-1D5225FF404F"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -102,7 +102,7 @@ namespace DiscImageChef.Filesystems return false; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("macintosh"); diff --git a/DiscImageChef.Filesystems/AppleHFSPlus.cs b/DiscImageChef.Filesystems/AppleHFSPlus.cs index ef3389636..5f592ab2f 100644 --- a/DiscImageChef.Filesystems/AppleHFSPlus.cs +++ b/DiscImageChef.Filesystems/AppleHFSPlus.cs @@ -58,13 +58,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Apple HFS+ filesystem"; - public virtual Guid Id => new Guid("36405F8D-0D26-6EBE-436F-62F0586B4F08"); + public Encoding Encoding => currentEncoding; + public string Name => "Apple HFS+ filesystem"; + public Guid Id => new Guid("36405F8D-0D26-6EBE-436F-62F0586B4F08"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -103,7 +103,7 @@ namespace DiscImageChef.Filesystems return drSigWord == HFSP_MAGIC || drSigWord == HFSX_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = Encoding.BigEndianUnicode; diff --git a/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs b/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs index b9a6d22f9..9343a6a94 100644 --- a/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs +++ b/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs @@ -65,10 +65,10 @@ namespace DiscImageChef.Filesystems.AppleMFS Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual string Name => "Apple Macintosh File System"; - public virtual Guid Id => new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A"); - public virtual Encoding Encoding => currentEncoding; + public FileSystemType XmlFsType => xmlFsType; + public string Name => "Apple Macintosh File System"; + public Guid Id => new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A"); + public Encoding Encoding => currentEncoding; public AppleMFS() { diff --git a/DiscImageChef.Filesystems/AppleMFS/Dir.cs b/DiscImageChef.Filesystems/AppleMFS/Dir.cs index 813624da2..27179acaf 100644 --- a/DiscImageChef.Filesystems/AppleMFS/Dir.cs +++ b/DiscImageChef.Filesystems/AppleMFS/Dir.cs @@ -40,7 +40,7 @@ namespace DiscImageChef.Filesystems.AppleMFS // Information from Inside Macintosh Volume II public partial class AppleMFS { - public virtual Errno ReadDir(string path, ref List contents) + public Errno ReadDir(string path, ref List contents) { if(!mounted) return Errno.AccessDenied; diff --git a/DiscImageChef.Filesystems/AppleMFS/File.cs b/DiscImageChef.Filesystems/AppleMFS/File.cs index 611805762..bca7547ab 100644 --- a/DiscImageChef.Filesystems/AppleMFS/File.cs +++ b/DiscImageChef.Filesystems/AppleMFS/File.cs @@ -40,7 +40,7 @@ namespace DiscImageChef.Filesystems.AppleMFS // Information from Inside Macintosh Volume II public partial class AppleMFS { - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) + public Errno MapBlock(string path, long fileBlock, ref long deviceBlock) { deviceBlock = new long(); @@ -75,7 +75,7 @@ namespace DiscImageChef.Filesystems.AppleMFS return Errno.InOutError; } - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) + public Errno GetAttributes(string path, ref FileAttributes attributes) { if(!mounted) return Errno.AccessDenied; @@ -108,7 +108,7 @@ namespace DiscImageChef.Filesystems.AppleMFS return Errno.NoError; } - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) + public Errno Read(string path, long offset, long size, ref byte[] buf) { if(!mounted) return Errno.AccessDenied; @@ -142,7 +142,7 @@ namespace DiscImageChef.Filesystems.AppleMFS return Errno.NoError; } - public virtual Errno Stat(string path, ref FileEntryInfo stat) + public Errno Stat(string path, ref FileEntryInfo stat) { if(!mounted) return Errno.AccessDenied; @@ -219,7 +219,7 @@ namespace DiscImageChef.Filesystems.AppleMFS return Errno.NoError; } - public virtual Errno ReadLink(string path, ref string dest) + public Errno ReadLink(string path, ref string dest) { return Errno.NotImplemented; } diff --git a/DiscImageChef.Filesystems/AppleMFS/Info.cs b/DiscImageChef.Filesystems/AppleMFS/Info.cs index e06f33cc8..1d3ddc1b5 100644 --- a/DiscImageChef.Filesystems/AppleMFS/Info.cs +++ b/DiscImageChef.Filesystems/AppleMFS/Info.cs @@ -41,7 +41,7 @@ namespace DiscImageChef.Filesystems.AppleMFS // Information from Inside Macintosh Volume II public partial class AppleMFS { - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { ushort drSigWord; @@ -56,7 +56,7 @@ namespace DiscImageChef.Filesystems.AppleMFS return drSigWord == MFS_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { information = ""; diff --git a/DiscImageChef.Filesystems/AppleMFS/Super.cs b/DiscImageChef.Filesystems/AppleMFS/Super.cs index f58d89cd6..9ca55d797 100644 --- a/DiscImageChef.Filesystems/AppleMFS/Super.cs +++ b/DiscImageChef.Filesystems/AppleMFS/Super.cs @@ -41,7 +41,7 @@ namespace DiscImageChef.Filesystems.AppleMFS // Information from Inside Macintosh Volume II public partial class AppleMFS { - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) + public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) { device = imagePlugin; partitionStart = partition.Start; @@ -154,7 +154,7 @@ namespace DiscImageChef.Filesystems.AppleMFS return Errno.NoError; } - public virtual Errno Unmount() + public Errno Unmount() { mounted = false; idToFilename = null; @@ -165,7 +165,7 @@ namespace DiscImageChef.Filesystems.AppleMFS return Errno.NoError; } - public virtual Errno StatFs(ref FileSystemInfo stat) + public Errno StatFs(ref FileSystemInfo stat) { stat = new FileSystemInfo { diff --git a/DiscImageChef.Filesystems/AppleMFS/Xattr.cs b/DiscImageChef.Filesystems/AppleMFS/Xattr.cs index a0273233f..2b20279e6 100644 --- a/DiscImageChef.Filesystems/AppleMFS/Xattr.cs +++ b/DiscImageChef.Filesystems/AppleMFS/Xattr.cs @@ -40,7 +40,7 @@ namespace DiscImageChef.Filesystems.AppleMFS // Information from Inside Macintosh Volume II public partial class AppleMFS { - public virtual Errno ListXAttr(string path, ref List xattrs) + public Errno ListXAttr(string path, ref List xattrs) { if(!mounted) return Errno.AccessDenied; @@ -82,7 +82,7 @@ namespace DiscImageChef.Filesystems.AppleMFS return Errno.NoError; } - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) + public Errno GetXattr(string path, string xattr, ref byte[] buf) { if(!mounted) return Errno.AccessDenied; diff --git a/DiscImageChef.Filesystems/AtheOS.cs b/DiscImageChef.Filesystems/AtheOS.cs index 25a52e712..16b77165f 100644 --- a/DiscImageChef.Filesystems/AtheOS.cs +++ b/DiscImageChef.Filesystems/AtheOS.cs @@ -51,13 +51,13 @@ namespace DiscImageChef.Filesystems const uint AFS_BOOTBLOCK_SIZE = AFS_SUPERBLOCK_SIZE; Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "AtheOS Filesystem"; - public virtual Guid Id => new Guid("AAB2C4F1-DC07-49EE-A948-576CC51B58C5"); + public Encoding Encoding => currentEncoding; + public string Name => "AtheOS Filesystem"; + public Guid Id => new Guid("AAB2C4F1-DC07-49EE-A948-576CC51B58C5"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { ulong sector = AFS_BOOTBLOCK_SIZE / imagePlugin.Info.SectorSize; uint offset = AFS_BOOTBLOCK_SIZE % imagePlugin.Info.SectorSize; @@ -79,7 +79,7 @@ namespace DiscImageChef.Filesystems return magic == AFS_MAGIC1; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); diff --git a/DiscImageChef.Filesystems/BFS.cs b/DiscImageChef.Filesystems/BFS.cs index bdac0f7db..072f0f2e3 100644 --- a/DiscImageChef.Filesystems/BFS.cs +++ b/DiscImageChef.Filesystems/BFS.cs @@ -56,13 +56,13 @@ namespace DiscImageChef.Filesystems const uint BEFS_DIRTY = 0x44495254; Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Be Filesystem"; - public virtual Guid Id => new Guid("dc8572b3-b6ad-46e4-8de9-cbe123ff6672"); + public Encoding Encoding => currentEncoding; + public string Name => "Be Filesystem"; + public Guid Id => new Guid("dc8572b3-b6ad-46e4-8de9-cbe123ff6672"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -92,7 +92,7 @@ namespace DiscImageChef.Filesystems return magic == BEFS_MAGIC1 || magicBe == BEFS_MAGIC1; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/BTRFS.cs b/DiscImageChef.Filesystems/BTRFS.cs index f04f78361..73401fa50 100644 --- a/DiscImageChef.Filesystems/BTRFS.cs +++ b/DiscImageChef.Filesystems/BTRFS.cs @@ -48,14 +48,14 @@ namespace DiscImageChef.Filesystems /// const ulong btrfsMagic = 0x4D5F53665248425F; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; Encoding currentEncoding; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "B-tree file system"; - public virtual Guid Id => new Guid("C904CF15-5222-446B-B7DB-02EAC5D781B3"); + public Encoding Encoding => currentEncoding; + public string Name => "B-tree file system"; + public Guid Id => new Guid("C904CF15-5222-446B-B7DB-02EAC5D781B3"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start >= partition.End) return false; @@ -83,7 +83,7 @@ namespace DiscImageChef.Filesystems return btrfsSb.magic == btrfsMagic; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); diff --git a/DiscImageChef.Filesystems/CBM.cs b/DiscImageChef.Filesystems/CBM.cs index eb3eaaf71..8eb6c14f8 100644 --- a/DiscImageChef.Filesystems/CBM.cs +++ b/DiscImageChef.Filesystems/CBM.cs @@ -46,13 +46,13 @@ namespace DiscImageChef.Filesystems { Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual string Name => "Commodore file system"; - public virtual Guid Id => new Guid("D104744E-A376-450C-BAC0-1347C93F983B"); - public virtual Encoding Encoding => currentEncoding; + public string Name => "Commodore file system"; + public Guid Id => new Guid("D104744E-A376-450C-BAC0-1347C93F983B"); + public Encoding Encoding => currentEncoding; - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start > 0) return false; @@ -91,7 +91,7 @@ namespace DiscImageChef.Filesystems return false; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = new PETSCII(); byte[] sector; diff --git a/DiscImageChef.Filesystems/CPM/CPM.cs b/DiscImageChef.Filesystems/CPM/CPM.cs index cfc3b49e1..2694aca08 100644 --- a/DiscImageChef.Filesystems/CPM/CPM.cs +++ b/DiscImageChef.Filesystems/CPM/CPM.cs @@ -113,9 +113,9 @@ namespace DiscImageChef.Filesystems.CPM /// CpmDefinition workingDefinition; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "CP/M File System"; - public virtual Guid Id => new Guid("AA2B8585-41DF-4E3B-8A35-D1A935E2F8A1"); + public FileSystemType XmlFsType => xmlFsType; + public Encoding Encoding => currentEncoding; + public string Name => "CP/M File System"; + public Guid Id => new Guid("AA2B8585-41DF-4E3B-8A35-D1A935E2F8A1"); } } \ No newline at end of file diff --git a/DiscImageChef.Filesystems/CPM/Dir.cs b/DiscImageChef.Filesystems/CPM/Dir.cs index 0f35ff292..5bf983c68 100644 --- a/DiscImageChef.Filesystems/CPM/Dir.cs +++ b/DiscImageChef.Filesystems/CPM/Dir.cs @@ -39,7 +39,7 @@ namespace DiscImageChef.Filesystems.CPM { partial class CPM { - public virtual Errno ReadDir(string path, ref List contents) + public Errno ReadDir(string path, ref List contents) { if(!mounted) return Errno.AccessDenied; diff --git a/DiscImageChef.Filesystems/CPM/File.cs b/DiscImageChef.Filesystems/CPM/File.cs index d9f3fa23f..06e85d7dc 100644 --- a/DiscImageChef.Filesystems/CPM/File.cs +++ b/DiscImageChef.Filesystems/CPM/File.cs @@ -36,7 +36,7 @@ namespace DiscImageChef.Filesystems.CPM { partial class CPM { - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) + public Errno GetAttributes(string path, ref FileAttributes attributes) { if(!mounted) return Errno.AccessDenied; @@ -59,12 +59,12 @@ namespace DiscImageChef.Filesystems.CPM } // TODO: Implementing this would require storing the interleaving - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) + public Errno MapBlock(string path, long fileBlock, ref long deviceBlock) { return !mounted ? Errno.AccessDenied : Errno.NotImplemented; } - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) + public Errno Read(string path, long offset, long size, ref byte[] buf) { if(!mounted) return Errno.AccessDenied; @@ -90,12 +90,12 @@ namespace DiscImageChef.Filesystems.CPM return Errno.NoError; } - public virtual Errno ReadLink(string path, ref string dest) + public Errno ReadLink(string path, ref string dest) { return !mounted ? Errno.AccessDenied : Errno.NotSupported; } - public virtual Errno Stat(string path, ref FileEntryInfo stat) + public Errno Stat(string path, ref FileEntryInfo stat) { if(!mounted) return Errno.AccessDenied; diff --git a/DiscImageChef.Filesystems/CPM/Info.cs b/DiscImageChef.Filesystems/CPM/Info.cs index 514ca445a..e9d671854 100644 --- a/DiscImageChef.Filesystems/CPM/Info.cs +++ b/DiscImageChef.Filesystems/CPM/Info.cs @@ -44,7 +44,7 @@ namespace DiscImageChef.Filesystems.CPM { partial class CPM { - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { // This will only continue on devices with a chance to have ever been used by CP/M while failing on all others // It's ugly, but will stop a lot of false positives @@ -976,7 +976,7 @@ namespace DiscImageChef.Filesystems.CPM } } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("IBM437"); information = ""; diff --git a/DiscImageChef.Filesystems/CPM/Super.cs b/DiscImageChef.Filesystems/CPM/Super.cs index 3db88b9cc..747838b20 100644 --- a/DiscImageChef.Filesystems/CPM/Super.cs +++ b/DiscImageChef.Filesystems/CPM/Super.cs @@ -47,7 +47,7 @@ namespace DiscImageChef.Filesystems.CPM { partial class CPM { - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition1, Encoding encoding, bool debug) + public Errno Mount(IMediaImage imagePlugin, Partition partition1, Encoding encoding, bool debug) { device = imagePlugin; this.partition = partition; @@ -686,7 +686,7 @@ namespace DiscImageChef.Filesystems.CPM /// Gets information about the mounted volume. /// /// Information about the mounted volume. - public virtual Errno StatFs(ref FileSystemInfo stat) + public Errno StatFs(ref FileSystemInfo stat) { if(!mounted) return Errno.AccessDenied; @@ -695,7 +695,7 @@ namespace DiscImageChef.Filesystems.CPM return Errno.NoError; } - public virtual Errno Unmount() + public Errno Unmount() { mounted = false; definitions = null; diff --git a/DiscImageChef.Filesystems/CPM/Xattr.cs b/DiscImageChef.Filesystems/CPM/Xattr.cs index be6cd4d16..167608b80 100644 --- a/DiscImageChef.Filesystems/CPM/Xattr.cs +++ b/DiscImageChef.Filesystems/CPM/Xattr.cs @@ -44,7 +44,7 @@ namespace DiscImageChef.Filesystems.CPM /// File path. /// Extendad attribute, alternate data stream or fork name. /// Buffer. - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) + public Errno GetXattr(string path, string xattr, ref byte[] buf) { if(!mounted) return Errno.AccessDenied; @@ -70,7 +70,7 @@ namespace DiscImageChef.Filesystems.CPM /// Error number. /// Path. /// List of extended attributes, alternate data streams and forks. - public virtual Errno ListXAttr(string path, ref List xattrs) + public Errno ListXAttr(string path, ref List xattrs) { if(!mounted) return Errno.AccessDenied; diff --git a/DiscImageChef.Filesystems/Cram.cs b/DiscImageChef.Filesystems/Cram.cs index b2d988b77..bd72e7e53 100644 --- a/DiscImageChef.Filesystems/Cram.cs +++ b/DiscImageChef.Filesystems/Cram.cs @@ -49,13 +49,13 @@ namespace DiscImageChef.Filesystems const uint CRAM_CIGAM = 0x453DCD28; Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Cram filesystem"; - public virtual Guid Id => new Guid("F8F6E46F-7A2A-48E3-9C0A-46AF4DC29E09"); + public Encoding Encoding => currentEncoding; + public string Name => "Cram filesystem"; + public Guid Id => new Guid("F8F6E46F-7A2A-48E3-9C0A-46AF4DC29E09"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start >= partition.End) return false; @@ -66,7 +66,7 @@ namespace DiscImageChef.Filesystems return magic == CRAM_MAGIC || magic == CRAM_CIGAM; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); byte[] sector = imagePlugin.ReadSector(partition.Start); diff --git a/DiscImageChef.Filesystems/ECMA67.cs b/DiscImageChef.Filesystems/ECMA67.cs index ab88dea53..f12b0a162 100644 --- a/DiscImageChef.Filesystems/ECMA67.cs +++ b/DiscImageChef.Filesystems/ECMA67.cs @@ -46,13 +46,13 @@ namespace DiscImageChef.Filesystems readonly byte[] ECMA67_Magic = {0x56, 0x4F, 0x4C}; Encoding currentEncoding; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "ECMA-67"; - public virtual Guid Id => new Guid("62A2D44A-CBC1-4377-B4B6-28C5C92034A1"); + public Encoding Encoding => currentEncoding; + public string Name => "ECMA-67"; + public Guid Id => new Guid("62A2D44A-CBC1-4377-B4B6-28C5C92034A1"); FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start > 0) return false; @@ -71,7 +71,7 @@ namespace DiscImageChef.Filesystems return ECMA67_Magic.SequenceEqual(vol.labelIdentifier) && vol.labelNumber == 1 && vol.recordLength == 0x31; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-1"); diff --git a/DiscImageChef.Filesystems/EFS.cs b/DiscImageChef.Filesystems/EFS.cs index 9c52e319c..57152b94b 100644 --- a/DiscImageChef.Filesystems/EFS.cs +++ b/DiscImageChef.Filesystems/EFS.cs @@ -48,13 +48,13 @@ namespace DiscImageChef.Filesystems const uint EFS_MAGIC_NEW = 0x0007295A; Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Extent File System Plugin"; - public virtual Guid Id => new Guid("52A43F90-9AF3-4391-ADFE-65598DEEABAB"); + public Encoding Encoding => currentEncoding; + public string Name => "Extent File System Plugin"; + public Guid Id => new Guid("52A43F90-9AF3-4391-ADFE-65598DEEABAB"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -101,7 +101,7 @@ namespace DiscImageChef.Filesystems return false; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/F2FS.cs b/DiscImageChef.Filesystems/F2FS.cs index 45ff4e96e..05c06eb4b 100644 --- a/DiscImageChef.Filesystems/F2FS.cs +++ b/DiscImageChef.Filesystems/F2FS.cs @@ -51,13 +51,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "F2FS Plugin"; - public virtual Guid Id => new Guid("82B0920F-5F0D-4063-9F57-ADE0AE02ECE5"); + public Encoding Encoding => currentEncoding; + public string Name => "F2FS Plugin"; + public Guid Id => new Guid("82B0920F-5F0D-4063-9F57-ADE0AE02ECE5"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < F2FS_MIN_SECTOR || imagePlugin.Info.SectorSize > F2FS_MAX_SECTOR) return false; @@ -83,7 +83,7 @@ namespace DiscImageChef.Filesystems return f2fsSb.magic == F2FS_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = Encoding.Unicode; diff --git a/DiscImageChef.Filesystems/FAT.cs b/DiscImageChef.Filesystems/FAT.cs index e2d3578ea..8a63adc11 100644 --- a/DiscImageChef.Filesystems/FAT.cs +++ b/DiscImageChef.Filesystems/FAT.cs @@ -55,13 +55,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Microsoft File Allocation Table"; - public virtual Guid Id => new Guid("33513B2C-0D26-0D2D-32C3-79D8611158E0"); + public Encoding Encoding => currentEncoding; + public string Name => "Microsoft File Allocation Table"; + public Guid Id => new Guid("33513B2C-0D26-0D2D-32C3-79D8611158E0"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -314,7 +314,7 @@ namespace DiscImageChef.Filesystems return fatId == fat2Sector[0]; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("IBM437"); information = ""; diff --git a/DiscImageChef.Filesystems/FATX.cs b/DiscImageChef.Filesystems/FATX.cs index 47273f601..a2564cb27 100644 --- a/DiscImageChef.Filesystems/FATX.cs +++ b/DiscImageChef.Filesystems/FATX.cs @@ -46,13 +46,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "FATX Filesystem Plugin"; - public virtual Guid Id => new Guid("ED27A721-4A17-4649-89FD-33633B46E228"); + public Encoding Encoding => currentEncoding; + public string Name => "FATX Filesystem Plugin"; + public Guid Id => new Guid("ED27A721-4A17-4649-89FD-33633B46E228"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -64,7 +64,7 @@ namespace DiscImageChef.Filesystems return fatxSb.magic == FATX_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = Encoding.UTF8; diff --git a/DiscImageChef.Filesystems/FFS.cs b/DiscImageChef.Filesystems/FFS.cs index 32eeafe48..19f715225 100644 --- a/DiscImageChef.Filesystems/FFS.cs +++ b/DiscImageChef.Filesystems/FFS.cs @@ -83,13 +83,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "BSD Fast File System (aka UNIX File System, UFS)"; - public virtual Guid Id => new Guid("CC90D342-05DB-48A8-988C-C1FE000034A3"); + public Encoding Encoding => currentEncoding; + public string Name => "BSD Fast File System (aka UNIX File System, UFS)"; + public Guid Id => new Guid("CC90D342-05DB-48A8-988C-C1FE000034A3"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -114,7 +114,7 @@ namespace DiscImageChef.Filesystems magic == UFS_BAD_MAGIC || magic == UFS_BAD_CIGAM); } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/Fossil.cs b/DiscImageChef.Filesystems/Fossil.cs index 63a0fa56d..a4a49f220 100644 --- a/DiscImageChef.Filesystems/Fossil.cs +++ b/DiscImageChef.Filesystems/Fossil.cs @@ -50,13 +50,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Fossil Filesystem Plugin"; - public virtual Guid Id => new Guid("932BF104-43F6-494F-973C-45EF58A51DA9"); + public Encoding Encoding => currentEncoding; + public string Name => "Fossil Filesystem Plugin"; + public Guid Id => new Guid("932BF104-43F6-494F-973C-45EF58A51DA9"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { ulong hdrSector = HEADER_POS / imagePlugin.Info.SectorSize; @@ -73,7 +73,7 @@ namespace DiscImageChef.Filesystems return hdr.magic == FOSSIL_HDR_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { // Technically everything on Plan 9 from Bell Labs is in UTF-8 currentEncoding = Encoding.UTF8; diff --git a/DiscImageChef.Filesystems/HAMMER.cs b/DiscImageChef.Filesystems/HAMMER.cs index 1d5c3c4d4..13fb860a1 100644 --- a/DiscImageChef.Filesystems/HAMMER.cs +++ b/DiscImageChef.Filesystems/HAMMER.cs @@ -55,13 +55,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "HAMMER Filesystem"; - public virtual Guid Id => new Guid("91A188BF-5FD7-4677-BBD3-F59EBA9C864D"); + public Encoding Encoding => currentEncoding; + public string Name => "HAMMER Filesystem"; + public Guid Id => new Guid("91A188BF-5FD7-4677-BBD3-F59EBA9C864D"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { uint run = HAMMER_VOLHDR_SIZE / imagePlugin.Info.SectorSize; @@ -78,7 +78,7 @@ namespace DiscImageChef.Filesystems return magic == HAMMER_FSBUF_VOLUME || magic == HAMMER_FSBUF_VOLUME_REV; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/HPFS.cs b/DiscImageChef.Filesystems/HPFS.cs index b5f5de1c9..1bb0182e1 100644 --- a/DiscImageChef.Filesystems/HPFS.cs +++ b/DiscImageChef.Filesystems/HPFS.cs @@ -46,13 +46,13 @@ namespace DiscImageChef.Filesystems { Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "OS/2 High Performance File System"; - public virtual Guid Id => new Guid("33513B2C-f590-4acb-8bf2-0b1d5e19dec5"); + public Encoding Encoding => currentEncoding; + public string Name => "OS/2 High Performance File System"; + public Guid Id => new Guid("33513B2C-f590-4acb-8bf2-0b1d5e19dec5"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(16 + partition.Start >= partition.End) return false; @@ -66,7 +66,7 @@ namespace DiscImageChef.Filesystems return magic1 == 0xF995E849 && magic2 == 0xFA53E9C5; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("ibm850"); information = ""; diff --git a/DiscImageChef.Filesystems/ISO9660/ISO9660.cs b/DiscImageChef.Filesystems/ISO9660/ISO9660.cs index 8107a7656..f22ccc776 100644 --- a/DiscImageChef.Filesystems/ISO9660/ISO9660.cs +++ b/DiscImageChef.Filesystems/ISO9660/ISO9660.cs @@ -43,10 +43,10 @@ namespace DiscImageChef.Filesystems.ISO9660 { Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "ISO9660 Filesystem"; - public virtual Guid Id => new Guid("d812f4d3-c357-400d-90fd-3b22ef786aa8"); + public Encoding Encoding => currentEncoding; + public string Name => "ISO9660 Filesystem"; + public Guid Id => new Guid("d812f4d3-c357-400d-90fd-3b22ef786aa8"); } } \ No newline at end of file diff --git a/DiscImageChef.Filesystems/ISO9660/Info.cs b/DiscImageChef.Filesystems/ISO9660/Info.cs index cd36f1e51..4deeadb5f 100644 --- a/DiscImageChef.Filesystems/ISO9660/Info.cs +++ b/DiscImageChef.Filesystems/ISO9660/Info.cs @@ -45,7 +45,7 @@ namespace DiscImageChef.Filesystems.ISO9660 { public partial class ISO9660 { - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { // ISO9660 is designed for 2048 bytes/sector devices if(imagePlugin.Info.SectorSize < 2048) return false; @@ -77,7 +77,7 @@ namespace DiscImageChef.Filesystems.ISO9660 Encoding.ASCII.GetString(vdMagic) == CDI_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.ASCII; information = ""; diff --git a/DiscImageChef.Filesystems/JFS.cs b/DiscImageChef.Filesystems/JFS.cs index 2c93fb7de..6828a0661 100644 --- a/DiscImageChef.Filesystems/JFS.cs +++ b/DiscImageChef.Filesystems/JFS.cs @@ -47,13 +47,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "JFS Plugin"; - public virtual Guid Id => new Guid("D3BE2A41-8F28-4055-94DC-BB6C72A0E9C4"); + public Encoding Encoding => currentEncoding; + public string Name => "JFS Plugin"; + public Guid Id => new Guid("D3BE2A41-8F28-4055-94DC-BB6C72A0E9C4"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { uint bootSectors = JFS_BOOT_BLOCKS_SIZE / imagePlugin.Info.SectorSize; if(partition.Start + bootSectors >= partition.End) return false; @@ -70,7 +70,7 @@ namespace DiscImageChef.Filesystems return jfsSb.s_magic == JFS_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/LIF.cs b/DiscImageChef.Filesystems/LIF.cs index 33369096b..910c134d3 100644 --- a/DiscImageChef.Filesystems/LIF.cs +++ b/DiscImageChef.Filesystems/LIF.cs @@ -48,13 +48,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "HP Logical Interchange Format Plugin"; - public virtual Guid Id => new Guid("41535647-77A5-477B-9206-DA727ACDC704"); + public Encoding Encoding => currentEncoding; + public string Name => "HP Logical Interchange Format Plugin"; + public Guid Id => new Guid("41535647-77A5-477B-9206-DA727ACDC704"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 256) return false; @@ -65,7 +65,7 @@ namespace DiscImageChef.Filesystems return lifSb.magic == LIF_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/LisaFS/Dir.cs b/DiscImageChef.Filesystems/LisaFS/Dir.cs index 8bf0910f8..c612e9d40 100644 --- a/DiscImageChef.Filesystems/LisaFS/Dir.cs +++ b/DiscImageChef.Filesystems/LisaFS/Dir.cs @@ -45,7 +45,7 @@ namespace DiscImageChef.Filesystems.LisaFS /// /// Link path. /// Link destination. - public virtual Errno ReadLink(string path, ref string dest) + public Errno ReadLink(string path, ref string dest) { // LisaFS does not support symbolic links (afaik) return Errno.NotSupported; @@ -56,7 +56,7 @@ namespace DiscImageChef.Filesystems.LisaFS /// /// Directory path. /// Directory contents. - public virtual Errno ReadDir(string path, ref List contents) + public Errno ReadDir(string path, ref List contents) { Errno error = LookupFileId(path, out short fileId, out bool isDir); if(error != Errno.NoError) return error; diff --git a/DiscImageChef.Filesystems/LisaFS/Extent.cs b/DiscImageChef.Filesystems/LisaFS/Extent.cs index 7b50464ee..5bf10217e 100644 --- a/DiscImageChef.Filesystems/LisaFS/Extent.cs +++ b/DiscImageChef.Filesystems/LisaFS/Extent.cs @@ -39,7 +39,7 @@ namespace DiscImageChef.Filesystems.LisaFS { public partial class LisaFS { - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) + public Errno MapBlock(string path, long fileBlock, ref long deviceBlock) { // TODO: Not really important. return Errno.NotImplemented; diff --git a/DiscImageChef.Filesystems/LisaFS/File.cs b/DiscImageChef.Filesystems/LisaFS/File.cs index 8ebfb59d9..e4e8e1f17 100644 --- a/DiscImageChef.Filesystems/LisaFS/File.cs +++ b/DiscImageChef.Filesystems/LisaFS/File.cs @@ -39,7 +39,7 @@ namespace DiscImageChef.Filesystems.LisaFS { public partial class LisaFS { - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) + public Errno GetAttributes(string path, ref FileAttributes attributes) { Errno error = LookupFileId(path, out short fileId, out bool isDir); if(error != Errno.NoError) return error; @@ -52,7 +52,7 @@ namespace DiscImageChef.Filesystems.LisaFS return Errno.NoError; } - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) + public Errno Read(string path, long offset, long size, ref byte[] buf) { if(size == 0) { @@ -94,7 +94,7 @@ namespace DiscImageChef.Filesystems.LisaFS return Errno.NoError; } - public virtual Errno Stat(string path, ref FileEntryInfo stat) + public Errno Stat(string path, ref FileEntryInfo stat) { Errno error = LookupFileId(path, out short fileId, out bool isDir); if(error != Errno.NoError) return error; diff --git a/DiscImageChef.Filesystems/LisaFS/Info.cs b/DiscImageChef.Filesystems/LisaFS/Info.cs index 1f8238d08..dde5a4977 100644 --- a/DiscImageChef.Filesystems/LisaFS/Info.cs +++ b/DiscImageChef.Filesystems/LisaFS/Info.cs @@ -44,7 +44,7 @@ namespace DiscImageChef.Filesystems.LisaFS { public partial class LisaFS { - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { try { @@ -120,7 +120,7 @@ namespace DiscImageChef.Filesystems.LisaFS } } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = new LisaRoman(); information = ""; diff --git a/DiscImageChef.Filesystems/LisaFS/LisaFS.cs b/DiscImageChef.Filesystems/LisaFS/LisaFS.cs index 0c7099782..5fb29774f 100644 --- a/DiscImageChef.Filesystems/LisaFS/LisaFS.cs +++ b/DiscImageChef.Filesystems/LisaFS/LisaFS.cs @@ -54,11 +54,11 @@ namespace DiscImageChef.Filesystems.LisaFS SRecord[] srecords; ulong volumePrefix; - public virtual string Name => "Apple Lisa File System"; - public virtual Guid Id => new Guid("7E6034D1-D823-4248-A54D-239742B28391"); - public virtual Encoding Encoding => currentEncoding; + public string Name => "Apple Lisa File System"; + public Guid Id => new Guid("7E6034D1-D823-4248-A54D-239742B28391"); + public Encoding Encoding => currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; #region Caches /// Caches Extents Files diff --git a/DiscImageChef.Filesystems/LisaFS/Super.cs b/DiscImageChef.Filesystems/LisaFS/Super.cs index 6c01cc358..2578c10b3 100644 --- a/DiscImageChef.Filesystems/LisaFS/Super.cs +++ b/DiscImageChef.Filesystems/LisaFS/Super.cs @@ -47,7 +47,7 @@ namespace DiscImageChef.Filesystems.LisaFS /// /// Mounts an Apple Lisa filesystem /// - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) + public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) { try { @@ -319,7 +319,7 @@ namespace DiscImageChef.Filesystems.LisaFS /// /// Umounts this Lisa filesystem /// - public virtual Errno Unmount() + public Errno Unmount() { mounted = false; extentCache = null; @@ -340,7 +340,7 @@ namespace DiscImageChef.Filesystems.LisaFS /// Gets information about the mounted volume. /// /// Information about the mounted volume. - public virtual Errno StatFs(ref FileSystemInfo stat) + public Errno StatFs(ref FileSystemInfo stat) { if(!mounted) return Errno.AccessDenied; diff --git a/DiscImageChef.Filesystems/LisaFS/Xattr.cs b/DiscImageChef.Filesystems/LisaFS/Xattr.cs index 79c8850d1..8ebc9c1a1 100644 --- a/DiscImageChef.Filesystems/LisaFS/Xattr.cs +++ b/DiscImageChef.Filesystems/LisaFS/Xattr.cs @@ -46,7 +46,7 @@ namespace DiscImageChef.Filesystems.LisaFS /// Error number. /// Path. /// List of extended attributes, alternate data streams and forks. - public virtual Errno ListXAttr(string path, ref List xattrs) + public Errno ListXAttr(string path, ref List xattrs) { Errno error = LookupFileId(path, out short fileId, out bool isDir); if(error != Errno.NoError) return error; @@ -61,7 +61,7 @@ namespace DiscImageChef.Filesystems.LisaFS /// File path. /// Extendad attribute, alternate data stream or fork name. /// Buffer. - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) + public Errno GetXattr(string path, string xattr, ref byte[] buf) { Errno error = LookupFileId(path, out short fileId, out bool isDir); if(error != Errno.NoError) return error; diff --git a/DiscImageChef.Filesystems/Locus.cs b/DiscImageChef.Filesystems/Locus.cs index b6091f05a..305f6b3b7 100644 --- a/DiscImageChef.Filesystems/Locus.cs +++ b/DiscImageChef.Filesystems/Locus.cs @@ -70,13 +70,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Locus Filesystem Plugin"; - public virtual Guid Id => new Guid("1A70B30A-437D-479A-88E1-D0C9C1797FF4"); + public Encoding Encoding => currentEncoding; + public string Name => "Locus Filesystem Plugin"; + public Guid Id => new Guid("1A70B30A-437D-479A-88E1-D0C9C1797FF4"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -106,7 +106,7 @@ namespace DiscImageChef.Filesystems return false; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/MicroDOS.cs b/DiscImageChef.Filesystems/MicroDOS.cs index e5d541c21..36856100c 100644 --- a/DiscImageChef.Filesystems/MicroDOS.cs +++ b/DiscImageChef.Filesystems/MicroDOS.cs @@ -47,14 +47,14 @@ namespace DiscImageChef.Filesystems const ushort MAGIC = 0xA72E; const ushort MAGIC2 = 0x530C; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; Encoding currentEncoding; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "MicroDOS file system"; - public virtual Guid Id => new Guid("9F9A364A-1A27-48A3-B730-7A7122000324"); + public Encoding Encoding => currentEncoding; + public string Name => "MicroDOS file system"; + public Guid Id => new Guid("9F9A364A-1A27-48A3-B730-7A7122000324"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(1 + partition.Start >= partition.End) return false; @@ -70,7 +70,7 @@ namespace DiscImageChef.Filesystems return block0.label == MAGIC && block0.mklabel == MAGIC2; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("koi8-r"); diff --git a/DiscImageChef.Filesystems/MinixFS.cs b/DiscImageChef.Filesystems/MinixFS.cs index eded5f8e5..255506c7c 100644 --- a/DiscImageChef.Filesystems/MinixFS.cs +++ b/DiscImageChef.Filesystems/MinixFS.cs @@ -65,14 +65,14 @@ namespace DiscImageChef.Filesystems /// Minix v3, 60 char filenames const ushort MINIX3_CIGAM = 0x5A4D; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; Encoding currentEncoding; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Minix Filesystem"; - public virtual Guid Id => new Guid("FE248C3B-B727-4AE5-A39F-79EA9A07D4B3"); + public Encoding Encoding => currentEncoding; + public string Name => "Minix Filesystem"; + public Guid Id => new Guid("FE248C3B-B727-4AE5-A39F-79EA9A07D4B3"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { uint sector = 2; uint offset = 0; @@ -110,7 +110,7 @@ namespace DiscImageChef.Filesystems return false; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); diff --git a/DiscImageChef.Filesystems/NILFS2.cs b/DiscImageChef.Filesystems/NILFS2.cs index 7681f3fff..d21841ca9 100644 --- a/DiscImageChef.Filesystems/NILFS2.cs +++ b/DiscImageChef.Filesystems/NILFS2.cs @@ -47,13 +47,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "NILFS2 Plugin"; - public virtual Guid Id => new Guid("35224226-C5CC-48B5-8FFD-3781E91E86B6"); + public Encoding Encoding => currentEncoding; + public string Name => "NILFS2 Plugin"; + public Guid Id => new Guid("35224226-C5CC-48B5-8FFD-3781E91E86B6"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -78,7 +78,7 @@ namespace DiscImageChef.Filesystems return nilfsSb.magic == NILFS2_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.UTF8; information = ""; diff --git a/DiscImageChef.Filesystems/NTFS.cs b/DiscImageChef.Filesystems/NTFS.cs index c9f0cdd8c..60da18f33 100644 --- a/DiscImageChef.Filesystems/NTFS.cs +++ b/DiscImageChef.Filesystems/NTFS.cs @@ -46,12 +46,12 @@ namespace DiscImageChef.Filesystems { Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "New Technology File System (NTFS)"; - public virtual Guid Id => new Guid("33513B2C-1e6d-4d21-a660-0bbc789c3871"); + public FileSystemType XmlFsType => xmlFsType; + public Encoding Encoding => currentEncoding; + public string Name => "New Technology File System (NTFS)"; + public Guid Id => new Guid("33513B2C-1e6d-4d21-a660-0bbc789c3871"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -79,7 +79,7 @@ namespace DiscImageChef.Filesystems return signature == 0xAA55; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = Encoding.Unicode; information = ""; diff --git a/DiscImageChef.Filesystems/Nintendo.cs b/DiscImageChef.Filesystems/Nintendo.cs index 290f879e6..5db49d6c7 100644 --- a/DiscImageChef.Filesystems/Nintendo.cs +++ b/DiscImageChef.Filesystems/Nintendo.cs @@ -44,13 +44,13 @@ namespace DiscImageChef.Filesystems { Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Nintendo optical filesystems"; - public virtual Guid Id => new Guid("4675fcb4-4418-4288-9e4a-33d6a4ac1126"); + public Encoding Encoding => currentEncoding; + public string Name => "Nintendo optical filesystems"; + public Guid Id => new Guid("4675fcb4-4418-4288-9e4a-33d6a4ac1126"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start != 0) return false; @@ -66,7 +66,7 @@ namespace DiscImageChef.Filesystems return magicGc == 0xC2339F3D || magicWii == 0x5D1C9EA3; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("shift_jis"); StringBuilder sbInformation = new StringBuilder(); diff --git a/DiscImageChef.Filesystems/ODS.cs b/DiscImageChef.Filesystems/ODS.cs index 277aecc0e..173eaecae 100644 --- a/DiscImageChef.Filesystems/ODS.cs +++ b/DiscImageChef.Filesystems/ODS.cs @@ -54,13 +54,13 @@ namespace DiscImageChef.Filesystems { Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Files-11 On-Disk Structure"; - public virtual Guid Id => new Guid("de20633c-8021-4384-aeb0-83b0df14491f"); + public Encoding Encoding => currentEncoding; + public string Name => "Files-11 On-Disk Structure"; + public Guid Id => new Guid("de20633c-8021-4384-aeb0-83b0df14491f"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -91,7 +91,7 @@ namespace DiscImageChef.Filesystems return magic == "DECFILE11A " || magic == "DECFILE11B "; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-1"); information = ""; diff --git a/DiscImageChef.Filesystems/Opera.cs b/DiscImageChef.Filesystems/Opera.cs index cfaf137d2..d1b1162f3 100644 --- a/DiscImageChef.Filesystems/Opera.cs +++ b/DiscImageChef.Filesystems/Opera.cs @@ -44,13 +44,13 @@ namespace DiscImageChef.Filesystems { Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Opera Filesystem Plugin"; - public virtual Guid Id => new Guid("0ec84ec7-eae6-4196-83fe-943b3fe46dbd"); + public Encoding Encoding => currentEncoding; + public string Name => "Opera Filesystem Plugin"; + public Guid Id => new Guid("0ec84ec7-eae6-4196-83fe-943b3fe46dbd"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -67,7 +67,7 @@ namespace DiscImageChef.Filesystems return Encoding.ASCII.GetString(syncBytes) == "ZZZZZ"; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { // TODO: Find correct default encoding currentEncoding = Encoding.ASCII; diff --git a/DiscImageChef.Filesystems/PCEngine.cs b/DiscImageChef.Filesystems/PCEngine.cs index a8cb0637f..9a824d89f 100644 --- a/DiscImageChef.Filesystems/PCEngine.cs +++ b/DiscImageChef.Filesystems/PCEngine.cs @@ -43,12 +43,12 @@ namespace DiscImageChef.Filesystems { Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "PC Engine CD Plugin"; - public virtual Guid Id => new Guid("e5ee6d7c-90fa-49bd-ac89-14ef750b8af3"); + public FileSystemType XmlFsType => xmlFsType; + public Encoding Encoding => currentEncoding; + public string Name => "PC Engine CD Plugin"; + public Guid Id => new Guid("e5ee6d7c-90fa-49bd-ac89-14ef750b8af3"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -60,7 +60,7 @@ namespace DiscImageChef.Filesystems return Encoding.ASCII.GetString(systemDescriptor) == "PC Engine CD-ROM SYSTEM"; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("shift_jis"); diff --git a/DiscImageChef.Filesystems/PFS.cs b/DiscImageChef.Filesystems/PFS.cs index de20f7283..5e0540986 100644 --- a/DiscImageChef.Filesystems/PFS.cs +++ b/DiscImageChef.Filesystems/PFS.cs @@ -65,13 +65,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Professional File System"; - public virtual Guid Id => new Guid("68DE769E-D957-406A-8AE4-3781CA8CDA77"); + public Encoding Encoding => currentEncoding; + public string Name => "Professional File System"; + public Guid Id => new Guid("68DE769E-D957-406A-8AE4-3781CA8CDA77"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Length < 3) return false; @@ -85,7 +85,7 @@ namespace DiscImageChef.Filesystems magic == MUPFS_DISK; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-1"); byte[] rootBlockSector = imagePlugin.ReadSector(2 + partition.Start); diff --git a/DiscImageChef.Filesystems/ProDOS.cs b/DiscImageChef.Filesystems/ProDOS.cs index 537f53d26..c578bc824 100644 --- a/DiscImageChef.Filesystems/ProDOS.cs +++ b/DiscImageChef.Filesystems/ProDOS.cs @@ -86,13 +86,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Apple ProDOS filesystem"; - public virtual Guid Id => new Guid("43874265-7B8A-4739-BCF7-07F80D5932BF"); + public Encoding Encoding => currentEncoding; + public string Name => "Apple ProDOS filesystem"; + public Guid Id => new Guid("43874265-7B8A-4739-BCF7-07F80D5932BF"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Length < 3) return false; @@ -154,7 +154,7 @@ namespace DiscImageChef.Filesystems return totalBlocks <= partition.End - partition.Start + 1; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { // TODO: Until Apple ][ encoding is implemented currentEncoding = new LisaRoman(); diff --git a/DiscImageChef.Filesystems/QNX4.cs b/DiscImageChef.Filesystems/QNX4.cs index e34693ccf..c84ed299b 100644 --- a/DiscImageChef.Filesystems/QNX4.cs +++ b/DiscImageChef.Filesystems/QNX4.cs @@ -48,12 +48,12 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "QNX4 Plugin"; - public virtual Guid Id => new Guid("E73A63FA-B5B0-48BF-BF82-DA5F0A8170D2"); + public FileSystemType XmlFsType => xmlFsType; + public Encoding Encoding => currentEncoding; + public string Name => "QNX4 Plugin"; + public Guid Id => new Guid("E73A63FA-B5B0-48BF-BF82-DA5F0A8170D2"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start + 1 >= imagePlugin.Info.Sectors) return false; @@ -86,7 +86,7 @@ namespace DiscImageChef.Filesystems return true; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); diff --git a/DiscImageChef.Filesystems/QNX6.cs b/DiscImageChef.Filesystems/QNX6.cs index 272f87243..fac44517b 100644 --- a/DiscImageChef.Filesystems/QNX6.cs +++ b/DiscImageChef.Filesystems/QNX6.cs @@ -48,12 +48,12 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "QNX6 Plugin"; - public virtual Guid Id => new Guid("3E610EA2-4D08-4D70-8947-830CD4C74FC0"); + public FileSystemType XmlFsType => xmlFsType; + public Encoding Encoding => currentEncoding; + public string Name => "QNX6 Plugin"; + public Guid Id => new Guid("3E610EA2-4D08-4D70-8947-830CD4C74FC0"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { uint sectors = QNX6_SUPER_BLOCK_SIZE / imagePlugin.Info.SectorSize; uint bootSectors = QNX6_BOOT_BLOCKS_SIZE / imagePlugin.Info.SectorSize; @@ -79,7 +79,7 @@ namespace DiscImageChef.Filesystems return qnxSb.magic == QNX6_MAGIC || audiSb.magic == QNX6_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); diff --git a/DiscImageChef.Filesystems/RBF.cs b/DiscImageChef.Filesystems/RBF.cs index c4180a086..bc7118369 100644 --- a/DiscImageChef.Filesystems/RBF.cs +++ b/DiscImageChef.Filesystems/RBF.cs @@ -49,13 +49,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "OS-9 Random Block File Plugin"; - public virtual Guid Id => new Guid("E864E45B-0B52-4D29-A858-7BDFA9199FB2"); + public Encoding Encoding => currentEncoding; + public string Name => "OS-9 Random Block File Plugin"; + public Guid Id => new Guid("E864E45B-0B52-4D29-A858-7BDFA9199FB2"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 256) return false; @@ -88,7 +88,7 @@ namespace DiscImageChef.Filesystems return false; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/RT11.cs b/DiscImageChef.Filesystems/RT11.cs index afd7bcb9e..0df29e659 100644 --- a/DiscImageChef.Filesystems/RT11.cs +++ b/DiscImageChef.Filesystems/RT11.cs @@ -46,13 +46,13 @@ namespace DiscImageChef.Filesystems { Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "RT-11 file system"; - public virtual Guid Id => new Guid("DB3E2F98-8F98-463C-8126-E937843DA024"); + public Encoding Encoding => currentEncoding; + public string Name => "RT-11 file system"; + public Guid Id => new Guid("DB3E2F98-8F98-463C-8126-E937843DA024"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(1 + partition.Start >= partition.End) return false; @@ -67,7 +67,7 @@ namespace DiscImageChef.Filesystems return magic == "DECRT11A "; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-1"); information = ""; diff --git a/DiscImageChef.Filesystems/Reiser.cs b/DiscImageChef.Filesystems/Reiser.cs index 822bf3671..0a8eb3963 100644 --- a/DiscImageChef.Filesystems/Reiser.cs +++ b/DiscImageChef.Filesystems/Reiser.cs @@ -51,13 +51,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Reiser Filesystem Plugin"; - public virtual Guid Id => new Guid("1D8CD8B8-27E6-410F-9973-D16409225FBA"); + public Encoding Encoding => currentEncoding; + public string Name => "Reiser Filesystem Plugin"; + public Guid Id => new Guid("1D8CD8B8-27E6-410F-9973-D16409225FBA"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -83,7 +83,7 @@ namespace DiscImageChef.Filesystems ReiserJr_Magic.SequenceEqual(reiserSb.magic); } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/Reiser4.cs b/DiscImageChef.Filesystems/Reiser4.cs index 2e3c91b84..85c1b665e 100644 --- a/DiscImageChef.Filesystems/Reiser4.cs +++ b/DiscImageChef.Filesystems/Reiser4.cs @@ -50,13 +50,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Reiser4 Filesystem Plugin"; - public virtual Guid Id => new Guid("301F2D00-E8D5-4F04-934E-81DFB21D15BA"); + public Encoding Encoding => currentEncoding; + public string Name => "Reiser4 Filesystem Plugin"; + public Guid Id => new Guid("301F2D00-E8D5-4F04-934E-81DFB21D15BA"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -81,7 +81,7 @@ namespace DiscImageChef.Filesystems return Reiser4_Magic.SequenceEqual(reiserSb.magic); } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/SFS.cs b/DiscImageChef.Filesystems/SFS.cs index d278408cd..8f2f20d78 100644 --- a/DiscImageChef.Filesystems/SFS.cs +++ b/DiscImageChef.Filesystems/SFS.cs @@ -47,14 +47,14 @@ namespace DiscImageChef.Filesystems /// Identifier for SFS v2 const uint SFS2_MAGIC = 0x53465302; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; Encoding currentEncoding; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "SmartFileSystem"; - public virtual Guid Id => new Guid("26550C19-3671-4A2D-BC2F-F20CEB7F48DC"); + public Encoding Encoding => currentEncoding; + public string Name => "SmartFileSystem"; + public Guid Id => new Guid("26550C19-3671-4A2D-BC2F-F20CEB7F48DC"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start >= partition.End) return false; @@ -67,7 +67,7 @@ namespace DiscImageChef.Filesystems return magic == SFS_MAGIC || magic == SFS2_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-1"); byte[] rootBlockSector = imagePlugin.ReadSector(partition.Start); diff --git a/DiscImageChef.Filesystems/SolarFS.cs b/DiscImageChef.Filesystems/SolarFS.cs index 54a0ed571..a8cbb9571 100644 --- a/DiscImageChef.Filesystems/SolarFS.cs +++ b/DiscImageChef.Filesystems/SolarFS.cs @@ -45,13 +45,13 @@ namespace DiscImageChef.Filesystems { Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Solar_OS filesystem"; - public virtual Guid Id => new Guid("EA3101C1-E777-4B4F-B5A3-8C57F50F6E65"); + public Encoding Encoding => currentEncoding; + public string Name => "Solar_OS filesystem"; + public Guid Id => new Guid("EA3101C1-E777-4B4F-B5A3-8C57F50F6E65"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -68,7 +68,7 @@ namespace DiscImageChef.Filesystems return signature == 0x29 && fsType == "SOL_FS "; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/Squash.cs b/DiscImageChef.Filesystems/Squash.cs index 9d067043c..a199c5dc3 100644 --- a/DiscImageChef.Filesystems/Squash.cs +++ b/DiscImageChef.Filesystems/Squash.cs @@ -50,12 +50,12 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Squash filesystem"; - public virtual Guid Id => new Guid("F8F6E46F-7A2A-48E3-9C0A-46AF4DC29E09"); + public FileSystemType XmlFsType => xmlFsType; + public Encoding Encoding => currentEncoding; + public string Name => "Squash filesystem"; + public Guid Id => new Guid("F8F6E46F-7A2A-48E3-9C0A-46AF4DC29E09"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start >= partition.End) return false; @@ -66,7 +66,7 @@ namespace DiscImageChef.Filesystems return magic == SQUASH_MAGIC || magic == SQUASH_CIGAM; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.UTF8; diff --git a/DiscImageChef.Filesystems/SysV.cs b/DiscImageChef.Filesystems/SysV.cs index ab49a92d2..8c03a1a39 100644 --- a/DiscImageChef.Filesystems/SysV.cs +++ b/DiscImageChef.Filesystems/SysV.cs @@ -65,13 +65,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "UNIX System V filesystem"; - public virtual Guid Id => new Guid("9B8D016A-8561-400E-A12A-A198283C211D"); + public Encoding Encoding => currentEncoding; + public string Name => "UNIX System V filesystem"; + public Guid Id => new Guid("9B8D016A-8561-400E-A12A-A198283C211D"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -152,7 +152,7 @@ namespace DiscImageChef.Filesystems return false; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/UCSDPascal/Dir.cs b/DiscImageChef.Filesystems/UCSDPascal/Dir.cs index f8c2cfd04..73d71b260 100644 --- a/DiscImageChef.Filesystems/UCSDPascal/Dir.cs +++ b/DiscImageChef.Filesystems/UCSDPascal/Dir.cs @@ -39,7 +39,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure public partial class PascalPlugin { - public virtual Errno ReadDir(string path, ref List contents) + public Errno ReadDir(string path, ref List contents) { if(!mounted) return Errno.AccessDenied; diff --git a/DiscImageChef.Filesystems/UCSDPascal/File.cs b/DiscImageChef.Filesystems/UCSDPascal/File.cs index e924506cc..0c24b7fea 100644 --- a/DiscImageChef.Filesystems/UCSDPascal/File.cs +++ b/DiscImageChef.Filesystems/UCSDPascal/File.cs @@ -38,12 +38,12 @@ namespace DiscImageChef.Filesystems.UCSDPascal // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure public partial class PascalPlugin { - public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock) + public Errno MapBlock(string path, long fileBlock, ref long deviceBlock) { return !mounted ? Errno.AccessDenied : Errno.NotImplemented; } - public virtual Errno GetAttributes(string path, ref FileAttributes attributes) + public Errno GetAttributes(string path, ref FileAttributes attributes) { if(!mounted) return Errno.AccessDenied; @@ -60,7 +60,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal return error; } - public virtual Errno Read(string path, long offset, long size, ref byte[] buf) + public Errno Read(string path, long offset, long size, ref byte[] buf) { if(!mounted) return Errno.AccessDenied; @@ -95,7 +95,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal return Errno.NoError; } - public virtual Errno Stat(string path, ref FileEntryInfo stat) + public Errno Stat(string path, ref FileEntryInfo stat) { if(!mounted) return Errno.AccessDenied; diff --git a/DiscImageChef.Filesystems/UCSDPascal/Info.cs b/DiscImageChef.Filesystems/UCSDPascal/Info.cs index cc9b5efae..8cfce5888 100644 --- a/DiscImageChef.Filesystems/UCSDPascal/Info.cs +++ b/DiscImageChef.Filesystems/UCSDPascal/Info.cs @@ -41,7 +41,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure public partial class PascalPlugin { - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Length < 3) return false; @@ -83,7 +83,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal return volEntry.files >= 0; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { StringBuilder sbInformation = new StringBuilder(); information = ""; diff --git a/DiscImageChef.Filesystems/UCSDPascal/Super.cs b/DiscImageChef.Filesystems/UCSDPascal/Super.cs index 873c90067..d8b3557ac 100644 --- a/DiscImageChef.Filesystems/UCSDPascal/Super.cs +++ b/DiscImageChef.Filesystems/UCSDPascal/Super.cs @@ -43,7 +43,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal // Information from Call-A.P.P.L.E. Pascal Disk Directory Structure public partial class PascalPlugin { - public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) + public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug) { device = imagePlugin; // TODO: Until Apple ][ encoding is implemented @@ -114,14 +114,14 @@ namespace DiscImageChef.Filesystems.UCSDPascal return Errno.NoError; } - public virtual Errno Unmount() + public Errno Unmount() { mounted = false; fileEntries = null; return Errno.NoError; } - public virtual Errno StatFs(ref FileSystemInfo stat) + public Errno StatFs(ref FileSystemInfo stat) { stat = new FileSystemInfo { diff --git a/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs b/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs index 304ebbc1a..ad1cc2727 100644 --- a/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs +++ b/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs @@ -51,25 +51,25 @@ namespace DiscImageChef.Filesystems.UCSDPascal List fileEntries; bool mounted; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; PascalVolumeEntry mountedVolEntry; - public virtual string Name => "U.C.S.D. Pascal filesystem"; - public virtual Guid Id => new Guid("B0AC2CB5-72AA-473A-9200-270B5A2C2D53"); - public virtual Encoding Encoding => currentEncoding; + public string Name => "U.C.S.D. Pascal filesystem"; + public Guid Id => new Guid("B0AC2CB5-72AA-473A-9200-270B5A2C2D53"); + public Encoding Encoding => currentEncoding; - public virtual Errno ListXAttr(string path, ref List xattrs) + public Errno ListXAttr(string path, ref List xattrs) { return Errno.NotSupported; } - public virtual Errno GetXattr(string path, string xattr, ref byte[] buf) + public Errno GetXattr(string path, string xattr, ref byte[] buf) { return Errno.NotSupported; } - public virtual Errno ReadLink(string path, ref string dest) + public Errno ReadLink(string path, ref string dest) { return Errno.NotSupported; } diff --git a/DiscImageChef.Filesystems/UDF.cs b/DiscImageChef.Filesystems/UDF.cs index 9993d1338..7850371ca 100644 --- a/DiscImageChef.Filesystems/UDF.cs +++ b/DiscImageChef.Filesystems/UDF.cs @@ -53,13 +53,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Universal Disk Format"; - public virtual Guid Id => new Guid("83976FEC-A91B-464B-9293-56C719461BAB"); + public Encoding Encoding => currentEncoding; + public string Name => "Universal Disk Format"; + public Guid Id => new Guid("83976FEC-A91B-464B-9293-56C719461BAB"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { // UDF needs at least that if(partition.End - partition.Start < 256) return false; @@ -146,7 +146,7 @@ namespace DiscImageChef.Filesystems return false; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { // UDF is always UTF-8 currentEncoding = Encoding.UTF8; diff --git a/DiscImageChef.Filesystems/UNICOS.cs b/DiscImageChef.Filesystems/UNICOS.cs index 9261e2dae..2e8875ba1 100644 --- a/DiscImageChef.Filesystems/UNICOS.cs +++ b/DiscImageChef.Filesystems/UNICOS.cs @@ -59,13 +59,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "UNICOS Filesystem Plugin"; - public virtual Guid Id => new Guid("61712F04-066C-44D5-A2A0-1E44C66B33F0"); + public Encoding Encoding => currentEncoding; + public string Name => "UNICOS Filesystem Plugin"; + public Guid Id => new Guid("61712F04-066C-44D5-A2A0-1E44C66B33F0"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -85,7 +85,7 @@ namespace DiscImageChef.Filesystems return unicosSb.s_magic == UNICOS_Magic; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/UNIXBFS.cs b/DiscImageChef.Filesystems/UNIXBFS.cs index bc91193ba..21aa6448b 100644 --- a/DiscImageChef.Filesystems/UNIXBFS.cs +++ b/DiscImageChef.Filesystems/UNIXBFS.cs @@ -47,13 +47,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "UNIX Boot filesystem"; - public virtual Guid Id => new Guid("1E6E0DA6-F7E4-494C-80C6-CB5929E96155"); + public Encoding Encoding => currentEncoding; + public string Name => "UNIX Boot filesystem"; + public Guid Id => new Guid("1E6E0DA6-F7E4-494C-80C6-CB5929E96155"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(2 + partition.Start >= partition.End) return false; @@ -64,7 +64,7 @@ namespace DiscImageChef.Filesystems return magic == BFS_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/VMfs.cs b/DiscImageChef.Filesystems/VMfs.cs index f892ff418..2cb6941b1 100644 --- a/DiscImageChef.Filesystems/VMfs.cs +++ b/DiscImageChef.Filesystems/VMfs.cs @@ -50,13 +50,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "VMware filesystem"; - public virtual Guid Id => new Guid("EE52BDB8-B49C-4122-A3DA-AD21CBE79843"); + public Encoding Encoding => currentEncoding; + public string Name => "VMware filesystem"; + public Guid Id => new Guid("EE52BDB8-B49C-4122-A3DA-AD21CBE79843"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(partition.Start >= partition.End) return false; @@ -71,7 +71,7 @@ namespace DiscImageChef.Filesystems return magic == VMFS_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.UTF8; ulong vmfsSuperOff = VMFS_BASE / imagePlugin.Info.SectorSize; diff --git a/DiscImageChef.Filesystems/VxFS.cs b/DiscImageChef.Filesystems/VxFS.cs index e15e93fb6..8aca3ad50 100644 --- a/DiscImageChef.Filesystems/VxFS.cs +++ b/DiscImageChef.Filesystems/VxFS.cs @@ -50,13 +50,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Veritas filesystem"; - public virtual Guid Id => new Guid("EC372605-7687-453C-8BEA-7E0DFF79CB03"); + public Encoding Encoding => currentEncoding; + public string Name => "Veritas filesystem"; + public Guid Id => new Guid("EC372605-7687-453C-8BEA-7E0DFF79CB03"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { ulong vmfsSuperOff = VXFS_BASE / imagePlugin.Info.SectorSize; @@ -69,7 +69,7 @@ namespace DiscImageChef.Filesystems return magic == VXFS_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.UTF8; ulong vmfsSuperOff = VXFS_BASE / imagePlugin.Info.SectorSize; diff --git a/DiscImageChef.Filesystems/XFS.cs b/DiscImageChef.Filesystems/XFS.cs index f54a8bc59..3ee1e32d0 100644 --- a/DiscImageChef.Filesystems/XFS.cs +++ b/DiscImageChef.Filesystems/XFS.cs @@ -47,13 +47,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "XFS Filesystem Plugin"; - public virtual Guid Id => new Guid("1D8CD8B8-27E6-410F-9973-D16409225FBA"); + public Encoding Encoding => currentEncoding; + public string Name => "XFS Filesystem Plugin"; + public Guid Id => new Guid("1D8CD8B8-27E6-410F-9973-D16409225FBA"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -104,7 +104,7 @@ namespace DiscImageChef.Filesystems return false; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/Xia.cs b/DiscImageChef.Filesystems/Xia.cs index 9978df0e0..d33b22a7d 100644 --- a/DiscImageChef.Filesystems/Xia.cs +++ b/DiscImageChef.Filesystems/Xia.cs @@ -53,12 +53,12 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Xia filesystem"; - public virtual Guid Id => new Guid("169E1DE5-24F2-4EF6-A04D-A4B2CA66DE9D"); + public FileSystemType XmlFsType => xmlFsType; + public Encoding Encoding => currentEncoding; + public string Name => "Xia filesystem"; + public Guid Id => new Guid("169E1DE5-24F2-4EF6-A04D-A4B2CA66DE9D"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { int sbSizeInBytes = Marshal.SizeOf(typeof(XiaSuperBlock)); uint sbSizeInSectors = (uint)(sbSizeInBytes / imagePlugin.Info.SectorSize); @@ -74,7 +74,7 @@ namespace DiscImageChef.Filesystems return supblk.s_magic == XIAFS_SUPER_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/ZFS.cs b/DiscImageChef.Filesystems/ZFS.cs index feb948e52..de15f14b5 100644 --- a/DiscImageChef.Filesystems/ZFS.cs +++ b/DiscImageChef.Filesystems/ZFS.cs @@ -78,12 +78,12 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "ZFS Filesystem Plugin"; - public virtual Guid Id => new Guid("0750014F-A714-4692-A369-E23F6EC3659C"); + public FileSystemType XmlFsType => xmlFsType; + public Encoding Encoding => currentEncoding; + public string Name => "ZFS Filesystem Plugin"; + public Guid Id => new Guid("0750014F-A714-4692-A369-E23F6EC3659C"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -104,7 +104,7 @@ namespace DiscImageChef.Filesystems return magic == ZEC_MAGIC || magic == ZEC_CIGAM; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { // ZFS is always UTF-8 diff --git a/DiscImageChef.Filesystems/dump.cs b/DiscImageChef.Filesystems/dump.cs index abc92da84..d7ddb624d 100644 --- a/DiscImageChef.Filesystems/dump.cs +++ b/DiscImageChef.Filesystems/dump.cs @@ -100,13 +100,13 @@ namespace DiscImageChef.Filesystems const int NIADDR = 3; Encoding currentEncoding; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "dump(8) Plugin"; - public virtual Guid Id => new Guid("E53B4D28-C858-4800-B092-DDAE80D361B9"); + public Encoding Encoding => currentEncoding; + public string Name => "dump(8) Plugin"; + public Guid Id => new Guid("E53B4D28-C858-4800-B092-DDAE80D361B9"); FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -147,7 +147,7 @@ namespace DiscImageChef.Filesystems newHdr.c_magic == NFS_CIGAM || newHdr.c_magic == UFS2_MAGIC || newHdr.c_magic == UFS2_CIGAM; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); diff --git a/DiscImageChef.Filesystems/exFAT.cs b/DiscImageChef.Filesystems/exFAT.cs index 48367f83d..a1e941c67 100644 --- a/DiscImageChef.Filesystems/exFAT.cs +++ b/DiscImageChef.Filesystems/exFAT.cs @@ -48,14 +48,14 @@ namespace DiscImageChef.Filesystems readonly byte[] Signature = {0x45, 0x58, 0x46, 0x41, 0x54, 0x20, 0x20, 0x20}; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; Encoding currentEncoding; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Microsoft Extended File Allocation Table"; - public virtual Guid Id => new Guid("8271D088-1533-4CB3-AC28-D802B68BB95C"); + public Encoding Encoding => currentEncoding; + public string Name => "Microsoft Extended File Allocation Table"; + public Guid Id => new Guid("8271D088-1533-4CB3-AC28-D802B68BB95C"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(12 + partition.Start >= partition.End) return false; @@ -70,7 +70,7 @@ namespace DiscImageChef.Filesystems return Signature.SequenceEqual(vbr.signature); } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); diff --git a/DiscImageChef.Filesystems/ext2FS.cs b/DiscImageChef.Filesystems/ext2FS.cs index 70509b7b3..b42c0a4d0 100644 --- a/DiscImageChef.Filesystems/ext2FS.cs +++ b/DiscImageChef.Filesystems/ext2FS.cs @@ -164,13 +164,13 @@ namespace DiscImageChef.Filesystems Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual Encoding Encoding => currentEncoding; - public virtual string Name => "Linux extended Filesystem 2, 3 and 4"; - public virtual Guid Id => new Guid("6AA91B88-150B-4A7B-AD56-F84FB2DF4184"); + public Encoding Encoding => currentEncoding; + public string Name => "Linux extended Filesystem 2, 3 and 4"; + public Guid Id => new Guid("6AA91B88-150B-4A7B-AD56-F84FB2DF4184"); - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { ulong sbSectorOff = SB_POS / imagePlugin.Info.SectorSize; uint sbOff = SB_POS % imagePlugin.Info.SectorSize; @@ -190,7 +190,7 @@ namespace DiscImageChef.Filesystems return magic == EXT2_MAGIC || magic == EXT2_MAGIC_OLD; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; diff --git a/DiscImageChef.Filesystems/extFS.cs b/DiscImageChef.Filesystems/extFS.cs index 8a667ef2e..80c75c2f5 100644 --- a/DiscImageChef.Filesystems/extFS.cs +++ b/DiscImageChef.Filesystems/extFS.cs @@ -51,13 +51,13 @@ namespace DiscImageChef.Filesystems const ushort EXT_MAGIC = 0x137D; Encoding currentEncoding; FileSystemType xmlFsType; - public virtual FileSystemType XmlFsType => xmlFsType; + public FileSystemType XmlFsType => xmlFsType; - public virtual string Name => "Linux extended Filesystem"; - public virtual Guid Id => new Guid("076CB3A2-08C2-4D69-BC8A-FCAA2E502BE2"); - public virtual Encoding Encoding => currentEncoding; + public string Name => "Linux extended Filesystem"; + public Guid Id => new Guid("076CB3A2-08C2-4D69-BC8A-FCAA2E502BE2"); + public Encoding Encoding => currentEncoding; - public virtual bool Identify(IMediaImage imagePlugin, Partition partition) + public bool Identify(IMediaImage imagePlugin, Partition partition) { if(imagePlugin.Info.SectorSize < 512) return false; @@ -75,7 +75,7 @@ namespace DiscImageChef.Filesystems return magic == EXT_MAGIC; } - public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, + public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { currentEncoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); diff --git a/DiscImageChef.Filters/AppleDouble.cs b/DiscImageChef.Filters/AppleDouble.cs index e0b54b095..a4531c1be 100644 --- a/DiscImageChef.Filters/AppleDouble.cs +++ b/DiscImageChef.Filters/AppleDouble.cs @@ -68,65 +68,65 @@ namespace DiscImageChef.Filters bool opened; AppleDoubleEntry rsrcFork; - public virtual string Name => "AppleDouble"; - public virtual Guid Id => new Guid("1B2165EE-C9DF-4B21-BBBB-9E5892B2DF4D"); + public string Name => "AppleDouble"; + public Guid Id => new Guid("1B2165EE-C9DF-4B21-BBBB-9E5892B2DF4D"); - public virtual void Close() + public void Close() { opened = false; } - public virtual string GetBasePath() + public string GetBasePath() { return basePath; } - public virtual DateTime GetCreationTime() + public DateTime GetCreationTime() { return creationTime; } - public virtual long GetDataForkLength() + public long GetDataForkLength() { return dataFork.length; } - public virtual Stream GetDataForkStream() + public Stream GetDataForkStream() { return new FileStream(basePath, FileMode.Open, FileAccess.Read); } - public virtual string GetFilename() + public string GetFilename() { return Path.GetFileName(basePath); } - public virtual DateTime GetLastWriteTime() + public DateTime GetLastWriteTime() { return lastWriteTime; } - public virtual long GetLength() + public long GetLength() { return dataFork.length + rsrcFork.length; } - public virtual string GetParentFolder() + public string GetParentFolder() { return Path.GetDirectoryName(basePath); } - public virtual string GetPath() + public string GetPath() { return basePath; } - public virtual long GetResourceForkLength() + public long GetResourceForkLength() { return rsrcFork.length; } - public virtual Stream GetResourceForkStream() + public Stream GetResourceForkStream() { if(rsrcFork.length == 0) return null; @@ -134,24 +134,24 @@ namespace DiscImageChef.Filters rsrcFork.offset + rsrcFork.length - 1); } - public virtual bool HasResourceFork() + public bool HasResourceFork() { return rsrcFork.length > 0; } - public virtual bool Identify(byte[] buffer) + public bool Identify(byte[] buffer) { // Now way to have two files in a single byte array return false; } - public virtual bool Identify(Stream stream) + public bool Identify(Stream stream) { // Now way to have two files in a single stream return false; } - public virtual bool Identify(string path) + public bool Identify(string path) { // Prepend data fork name with "R." string ProDosAppleDouble; @@ -303,24 +303,24 @@ namespace DiscImageChef.Filters (header.version == AppleDoubleVersion || header.version == AppleDoubleVersion2); } - public virtual bool IsOpened() + public bool IsOpened() { return opened; } - public virtual void Open(byte[] buffer) + public void Open(byte[] buffer) { // Now way to have two files in a single byte array throw new NotSupportedException(); } - public virtual void Open(Stream stream) + public void Open(Stream stream) { // Now way to have two files in a single stream throw new NotSupportedException(); } - public virtual void Open(string path) + public void Open(string path) { // Prepend data fork name with "R." string ProDosAppleDouble; diff --git a/DiscImageChef.Filters/AppleSingle.cs b/DiscImageChef.Filters/AppleSingle.cs index 148d60b55..53cb25adb 100644 --- a/DiscImageChef.Filters/AppleSingle.cs +++ b/DiscImageChef.Filters/AppleSingle.cs @@ -69,10 +69,10 @@ namespace DiscImageChef.Filters AppleSingleEntry rsrcFork; Stream stream; - public virtual string Name => "AppleSingle"; - public virtual Guid Id => new Guid("A69B20E8-F4D3-42BB-BD2B-4A7263394A05"); + public string Name => "AppleSingle"; + public Guid Id => new Guid("A69B20E8-F4D3-42BB-BD2B-4A7263394A05"); - public virtual void Close() + public void Close() { bytes = null; stream?.Close(); @@ -82,22 +82,22 @@ namespace DiscImageChef.Filters opened = false; } - public virtual string GetBasePath() + public string GetBasePath() { return basePath; } - public virtual DateTime GetCreationTime() + public DateTime GetCreationTime() { return creationTime; } - public virtual long GetDataForkLength() + public long GetDataForkLength() { return dataFork.length; } - public virtual Stream GetDataForkStream() + public Stream GetDataForkStream() { if(dataFork.length == 0) return null; @@ -110,37 +110,37 @@ namespace DiscImageChef.Filters return null; } - public virtual string GetFilename() + public string GetFilename() { return Path.GetFileName(basePath); } - public virtual DateTime GetLastWriteTime() + public DateTime GetLastWriteTime() { return lastWriteTime; } - public virtual long GetLength() + public long GetLength() { return dataFork.length + rsrcFork.length; } - public virtual string GetParentFolder() + public string GetParentFolder() { return Path.GetDirectoryName(basePath); } - public virtual string GetPath() + public string GetPath() { return basePath; } - public virtual long GetResourceForkLength() + public long GetResourceForkLength() { return rsrcFork.length; } - public virtual Stream GetResourceForkStream() + public Stream GetResourceForkStream() { if(rsrcFork.length == 0) return null; @@ -153,12 +153,12 @@ namespace DiscImageChef.Filters return null; } - public virtual bool HasResourceFork() + public bool HasResourceFork() { return rsrcFork.length > 0; } - public virtual bool Identify(byte[] buffer) + public bool Identify(byte[] buffer) { if(buffer == null || buffer.Length < 26) return false; @@ -170,7 +170,7 @@ namespace DiscImageChef.Filters (header.version == AppleSingleVersion || header.version == AppleSingleVersion2); } - public virtual bool Identify(Stream stream) + public bool Identify(Stream stream) { if(stream == null || stream.Length < 26) return false; @@ -183,7 +183,7 @@ namespace DiscImageChef.Filters (header.version == AppleSingleVersion || header.version == AppleSingleVersion2); } - public virtual bool Identify(string path) + public bool Identify(string path) { FileStream fstream = new FileStream(path, FileMode.Open, FileAccess.Read); if(fstream.Length < 26) return false; @@ -197,12 +197,12 @@ namespace DiscImageChef.Filters (header.version == AppleSingleVersion || header.version == AppleSingleVersion2); } - public virtual bool IsOpened() + public bool IsOpened() { return opened; } - public virtual void Open(byte[] buffer) + public void Open(byte[] buffer) { MemoryStream ms = new MemoryStream(buffer); ms.Seek(0, SeekOrigin.Begin); @@ -280,7 +280,7 @@ namespace DiscImageChef.Filters bytes = buffer; } - public virtual void Open(Stream stream) + public void Open(Stream stream) { stream.Seek(0, SeekOrigin.Begin); @@ -357,7 +357,7 @@ namespace DiscImageChef.Filters this.stream = stream; } - public virtual void Open(string path) + public void Open(string path) { FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); fs.Seek(0, SeekOrigin.Begin); diff --git a/DiscImageChef.Filters/BZip2.cs b/DiscImageChef.Filters/BZip2.cs index b1253696a..d9dea72ba 100644 --- a/DiscImageChef.Filters/BZip2.cs +++ b/DiscImageChef.Filters/BZip2.cs @@ -50,10 +50,10 @@ namespace DiscImageChef.Filters DateTime lastWriteTime; bool opened; - public virtual string Name => "BZip2"; - public virtual Guid Id => new Guid("FCCFB0C3-32EF-40D8-9714-2333F6AC72A9"); + public string Name => "BZip2"; + public Guid Id => new Guid("FCCFB0C3-32EF-40D8-9714-2333F6AC72A9"); - public virtual void Close() + public void Close() { dataStream?.Close(); dataStream = null; @@ -61,32 +61,32 @@ namespace DiscImageChef.Filters opened = false; } - public virtual string GetBasePath() + public string GetBasePath() { return basePath; } - public virtual Stream GetDataForkStream() + public Stream GetDataForkStream() { return innerStream; } - public virtual string GetPath() + public string GetPath() { return basePath; } - public virtual Stream GetResourceForkStream() + public Stream GetResourceForkStream() { return null; } - public virtual bool HasResourceFork() + public bool HasResourceFork() { return false; } - public virtual bool Identify(byte[] buffer) + public bool Identify(byte[] buffer) { if(buffer[0] != 0x42 || buffer[1] != 0x5A || buffer[2] != 0x68 || buffer[3] < 0x31 || buffer[3] > 0x39) return false; @@ -97,7 +97,7 @@ namespace DiscImageChef.Filters buffer[buffer.Length - 510] != 0x6C || buffer[buffer.Length - 509] != 0x79; } - public virtual bool Identify(Stream stream) + public bool Identify(Stream stream) { byte[] buffer = new byte[4]; @@ -117,7 +117,7 @@ namespace DiscImageChef.Filters return buffer[0] != 0x6B || buffer[1] != 0x6F || buffer[2] != 0x6C || buffer[3] != 0x79; } - public virtual bool Identify(string path) + public bool Identify(string path) { if(!File.Exists(path)) return false; @@ -142,7 +142,7 @@ namespace DiscImageChef.Filters return true; } - public virtual void Open(byte[] buffer) + public void Open(byte[] buffer) { dataStream = new MemoryStream(buffer); basePath = null; @@ -153,7 +153,7 @@ namespace DiscImageChef.Filters opened = true; } - public virtual void Open(Stream stream) + public void Open(Stream stream) { dataStream = stream; basePath = null; @@ -164,7 +164,7 @@ namespace DiscImageChef.Filters opened = true; } - public virtual void Open(string path) + public void Open(string path) { dataStream = new FileStream(path, FileMode.Open, FileAccess.Read); basePath = Path.GetFullPath(path); @@ -180,32 +180,32 @@ namespace DiscImageChef.Filters opened = true; } - public virtual DateTime GetCreationTime() + public DateTime GetCreationTime() { return creationTime; } - public virtual long GetDataForkLength() + public long GetDataForkLength() { return decompressedSize; } - public virtual DateTime GetLastWriteTime() + public DateTime GetLastWriteTime() { return lastWriteTime; } - public virtual long GetLength() + public long GetLength() { return decompressedSize; } - public virtual long GetResourceForkLength() + public long GetResourceForkLength() { return 0; } - public virtual string GetFilename() + public string GetFilename() { if(basePath?.EndsWith(".bz2", StringComparison.InvariantCultureIgnoreCase) == true) return basePath.Substring(0, basePath.Length - 4); @@ -215,12 +215,12 @@ namespace DiscImageChef.Filters return basePath; } - public virtual string GetParentFolder() + public string GetParentFolder() { return Path.GetDirectoryName(basePath); } - public virtual bool IsOpened() + public bool IsOpened() { return opened; } diff --git a/DiscImageChef.Filters/GZip.cs b/DiscImageChef.Filters/GZip.cs index 13e368612..2e37d5472 100644 --- a/DiscImageChef.Filters/GZip.cs +++ b/DiscImageChef.Filters/GZip.cs @@ -49,10 +49,10 @@ namespace DiscImageChef.Filters bool opened; Stream zStream; - public virtual string Name => "GZip"; - public virtual Guid Id => new Guid("F4996661-4A29-42C9-A2C7-3904EF40F3B0"); + public string Name => "GZip"; + public Guid Id => new Guid("F4996661-4A29-42C9-A2C7-3904EF40F3B0"); - public virtual void Close() + public void Close() { dataStream?.Close(); dataStream = null; @@ -60,37 +60,37 @@ namespace DiscImageChef.Filters opened = false; } - public virtual string GetBasePath() + public string GetBasePath() { return basePath; } - public virtual Stream GetDataForkStream() + public Stream GetDataForkStream() { return zStream; } - public virtual string GetPath() + public string GetPath() { return basePath; } - public virtual Stream GetResourceForkStream() + public Stream GetResourceForkStream() { return null; } - public virtual bool HasResourceFork() + public bool HasResourceFork() { return false; } - public virtual bool Identify(byte[] buffer) + public bool Identify(byte[] buffer) { return buffer[0] == 0x1F && buffer[1] == 0x8B && buffer[2] == 0x08; } - public virtual bool Identify(Stream stream) + public bool Identify(Stream stream) { byte[] buffer = new byte[3]; @@ -101,7 +101,7 @@ namespace DiscImageChef.Filters return buffer[0] == 0x1F && buffer[1] == 0x8B && buffer[2] == 0x08; } - public virtual bool Identify(string path) + public bool Identify(string path) { if(!File.Exists(path)) return false; @@ -115,7 +115,7 @@ namespace DiscImageChef.Filters return buffer[0] == 0x1F && buffer[1] == 0x8B && buffer[2] == 0x08; } - public virtual void Open(byte[] buffer) + public void Open(byte[] buffer) { byte[] mtime_b = new byte[4]; byte[] isize_b = new byte[4]; @@ -141,7 +141,7 @@ namespace DiscImageChef.Filters opened = true; } - public virtual void Open(Stream stream) + public void Open(Stream stream) { byte[] mtime_b = new byte[4]; byte[] isize_b = new byte[4]; @@ -167,7 +167,7 @@ namespace DiscImageChef.Filters opened = true; } - public virtual void Open(string path) + public void Open(string path) { byte[] mtime_b = new byte[4]; byte[] isize_b = new byte[4]; @@ -194,32 +194,32 @@ namespace DiscImageChef.Filters opened = true; } - public virtual DateTime GetCreationTime() + public DateTime GetCreationTime() { return creationTime; } - public virtual long GetDataForkLength() + public long GetDataForkLength() { return decompressedSize; } - public virtual DateTime GetLastWriteTime() + public DateTime GetLastWriteTime() { return lastWriteTime; } - public virtual long GetLength() + public long GetLength() { return decompressedSize; } - public virtual long GetResourceForkLength() + public long GetResourceForkLength() { return 0; } - public virtual string GetFilename() + public string GetFilename() { if(basePath?.EndsWith(".gz", StringComparison.InvariantCultureIgnoreCase) == true) return basePath.Substring(0, basePath.Length - 3); @@ -229,12 +229,12 @@ namespace DiscImageChef.Filters return basePath; } - public virtual string GetParentFolder() + public string GetParentFolder() { return Path.GetDirectoryName(basePath); } - public virtual bool IsOpened() + public bool IsOpened() { return opened; } diff --git a/DiscImageChef.Filters/LZip.cs b/DiscImageChef.Filters/LZip.cs index 7958dd197..5d6479acf 100644 --- a/DiscImageChef.Filters/LZip.cs +++ b/DiscImageChef.Filters/LZip.cs @@ -50,10 +50,10 @@ namespace DiscImageChef.Filters DateTime lastWriteTime; bool opened; - public virtual string Name => "LZip"; - public virtual Guid Id => new Guid("09D715E9-20C0-48B1-A8D9-D8897CEC57C9"); + public string Name => "LZip"; + public Guid Id => new Guid("09D715E9-20C0-48B1-A8D9-D8897CEC57C9"); - public virtual void Close() + public void Close() { dataStream?.Close(); dataStream = null; @@ -61,38 +61,38 @@ namespace DiscImageChef.Filters opened = false; } - public virtual string GetBasePath() + public string GetBasePath() { return basePath; } - public virtual Stream GetDataForkStream() + public Stream GetDataForkStream() { return innerStream; } - public virtual string GetPath() + public string GetPath() { return basePath; } - public virtual Stream GetResourceForkStream() + public Stream GetResourceForkStream() { return null; } - public virtual bool HasResourceFork() + public bool HasResourceFork() { return false; } - public virtual bool Identify(byte[] buffer) + public bool Identify(byte[] buffer) { return buffer[0] == 0x4C && buffer[1] == 0x5A && buffer[2] == 0x49 && buffer[3] == 0x50 && buffer[4] == 0x01; } - public virtual bool Identify(Stream stream) + public bool Identify(Stream stream) { byte[] buffer = new byte[5]; @@ -104,7 +104,7 @@ namespace DiscImageChef.Filters buffer[4] == 0x01; } - public virtual bool Identify(string path) + public bool Identify(string path) { if(!File.Exists(path)) return false; @@ -119,7 +119,7 @@ namespace DiscImageChef.Filters buffer[4] == 0x01; } - public virtual void Open(byte[] buffer) + public void Open(byte[] buffer) { dataStream = new MemoryStream(buffer); basePath = null; @@ -131,7 +131,7 @@ namespace DiscImageChef.Filters opened = true; } - public virtual void Open(Stream stream) + public void Open(Stream stream) { dataStream = stream; basePath = null; @@ -147,7 +147,7 @@ namespace DiscImageChef.Filters opened = true; } - public virtual void Open(string path) + public void Open(string path) { dataStream = new FileStream(path, FileMode.Open, FileAccess.Read); basePath = Path.GetFullPath(path); @@ -168,32 +168,32 @@ namespace DiscImageChef.Filters opened = true; } - public virtual DateTime GetCreationTime() + public DateTime GetCreationTime() { return creationTime; } - public virtual long GetDataForkLength() + public long GetDataForkLength() { return decompressedSize; } - public virtual DateTime GetLastWriteTime() + public DateTime GetLastWriteTime() { return lastWriteTime; } - public virtual long GetLength() + public long GetLength() { return decompressedSize; } - public virtual long GetResourceForkLength() + public long GetResourceForkLength() { return 0; } - public virtual string GetFilename() + public string GetFilename() { if(basePath?.EndsWith(".lz", StringComparison.InvariantCultureIgnoreCase) == true) return basePath.Substring(0, basePath.Length - 3); @@ -203,12 +203,12 @@ namespace DiscImageChef.Filters return basePath; } - public virtual string GetParentFolder() + public string GetParentFolder() { return Path.GetDirectoryName(basePath); } - public virtual bool IsOpened() + public bool IsOpened() { return opened; } diff --git a/DiscImageChef.Filters/MacBinary.cs b/DiscImageChef.Filters/MacBinary.cs index cc69f257c..c2387651d 100644 --- a/DiscImageChef.Filters/MacBinary.cs +++ b/DiscImageChef.Filters/MacBinary.cs @@ -56,10 +56,10 @@ namespace DiscImageChef.Filters long rsrcForkOff; Stream stream; - public virtual string Name => "MacBinary"; - public virtual Guid Id => new Guid("D7C321D3-E51F-45DF-A150-F6BFDF0D7704"); + public string Name => "MacBinary"; + public Guid Id => new Guid("D7C321D3-E51F-45DF-A150-F6BFDF0D7704"); - public virtual void Close() + public void Close() { bytes = null; stream?.Close(); @@ -69,22 +69,22 @@ namespace DiscImageChef.Filters opened = false; } - public virtual string GetBasePath() + public string GetBasePath() { return basePath; } - public virtual DateTime GetCreationTime() + public DateTime GetCreationTime() { return creationTime; } - public virtual long GetDataForkLength() + public long GetDataForkLength() { return header.dataLength; } - public virtual Stream GetDataForkStream() + public Stream GetDataForkStream() { if(header.dataLength == 0) return null; @@ -97,37 +97,37 @@ namespace DiscImageChef.Filters return null; } - public virtual string GetFilename() + public string GetFilename() { return filename; } - public virtual DateTime GetLastWriteTime() + public DateTime GetLastWriteTime() { return lastWriteTime; } - public virtual long GetLength() + public long GetLength() { return header.dataLength + header.resourceLength; } - public virtual string GetParentFolder() + public string GetParentFolder() { return Path.GetDirectoryName(basePath); } - public virtual string GetPath() + public string GetPath() { return basePath; } - public virtual long GetResourceForkLength() + public long GetResourceForkLength() { return header.resourceLength; } - public virtual Stream GetResourceForkStream() + public Stream GetResourceForkStream() { if(header.resourceLength == 0) return null; @@ -140,12 +140,12 @@ namespace DiscImageChef.Filters return null; } - public virtual bool HasResourceFork() + public bool HasResourceFork() { return header.resourceLength > 0; } - public virtual bool Identify(byte[] buffer) + public bool Identify(byte[] buffer) { if(buffer == null || buffer.Length < 128) return false; @@ -158,7 +158,7 @@ namespace DiscImageChef.Filters (header.dataLength > 0 || header.resourceLength > 0); } - public virtual bool Identify(Stream stream) + public bool Identify(Stream stream) { if(stream == null || stream.Length < 128) return false; @@ -172,7 +172,7 @@ namespace DiscImageChef.Filters (header.dataLength > 0 || header.resourceLength > 0); } - public virtual bool Identify(string path) + public bool Identify(string path) { FileStream fstream = new FileStream(path, FileMode.Open, FileAccess.Read); if(fstream.Length < 128) return false; @@ -187,12 +187,12 @@ namespace DiscImageChef.Filters (header.dataLength > 0 || header.resourceLength > 0); } - public virtual bool IsOpened() + public bool IsOpened() { return opened; } - public virtual void Open(byte[] buffer) + public void Open(byte[] buffer) { MemoryStream ms = new MemoryStream(buffer); ms.Seek(0, SeekOrigin.Begin); @@ -219,7 +219,7 @@ namespace DiscImageChef.Filters bytes = buffer; } - public virtual void Open(Stream stream) + public void Open(Stream stream) { stream.Seek(0, SeekOrigin.Begin); @@ -245,7 +245,7 @@ namespace DiscImageChef.Filters this.stream = stream; } - public virtual void Open(string path) + public void Open(string path) { FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); fs.Seek(0, SeekOrigin.Begin); diff --git a/DiscImageChef.Filters/PCExchange.cs b/DiscImageChef.Filters/PCExchange.cs index 86587ee16..6804b8a24 100644 --- a/DiscImageChef.Filters/PCExchange.cs +++ b/DiscImageChef.Filters/PCExchange.cs @@ -57,86 +57,86 @@ namespace DiscImageChef.Filters long rsrcLen; string rsrcPath; - public virtual string Name => "PCExchange"; - public virtual Guid Id => new Guid("9264EB9F-D634-4F9B-BE12-C24CD44988C6"); + public string Name => "PCExchange"; + public Guid Id => new Guid("9264EB9F-D634-4F9B-BE12-C24CD44988C6"); - public virtual void Close() + public void Close() { opened = false; } - public virtual string GetBasePath() + public string GetBasePath() { return basePath; } - public virtual DateTime GetCreationTime() + public DateTime GetCreationTime() { return creationTime; } - public virtual long GetDataForkLength() + public long GetDataForkLength() { return dataLen; } - public virtual Stream GetDataForkStream() + public Stream GetDataForkStream() { return new FileStream(dataPath, FileMode.Open, FileAccess.Read); } - public virtual string GetFilename() + public string GetFilename() { return Path.GetFileName(basePath); } - public virtual DateTime GetLastWriteTime() + public DateTime GetLastWriteTime() { return lastWriteTime; } - public virtual long GetLength() + public long GetLength() { return dataLen + rsrcLen; } - public virtual string GetParentFolder() + public string GetParentFolder() { return Path.GetDirectoryName(basePath); } - public virtual string GetPath() + public string GetPath() { return basePath; } - public virtual long GetResourceForkLength() + public long GetResourceForkLength() { return rsrcLen; } - public virtual Stream GetResourceForkStream() + public Stream GetResourceForkStream() { return new FileStream(rsrcPath, FileMode.Open, FileAccess.Read); } - public virtual bool HasResourceFork() + public bool HasResourceFork() { return rsrcPath != null; } - public virtual bool Identify(byte[] buffer) + public bool Identify(byte[] buffer) { return false; } - public virtual bool Identify(Stream stream) + public bool Identify(Stream stream) { System.Console.WriteLine("parentFolder"); return false; } - public virtual bool Identify(string path) + public bool Identify(string path) { string parentFolder = Path.GetDirectoryName(path); @@ -187,22 +187,22 @@ namespace DiscImageChef.Filters return dataFound && rsrcFound; } - public virtual bool IsOpened() + public bool IsOpened() { return opened; } - public virtual void Open(byte[] buffer) + public void Open(byte[] buffer) { throw new NotSupportedException(); } - public virtual void Open(Stream stream) + public void Open(Stream stream) { throw new NotSupportedException(); } - public virtual void Open(string path) + public void Open(string path) { string parentFolder = Path.GetDirectoryName(path); string baseFilename = Path.GetFileName(path); diff --git a/DiscImageChef.Filters/XZ.cs b/DiscImageChef.Filters/XZ.cs index 1ca5b70fc..4840d6627 100644 --- a/DiscImageChef.Filters/XZ.cs +++ b/DiscImageChef.Filters/XZ.cs @@ -49,10 +49,10 @@ namespace DiscImageChef.Filters DateTime lastWriteTime; bool opened; - public virtual string Name => "XZ"; - public virtual Guid Id => new Guid("666A8617-0444-4C05-9F4F-DF0FD758D0D2"); + public string Name => "XZ"; + public Guid Id => new Guid("666A8617-0444-4C05-9F4F-DF0FD758D0D2"); - public virtual void Close() + public void Close() { dataStream?.Close(); dataStream = null; @@ -60,39 +60,39 @@ namespace DiscImageChef.Filters opened = false; } - public virtual string GetBasePath() + public string GetBasePath() { return basePath; } - public virtual Stream GetDataForkStream() + public Stream GetDataForkStream() { return innerStream; } - public virtual string GetPath() + public string GetPath() { return basePath; } - public virtual Stream GetResourceForkStream() + public Stream GetResourceForkStream() { return null; } - public virtual bool HasResourceFork() + public bool HasResourceFork() { return false; } - public virtual bool Identify(byte[] buffer) + public bool Identify(byte[] buffer) { return buffer[0] == 0xFD && buffer[1] == 0x37 && buffer[2] == 0x7A && buffer[3] == 0x58 && buffer[4] == 0x5A && buffer[5] == 0x00 && buffer[buffer.Length - 2] == 0x59 && buffer[buffer.Length - 1] == 0x5A; } - public virtual bool Identify(Stream stream) + public bool Identify(Stream stream) { byte[] buffer = new byte[6]; byte[] footer = new byte[2]; @@ -107,7 +107,7 @@ namespace DiscImageChef.Filters buffer[4] == 0x5A && buffer[5] == 0x00 && footer[0] == 0x59 && footer[1] == 0x5A; } - public virtual bool Identify(string path) + public bool Identify(string path) { if(!File.Exists(path)) return false; @@ -172,7 +172,7 @@ namespace DiscImageChef.Filters return i; } - public virtual void Open(byte[] buffer) + public void Open(byte[] buffer) { dataStream = new MemoryStream(buffer); basePath = null; @@ -183,7 +183,7 @@ namespace DiscImageChef.Filters opened = true; } - public virtual void Open(Stream stream) + public void Open(Stream stream) { dataStream = stream; basePath = null; @@ -194,7 +194,7 @@ namespace DiscImageChef.Filters opened = true; } - public virtual void Open(string path) + public void Open(string path) { dataStream = new FileStream(path, FileMode.Open, FileAccess.Read); basePath = Path.GetFullPath(path); @@ -210,32 +210,32 @@ namespace DiscImageChef.Filters opened = true; } - public virtual DateTime GetCreationTime() + public DateTime GetCreationTime() { return creationTime; } - public virtual long GetDataForkLength() + public long GetDataForkLength() { return decompressedSize; } - public virtual DateTime GetLastWriteTime() + public DateTime GetLastWriteTime() { return lastWriteTime; } - public virtual long GetLength() + public long GetLength() { return decompressedSize; } - public virtual long GetResourceForkLength() + public long GetResourceForkLength() { return 0; } - public virtual string GetFilename() + public string GetFilename() { if(basePath?.EndsWith(".xz", StringComparison.InvariantCultureIgnoreCase) == true) return basePath.Substring(0, basePath.Length - 3); @@ -245,12 +245,12 @@ namespace DiscImageChef.Filters : basePath; } - public virtual string GetParentFolder() + public string GetParentFolder() { return Path.GetDirectoryName(basePath); } - public virtual bool IsOpened() + public bool IsOpened() { return opened; } diff --git a/DiscImageChef.Filters/ZZZNoFilter.cs b/DiscImageChef.Filters/ZZZNoFilter.cs index 6cd05e986..ae45adede 100644 --- a/DiscImageChef.Filters/ZZZNoFilter.cs +++ b/DiscImageChef.Filters/ZZZNoFilter.cs @@ -46,10 +46,10 @@ namespace DiscImageChef.Filters DateTime lastWriteTime; bool opened; - public virtual string Name => "No filter"; - public virtual Guid Id => new Guid("12345678-AAAA-BBBB-CCCC-123456789000"); + public string Name => "No filter"; + public Guid Id => new Guid("12345678-AAAA-BBBB-CCCC-123456789000"); - public virtual void Close() + public void Close() { dataStream?.Close(); dataStream = null; @@ -57,48 +57,48 @@ namespace DiscImageChef.Filters opened = false; } - public virtual string GetBasePath() + public string GetBasePath() { return basePath; } - public virtual Stream GetDataForkStream() + public Stream GetDataForkStream() { return dataStream; } - public virtual string GetPath() + public string GetPath() { return basePath; } - public virtual Stream GetResourceForkStream() + public Stream GetResourceForkStream() { return null; } - public virtual bool HasResourceFork() + public bool HasResourceFork() { // TODO: Implement support for xattrs/ADS return false; } - public virtual bool Identify(byte[] buffer) + public bool Identify(byte[] buffer) { return buffer != null && buffer.Length > 0; } - public virtual bool Identify(Stream stream) + public bool Identify(Stream stream) { return stream != null && stream.Length > 0; } - public virtual bool Identify(string path) + public bool Identify(string path) { return File.Exists(path); } - public virtual void Open(byte[] buffer) + public void Open(byte[] buffer) { dataStream = new MemoryStream(buffer); basePath = null; @@ -107,7 +107,7 @@ namespace DiscImageChef.Filters opened = true; } - public virtual void Open(Stream stream) + public void Open(Stream stream) { dataStream = stream; basePath = null; @@ -116,7 +116,7 @@ namespace DiscImageChef.Filters opened = true; } - public virtual void Open(string path) + public void Open(string path) { dataStream = new FileStream(path, FileMode.Open, FileAccess.Read); basePath = Path.GetFullPath(path); @@ -126,42 +126,42 @@ namespace DiscImageChef.Filters opened = true; } - public virtual DateTime GetCreationTime() + public DateTime GetCreationTime() { return creationTime; } - public virtual long GetDataForkLength() + public long GetDataForkLength() { return dataStream.Length; } - public virtual DateTime GetLastWriteTime() + public DateTime GetLastWriteTime() { return lastWriteTime; } - public virtual long GetLength() + public long GetLength() { return dataStream.Length; } - public virtual long GetResourceForkLength() + public long GetResourceForkLength() { return 0; } - public virtual string GetFilename() + public string GetFilename() { return Path.GetFileName(basePath); } - public virtual string GetParentFolder() + public string GetParentFolder() { return Path.GetDirectoryName(basePath); } - public virtual bool IsOpened() + public bool IsOpened() { return opened; } diff --git a/DiscImageChef.Partitions/Acorn.cs b/DiscImageChef.Partitions/Acorn.cs index ff7309143..d69db3118 100644 --- a/DiscImageChef.Partitions/Acorn.cs +++ b/DiscImageChef.Partitions/Acorn.cs @@ -50,10 +50,10 @@ namespace DiscImageChef.Partitions const uint TYPE_RISCIX_SCSI = 2; const uint TYPE_MASK = 15; - public virtual string Name => "Acorn FileCore partitions"; - public virtual Guid Id => new Guid("A7C8FEBE-8D00-4933-B9F3-42184C8BA808"); + public string Name => "Acorn FileCore partitions"; + public Guid Id => new Guid("A7C8FEBE-8D00-4933-B9F3-42184C8BA808"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/AppleMap.cs b/DiscImageChef.Partitions/AppleMap.cs index 99dbed493..4f324195e 100644 --- a/DiscImageChef.Partitions/AppleMap.cs +++ b/DiscImageChef.Partitions/AppleMap.cs @@ -53,10 +53,10 @@ namespace DiscImageChef.Partitions /// Old indicator for HFS partition, "TFS1" const uint HFS_MAGIC_OLD = 0x54465331; - public virtual string Name => "Apple Partition Map"; - public virtual Guid Id => new Guid("36405F8D-4F1A-07F5-209C-223D735D6D22"); + public string Name => "Apple Partition Map"; + public Guid Id => new Guid("36405F8D-4F1A-07F5-209C-223D735D6D22"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { uint sectorSize; diff --git a/DiscImageChef.Partitions/Apricot.cs b/DiscImageChef.Partitions/Apricot.cs index 5840218d1..7510a1c7e 100644 --- a/DiscImageChef.Partitions/Apricot.cs +++ b/DiscImageChef.Partitions/Apricot.cs @@ -56,10 +56,10 @@ namespace DiscImageChef.Partitions readonly string[] printDevices = {"Parallel", "Serial"}; readonly double[] stopBits = {1, 1.5, 2}; - public virtual string Name => "ACT Apricot partitions"; - public virtual Guid Id => new Guid("8CBF5864-7B5A-47A0-8CEB-199C74FA22DE"); + public string Name => "ACT Apricot partitions"; + public Guid Id => new Guid("8CBF5864-7B5A-47A0-8CEB-199C74FA22DE"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/Atari.cs b/DiscImageChef.Partitions/Atari.cs index acdb1a69b..53bdc4e6a 100644 --- a/DiscImageChef.Partitions/Atari.cs +++ b/DiscImageChef.Partitions/Atari.cs @@ -55,10 +55,10 @@ namespace DiscImageChef.Partitions const uint TypeMinix = 0x004D4958; const uint TypeMinix2 = 0x004D4E58; - public virtual string Name => "Atari partitions"; - public virtual Guid Id => new Guid("d1dd0f24-ec39-4c4d-9072-be31919a3b5e"); + public string Name => "Atari partitions"; + public Guid Id => new Guid("d1dd0f24-ec39-4c4d-9072-be31919a3b5e"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/BSD.cs b/DiscImageChef.Partitions/BSD.cs index fda4cdbae..55d24f429 100644 --- a/DiscImageChef.Partitions/BSD.cs +++ b/DiscImageChef.Partitions/BSD.cs @@ -51,10 +51,10 @@ namespace DiscImageChef.Partitions /// Known byte offsets for BSD disklabel readonly uint[] labelOffsets = {0, 9, 64, 128, 516}; - public virtual string Name => "BSD disklabel"; - public virtual Guid Id => new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9"); + public string Name => "BSD disklabel"; + public Guid Id => new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); uint run = (MAX_LABEL_SIZE + labelOffsets.Last()) / imagePlugin.Info.SectorSize; diff --git a/DiscImageChef.Partitions/DEC.cs b/DiscImageChef.Partitions/DEC.cs index 9c0c7f4e2..f414362fb 100644 --- a/DiscImageChef.Partitions/DEC.cs +++ b/DiscImageChef.Partitions/DEC.cs @@ -44,10 +44,10 @@ namespace DiscImageChef.Partitions const int PT_MAGIC = 0x032957; const int PT_VALID = 1; - public virtual string Name => "DEC disklabel"; - public virtual Guid Id => new Guid("58CEC3B7-3B93-4D47-86EE-D6DADE9D444F"); + public string Name => "DEC disklabel"; + public Guid Id => new Guid("58CEC3B7-3B93-4D47-86EE-D6DADE9D444F"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/DragonFlyBSD.cs b/DiscImageChef.Partitions/DragonFlyBSD.cs index dc6069339..36fb3d899 100644 --- a/DiscImageChef.Partitions/DragonFlyBSD.cs +++ b/DiscImageChef.Partitions/DragonFlyBSD.cs @@ -42,10 +42,10 @@ namespace DiscImageChef.Partitions { const uint DISK_MAGIC64 = 0xC4464C59; - public virtual string Name => "DragonFly BSD 64-bit disklabel"; - public virtual Guid Id => new Guid("D49E41A6-D952-4760-9D94-03DAE2450C5F"); + public string Name => "DragonFly BSD 64-bit disklabel"; + public Guid Id => new Guid("D49E41A6-D952-4760-9D94-03DAE2450C5F"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); uint nSectors = 2048 / imagePlugin.Info.SectorSize; diff --git a/DiscImageChef.Partitions/GPT.cs b/DiscImageChef.Partitions/GPT.cs index ba714be92..8b99f6fc5 100644 --- a/DiscImageChef.Partitions/GPT.cs +++ b/DiscImageChef.Partitions/GPT.cs @@ -45,10 +45,10 @@ namespace DiscImageChef.Partitions const ulong GPT_MAGIC = 0x5452415020494645; const uint GPT_REVISION1 = 0x00010000; - public virtual string Name => "GUID Partition Table"; - public virtual Guid Id => new Guid("CBC9D281-C1D0-44E8-9038-4D66FD2678AB"); + public string Name => "GUID Partition Table"; + public Guid Id => new Guid("CBC9D281-C1D0-44E8-9038-4D66FD2678AB"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/Human68k.cs b/DiscImageChef.Partitions/Human68k.cs index 90d0058cb..fbc458990 100644 --- a/DiscImageChef.Partitions/Human68k.cs +++ b/DiscImageChef.Partitions/Human68k.cs @@ -44,10 +44,10 @@ namespace DiscImageChef.Partitions { const uint X68K_MAGIC = 0x5836384B; - public virtual string Name => "Human 68k partitions"; - public virtual Guid Id => new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9"); + public string Name => "Human 68k partitions"; + public Guid Id => new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/MBR.cs b/DiscImageChef.Partitions/MBR.cs index 341dd184e..159aa5b7d 100644 --- a/DiscImageChef.Partitions/MBR.cs +++ b/DiscImageChef.Partitions/MBR.cs @@ -184,10 +184,10 @@ namespace DiscImageChef.Partitions "VMWare VMKCORE", "Linux RAID, FreeDOS", "SpeedStor, LANStep, PS/2 IML", "Xenix bad block" }; - public virtual string Name => "Master Boot Record"; - public virtual Guid Id => new Guid("5E8A34E8-4F1A-59E6-4BF7-7EA647063A76"); + public string Name => "Master Boot Record"; + public Guid Id => new Guid("5E8A34E8-4F1A-59E6-4BF7-7EA647063A76"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { ulong counter = 0; diff --git a/DiscImageChef.Partitions/NeXT.cs b/DiscImageChef.Partitions/NeXT.cs index 0f9fb2c2c..a6d698f8d 100644 --- a/DiscImageChef.Partitions/NeXT.cs +++ b/DiscImageChef.Partitions/NeXT.cs @@ -55,10 +55,10 @@ namespace DiscImageChef.Partitions /// 44 const ushort DISKTAB_ENTRY_SIZE = 0x2C; - public virtual string Name => "NeXT Disklabel"; - public virtual Guid Id => new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9"); + public string Name => "NeXT Disklabel"; + public Guid Id => new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { bool magicFound = false; byte[] labelSector; diff --git a/DiscImageChef.Partitions/PC98.cs b/DiscImageChef.Partitions/PC98.cs index 8952f33e2..353157070 100644 --- a/DiscImageChef.Partitions/PC98.cs +++ b/DiscImageChef.Partitions/PC98.cs @@ -43,10 +43,10 @@ namespace DiscImageChef.Partitions { public class PC98 : IPartition { - public virtual string Name => "NEC PC-9800 partition table"; - public virtual Guid Id => new Guid("27333401-C7C2-447D-961C-22AD0641A09A"); + public string Name => "NEC PC-9800 partition table"; + public Guid Id => new Guid("27333401-C7C2-447D-961C-22AD0641A09A"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/Plan9.cs b/DiscImageChef.Partitions/Plan9.cs index ef93ffe3b..41d937bc0 100644 --- a/DiscImageChef.Partitions/Plan9.cs +++ b/DiscImageChef.Partitions/Plan9.cs @@ -45,10 +45,10 @@ namespace DiscImageChef.Partitions // e.g.: "part nvram 10110 10112\npart fossil 10112 3661056\n" public class Plan9 : IPartition { - public virtual string Name => "Plan9 partition table"; - public virtual Guid Id => new Guid("F0BF4FFC-056E-4E7C-8B65-4EAEE250ADD9"); + public string Name => "Plan9 partition table"; + public Guid Id => new Guid("F0BF4FFC-056E-4E7C-8B65-4EAEE250ADD9"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/RDB.cs b/DiscImageChef.Partitions/RDB.cs index fdb46d3b2..1bb65e0b6 100644 --- a/DiscImageChef.Partitions/RDB.cs +++ b/DiscImageChef.Partitions/RDB.cs @@ -275,10 +275,10 @@ namespace DiscImageChef.Partitions /// const uint FLAGS_NO_AUTOMOUNT = 0x00000002; - public virtual string Name => "Amiga Rigid Disk Block"; - public virtual Guid Id => new Guid("8D72ED97-1854-4170-9CE4-6E8446FD9863"); + public string Name => "Amiga Rigid Disk Block"; + public Guid Id => new Guid("8D72ED97-1854-4170-9CE4-6E8446FD9863"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian; diff --git a/DiscImageChef.Partitions/RioKarma.cs b/DiscImageChef.Partitions/RioKarma.cs index d1f8bb99e..9b1dcbfd8 100644 --- a/DiscImageChef.Partitions/RioKarma.cs +++ b/DiscImageChef.Partitions/RioKarma.cs @@ -44,10 +44,10 @@ namespace DiscImageChef.Partitions const ushort KARMA_MAGIC = 0xAB56; const byte ENTRY_MAGIC = 0x4D; - public virtual string Name => "Rio Karma partitioning"; - public virtual Guid Id => new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9"); + public string Name => "Rio Karma partitioning"; + public Guid Id => new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/SGI.cs b/DiscImageChef.Partitions/SGI.cs index c460de1d7..264e453a0 100644 --- a/DiscImageChef.Partitions/SGI.cs +++ b/DiscImageChef.Partitions/SGI.cs @@ -48,10 +48,10 @@ namespace DiscImageChef.Partitions { const int SGI_MAGIC = 0x0BE5A941; - public virtual string Name => "SGI Disk Volume Header"; - public virtual Guid Id => new Guid("AEF5AB45-4880-4CE8-8735-F0A402E2E5F2"); + public string Name => "SGI Disk Volume Header"; + public Guid Id => new Guid("AEF5AB45-4880-4CE8-8735-F0A402E2E5F2"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/Sun.cs b/DiscImageChef.Partitions/Sun.cs index 9877bec03..85014f973 100644 --- a/DiscImageChef.Partitions/Sun.cs +++ b/DiscImageChef.Partitions/Sun.cs @@ -70,10 +70,10 @@ namespace DiscImageChef.Partitions const int LEN_DKL_PAD16 = DK_LABEL_SIZE - (456 + // sizeof(dk_vtoc16) 4 * 4 + 12 * 2 + 2 * 2); - public virtual string Name => "Sun Disklabel"; - public virtual Guid Id => new Guid("50F35CC4-8375-4445-8DCB-1BA550C931A3"); + public string Name => "Sun Disklabel"; + public Guid Id => new Guid("50F35CC4-8375-4445-8DCB-1BA550C931A3"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/UNIX.cs b/DiscImageChef.Partitions/UNIX.cs index cb016b6ab..437d99d64 100644 --- a/DiscImageChef.Partitions/UNIX.cs +++ b/DiscImageChef.Partitions/UNIX.cs @@ -1369,10 +1369,10 @@ namespace DiscImageChef.Partitions } }; - public virtual string Name => "UNIX hardwired"; - public virtual Guid Id => new Guid("9ED7E30B-53BF-4619-87A0-5D2002155617"); + public string Name => "UNIX hardwired"; + public Guid Id => new Guid("9ED7E30B-53BF-4619-87A0-5D2002155617"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); Partition[] parts; diff --git a/DiscImageChef.Partitions/VTOC.cs b/DiscImageChef.Partitions/VTOC.cs index d97193d55..ea6db6ad6 100644 --- a/DiscImageChef.Partitions/VTOC.cs +++ b/DiscImageChef.Partitions/VTOC.cs @@ -49,10 +49,10 @@ namespace DiscImageChef.Partitions const int V_NUMPAR = 16; const uint XPDVERS = 3; /* 1st version of extended pdinfo */ - public virtual string Name => "UNIX VTOC"; - public virtual Guid Id => new Guid("6D35A66F-8D77-426F-A562-D88F6A1F1702"); + public string Name => "UNIX VTOC"; + public Guid Id => new Guid("6D35A66F-8D77-426F-A562-D88F6A1F1702"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/XENIX.cs b/DiscImageChef.Partitions/XENIX.cs index e0908eb61..8f0408f7c 100644 --- a/DiscImageChef.Partitions/XENIX.cs +++ b/DiscImageChef.Partitions/XENIX.cs @@ -48,10 +48,10 @@ namespace DiscImageChef.Partitions // Can't find this in any documentation but everything is aligned to this offset (in sectors) const uint XENIX_OFFSET = 977; - public virtual string Name => "XENIX"; - public virtual Guid Id => new Guid("53BE01DE-E68B-469F-A17F-EC2E4BD61CD9"); + public string Name => "XENIX"; + public Guid Id => new Guid("53BE01DE-E68B-469F-A17F-EC2E4BD61CD9"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List(); diff --git a/DiscImageChef.Partitions/Xbox.cs b/DiscImageChef.Partitions/Xbox.cs index 72218e3c1..5bf842a23 100644 --- a/DiscImageChef.Partitions/Xbox.cs +++ b/DiscImageChef.Partitions/Xbox.cs @@ -60,10 +60,10 @@ namespace DiscImageChef.Partitions const uint XBOX360_DEVKIT_MAGIC = 0x00020000; - public virtual string Name => "Xbox partitioning"; - public virtual Guid Id => new Guid("E3F6FB91-D358-4F22-A550-81E92D50EB78"); + public string Name => "Xbox partitioning"; + public Guid Id => new Guid("E3F6FB91-D358-4F22-A550-81E92D50EB78"); - public virtual bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) + public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { partitions = new List();