From 134ce7041ef22a8df0925ac8bcaebf9337d3083f Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 1 May 2024 04:39:38 +0100 Subject: [PATCH] [Refactor] Use collection expressions. --- Aaru.Archives/Symbian/Files.cs | 2 +- Aaru.Archives/Symbian/Info.cs | 6 +- Aaru.Archives/Symbian/Open.cs | 8 +- Aaru.Archives/Symbian/Xattrs.cs | 2 +- Aaru.Checksums/CRC16CCITTContext.cs | 44 +- Aaru.Checksums/CRC16IBMContext.cs | 44 +- Aaru.Checksums/CRC32/clmul.cs | 4 +- Aaru.Checksums/CRC32Context.cs | 532 ++- Aaru.Checksums/CRC64/clmul.cs | 4 +- Aaru.Checksums/CRC64Context.cs | 24 +- Aaru.Checksums/MD5Context.cs | 4 +- Aaru.Checksums/ReedSolomon.cs | 110 +- Aaru.Checksums/SHA1Context.cs | 4 +- Aaru.Checksums/SHA256Context.cs | 4 +- Aaru.Checksums/SHA384Context.cs | 4 +- Aaru.Checksums/SHA512Context.cs | 4 +- Aaru.CommonTypes/AaruMetadata/AaruMetadata.cs | 42 +- .../AaruMetadata/Advertisement.cs | 8 +- Aaru.CommonTypes/AaruMetadata/AudioMedia.cs | 8 +- Aaru.CommonTypes/AaruMetadata/AudioVideo.cs | 8 +- Aaru.CommonTypes/AaruMetadata/BlockMedia.cs | 14 +- Aaru.CommonTypes/AaruMetadata/Book.cs | 4 +- Aaru.CommonTypes/AaruMetadata/Contents.cs | 14 +- Aaru.CommonTypes/AaruMetadata/Dump.cs | 4 +- Aaru.CommonTypes/AaruMetadata/DumpHardware.cs | 2 +- Aaru.CommonTypes/AaruMetadata/Layers.cs | 2 +- Aaru.CommonTypes/AaruMetadata/LinearMedia.cs | 6 +- Aaru.CommonTypes/AaruMetadata/Magazine.cs | 2 +- Aaru.CommonTypes/AaruMetadata/OpticalDisc.cs | 30 +- Aaru.CommonTypes/AaruMetadata/PCMCIA.cs | 3 +- Aaru.CommonTypes/AaruMetadata/Partition.cs | 2 +- .../AaruMetadata/RequiredOperatingSystem.cs | 2 +- Aaru.CommonTypes/AaruMetadata/SCSI.cs | 4 +- Aaru.CommonTypes/AaruMetadata/Scanning.cs | 12 +- Aaru.CommonTypes/AaruMetadata/Tape.cs | 6 +- Aaru.CommonTypes/AaruMetadata/UserManual.cs | 2 +- Aaru.CommonTypes/Extents/ExtentsByte.cs | 4 +- Aaru.CommonTypes/Extents/ExtentsConverter.cs | 2 +- Aaru.CommonTypes/Extents/ExtentsInt.cs | 4 +- Aaru.CommonTypes/Extents/ExtentsLong.cs | 4 +- Aaru.CommonTypes/Extents/ExtentsSByte.cs | 4 +- Aaru.CommonTypes/Extents/ExtentsShort.cs | 4 +- Aaru.CommonTypes/Extents/ExtentsUInt.cs | 4 +- Aaru.CommonTypes/Extents/ExtentsULong.cs | 4 +- Aaru.CommonTypes/Extents/ExtentsUShort.cs | 4 +- Aaru.CommonTypes/Geometry.cs | 4 +- Aaru.CommonTypes/PluginRegister.cs | 3 +- Aaru.Compression/TeleDiskLzh.cs | 8 +- .../CUETools.Codecs.Flake/AudioDecoder.cs | 1540 +++--- .../CUETools.Codecs.Flake/AudioEncoder.cs | 4239 +++++++++-------- .../CUETools.Codecs.Flake/Flake.cs | 82 +- .../cuetools.net/CUETools.Codecs/BitReader.cs | 582 ++- .../CUETools.Codecs/CRC/CRC16CCITT.cs | 101 +- .../CUETools.Codecs/CUEToolsCodecsConfig.cs | 380 +- .../CUETools.Codecs/IAudioSource.cs | 142 +- .../CUETools.Codecs/SRDescriptionAttribute.cs | 96 +- .../CUETools.Codecs/WAV/AudioEncoder.cs | 348 +- Aaru.Core/Checksum.cs | 4 +- Aaru.Core/Devices/Dumping/ATA.cs | 8 +- .../Devices/Dumping/CompactDisc/CdiReady.cs | 10 +- Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs | 31 +- .../Devices/Dumping/CompactDisc/Error.cs | 26 +- .../Devices/Dumping/CompactDisc/Recordable.cs | 2 +- .../Devices/Dumping/CompactDisc/Tracks.cs | 2 +- Aaru.Core/Devices/Dumping/MMC.cs | 24 +- Aaru.Core/Devices/Dumping/Metadata.cs | 2 +- Aaru.Core/Devices/Dumping/MiniDisc.cs | 13 +- .../PlayStationPortable/MemoryStick.cs | 13 +- .../Dumping/PlayStationPortable/UMD.cs | 37 +- Aaru.Core/Devices/Dumping/ResumeSupport.cs | 5 +- Aaru.Core/Devices/Dumping/SSC.cs | 12 +- Aaru.Core/Devices/Dumping/Sbc/Cache.cs | 7 +- Aaru.Core/Devices/Dumping/Sbc/Data.cs | 21 +- Aaru.Core/Devices/Dumping/Sbc/Dump.cs | 56 +- Aaru.Core/Devices/Dumping/Sbc/Error.cs | 38 +- Aaru.Core/Devices/Dumping/XGD.cs | 63 +- Aaru.Core/Devices/Report/ATA.cs | 6 +- Aaru.Core/Devices/Report/MMC.cs | 6 +- Aaru.Core/Devices/Report/SSC.cs | 5 +- Aaru.Core/Devices/Report/Scsi.cs | 16 +- Aaru.Core/Devices/Report/SecureDigital.cs | 9 +- Aaru.Core/Devices/Scanning/ATA.cs | 3 +- Aaru.Core/Devices/Scanning/SCSI.cs | 3 +- Aaru.Core/Devices/Scanning/SecureDigital.cs | 3 +- Aaru.Core/Entropy.cs | 6 +- Aaru.Core/Graphics/Spiral.cs | 2 +- Aaru.Core/Logging/ErrorLog.cs | 16 +- Aaru.Core/Media/CompactDisc.cs | 17 +- Aaru.Core/Media/Detection/MMC.cs | 43 +- Aaru.Core/Media/Info/CompactDisc.cs | 11 +- Aaru.Core/Partitions.cs | 10 +- Aaru.Core/Remote.cs | 6 +- Aaru.Core/Sidecar/AudioMedia.cs | 8 +- Aaru.Core/Sidecar/BlockMedia.cs | 28 +- Aaru.Core/Sidecar/BlockTape.cs | 18 +- Aaru.Core/Sidecar/Files.cs | 10 +- Aaru.Core/Sidecar/LinearMedia.cs | 32 +- Aaru.Core/Sidecar/OpticalDisc.cs | 32 +- Aaru.Core/Sidecar/Sidecar.cs | 2 +- Aaru.Core/Statistics.cs | 25 +- Aaru.Decoders/Bluray/DI.cs | 2 +- Aaru.Decoders/CD/FullTOC.cs | 2 +- Aaru.Decoders/CD/PMA.cs | 4 +- Aaru.Decoders/CD/Sector.cs | 9 +- Aaru.Decoders/CD/Subchannel.cs | 4 +- Aaru.Decoders/DVD/Sector.cs | 12 +- Aaru.Decoders/Floppy/Apple2.cs | 42 +- Aaru.Decoders/Floppy/AppleSony.cs | 21 +- Aaru.Decoders/PCMCIA/CIS.cs | 14 +- .../SCSI/DiscStructureCapabilities.cs | 2 +- Aaru.Decoders/SCSI/EVPD.cs | 17 +- Aaru.Decoders/SCSI/MMC/Features.cs | 4 +- Aaru.Decoders/SCSI/Modes/Mode10.cs | 2 +- Aaru.Decoders/SCSI/Modes/Mode6.cs | 2 +- Aaru.Decoders/SCSI/SSC/DensitySupport.cs | 4 +- Aaru.Decryption/DVD/CSS.cs | 45 +- Aaru.Decryption/DVD/Dump.cs | 8 +- Aaru.Decryption/DVD/MPEG.cs | 10 +- Aaru.Devices/Device/AtaCommands/Ata28.cs | 5 +- Aaru.Devices/Device/AtaCommands/Ata48.cs | 5 +- Aaru.Devices/Device/AtaCommands/AtaCHS.cs | 11 +- Aaru.Devices/Device/AtaCommands/Cfa.cs | 3 +- Aaru.Devices/Device/AtaCommands/MCPT.cs | 3 +- Aaru.Devices/Device/AtaCommands/Smart.cs | 13 +- Aaru.Devices/Device/List.cs | 4 +- Aaru.Devices/Device/MmcCommands/MMC.cs | 6 +- .../Device/ScsiCommands/ArchiveCorp.cs | 3 +- Aaru.Devices/Device/ScsiCommands/Certance.cs | 3 +- Aaru.Devices/Device/ScsiCommands/HL-DT-ST.cs | 5 +- Aaru.Devices/Device/ScsiCommands/Kreon.cs | 4 +- Aaru.Devices/Device/ScsiCommands/MMC.cs | 6 +- Aaru.Devices/Device/ScsiCommands/MiniDisc.cs | 3 +- Aaru.Devices/Device/ScsiCommands/Optical.cs | 3 +- Aaru.Devices/Device/ScsiCommands/SBC.cs | 4 +- Aaru.Devices/Device/ScsiCommands/SPC.cs | 29 +- Aaru.Devices/Device/ScsiCommands/SSC.cs | 12 +- Aaru.Devices/Device/ScsiCommands/SyQuest.cs | 5 +- Aaru.Devices/Remote/Remote.cs | 18 +- Aaru.Dto/DeviceDto.cs | 9 +- Aaru.Filesystems/AmigaDOS/Info.cs | 8 +- Aaru.Filesystems/AppleDOS/Dir.cs | 2 +- Aaru.Filesystems/AppleDOS/Xattr.cs | 2 +- Aaru.Filesystems/AppleMFS/File.cs | 4 +- Aaru.Filesystems/AppleMFS/Xattr.cs | 2 +- Aaru.Filesystems/CPM/Super.cs | 11 +- Aaru.Filesystems/CPM/Xattr.cs | 7 +- Aaru.Filesystems/FAT/Consts.cs | 4 +- Aaru.Filesystems/FAT/Dir.cs | 2 +- Aaru.Filesystems/FAT/File.cs | 4 +- Aaru.Filesystems/FAT/Xattr.cs | 2 +- Aaru.Filesystems/FATX/File.cs | 2 +- Aaru.Filesystems/FFS/Info.cs | 8 +- Aaru.Filesystems/HPOFS/Consts.cs | 5 +- Aaru.Filesystems/ISO9660/Dir.cs | 31 +- Aaru.Filesystems/ISO9660/File.cs | 10 +- Aaru.Filesystems/ISO9660/Info.cs | 6 +- Aaru.Filesystems/ISO9660/PathTable.cs | 4 +- Aaru.Filesystems/ISO9660/Super.cs | 66 +- Aaru.Filesystems/ISO9660/Xattr.cs | 6 +- Aaru.Filesystems/LisaFS/Dir.cs | 9 +- Aaru.Filesystems/LisaFS/Super.cs | 2 +- Aaru.Filesystems/LisaFS/Xattr.cs | 4 +- Aaru.Filesystems/Nintendo/Info.cs | 8 +- Aaru.Filesystems/QNX4/Consts.cs | 4 +- Aaru.Filesystems/ReFS/Consts.cs | 7 +- Aaru.Filesystems/Reiser/Consts.cs | 15 +- Aaru.Filesystems/Reiser4/Consts.cs | 4 +- Aaru.Filesystems/SysV/Info.cs | 8 +- Aaru.Filesystems/UCSDPascal/Super.cs | 2 +- Aaru.Filesystems/UDF/Consts.cs | 4 +- Aaru.Filesystems/UDF/Info.cs | 76 +- Aaru.Generators/PluginRegisterGenerator.cs | 57 +- Aaru.Gui/ConsoleHandler.cs | 2 +- Aaru.Gui/Models/DeviceModel.cs | 2 +- Aaru.Gui/Models/DevicesRootModel.cs | 2 +- Aaru.Gui/Models/FileSystemModel.cs | 2 +- Aaru.Gui/Models/ImageModel.cs | 2 +- Aaru.Gui/Models/ImagesRootModel.cs | 2 +- Aaru.Gui/Models/PartitionModel.cs | 2 +- Aaru.Gui/Models/PartitionSchemeModel.cs | 2 +- Aaru.Gui/Models/SubdirectoryModel.cs | 2 +- Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs | 2 +- .../ViewModels/Dialogs/ConsoleViewModel.cs | 12 +- .../ViewModels/Dialogs/EncodingsViewModel.cs | 2 +- .../ViewModels/Dialogs/PluginsViewModel.cs | 16 +- .../ViewModels/Dialogs/StatisticsViewModel.cs | 12 +- .../ViewModels/Panels/DeviceInfoViewModel.cs | 12 +- .../ViewModels/Panels/ImageInfoViewModel.cs | 20 +- .../ViewModels/Panels/MediaInfoViewModel.cs | 12 +- .../Panels/SubdirectoryViewModel.cs | 4 +- Aaru.Gui/ViewModels/Tabs/AtaInfoViewModel.cs | 23 +- .../ViewModels/Tabs/BlurayInfoViewModel.cs | 12 +- .../Tabs/CompactDiscInfoViewModel.cs | 79 +- Aaru.Gui/ViewModels/Tabs/DvdInfoViewModel.cs | 12 +- .../Tabs/DvdWritableInfoViewModel.cs | 12 +- .../ViewModels/Tabs/PcmciaInfoViewModel.cs | 14 +- Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs | 72 +- Aaru.Gui/ViewModels/Tabs/XboxInfoViewModel.cs | 12 +- .../Windows/DecodeMediaTagsViewModel.cs | 2 +- .../Windows/ImageChecksumViewModel.cs | 4 +- .../Windows/ImageConvertViewModel.cs | 31 +- .../Windows/ImageEntropyViewModel.cs | 2 +- .../Windows/ImageSidecarViewModel.cs | 12 +- .../Windows/ImageVerifyViewModel.cs | 8 +- .../ViewModels/Windows/MainWindowViewModel.cs | 2 +- .../ViewModels/Windows/MediaDumpViewModel.cs | 15 +- .../ViewModels/Windows/MediaScanViewModel.cs | 2 +- Aaru.Helpers/ArrayFill.cs | 6 +- Aaru.Helpers/Marshal.cs | 12 +- Aaru.Images/A2R/A2R.cs | 5 +- Aaru.Images/A2R/Constants.cs | 28 +- Aaru.Images/A2R/Helpers.cs | 7 +- Aaru.Images/A2R/Read.cs | 8 +- Aaru.Images/A2R/Write.cs | 5 +- Aaru.Images/AaruFormat/AaruFormat.cs | 4 +- Aaru.Images/AaruFormat/Read.cs | 33 +- Aaru.Images/AaruFormat/Tape.cs | 4 +- Aaru.Images/AaruFormat/Verify.cs | 18 +- Aaru.Images/AaruFormat/Write.cs | 122 +- Aaru.Images/Alcohol120/Alcohol120.cs | 5 +- Aaru.Images/Alcohol120/Properties.cs | 2 +- Aaru.Images/Alcohol120/Read.cs | 18 +- Aaru.Images/Alcohol120/Verify.cs | 8 +- Aaru.Images/Alcohol120/Write.cs | 33 +- Aaru.Images/Anex86/Anex86.cs | 6 +- Aaru.Images/Apple2MG/Apple2MG.cs | 6 +- Aaru.Images/Apple2MG/Constants.cs | 16 +- Aaru.Images/AppleDOS/AppleDOS.cs | 6 +- Aaru.Images/AppleDOS/Constants.cs | 10 +- Aaru.Images/AppleNIB/AppleNIB.cs | 5 +- Aaru.Images/AppleNIB/Constants.cs | 46 +- Aaru.Images/Apridisk/Apridisk.cs | 6 +- Aaru.Images/Apridisk/Constants.cs | 4 +- Aaru.Images/BLU/BLU.cs | 6 +- Aaru.Images/BLU/Verify.cs | 4 +- Aaru.Images/BlindWrite4/BlindWrite4.cs | 5 +- Aaru.Images/BlindWrite4/Read.cs | 18 +- Aaru.Images/BlindWrite4/Verify.cs | 8 +- Aaru.Images/BlindWrite5/BlindWrite5.cs | 5 +- Aaru.Images/BlindWrite5/Read.cs | 24 +- Aaru.Images/BlindWrite5/Verify.cs | 8 +- Aaru.Images/ByteAddressable/AtariLynx.cs | 6 +- Aaru.Images/ByteAddressable/GameBoy.cs | 6 +- Aaru.Images/ByteAddressable/GameBoyAdvance.cs | 6 +- Aaru.Images/ByteAddressable/MasterSystem.cs | 6 +- Aaru.Images/ByteAddressable/NES.cs | 6 +- Aaru.Images/CDRDAO/CDRDAO.cs | 5 +- Aaru.Images/CDRDAO/Properties.cs | 10 +- Aaru.Images/CDRDAO/Read.cs | 9 +- Aaru.Images/CDRDAO/Verify.cs | 8 +- Aaru.Images/CDRDAO/Write.cs | 9 +- Aaru.Images/CDRWin/CDRWin.cs | 5 +- Aaru.Images/CDRWin/Properties.cs | 2 +- Aaru.Images/CDRWin/Read.cs | 21 +- Aaru.Images/CDRWin/Verify.cs | 8 +- Aaru.Images/CDRWin/Write.cs | 11 +- Aaru.Images/CHD/CHD.cs | 5 +- Aaru.Images/CHD/Read.cs | 2 +- Aaru.Images/CHD/Verify.cs | 8 +- Aaru.Images/CPCDSK/CPCDSK.cs | 5 +- Aaru.Images/CisCopy/CisCopy.cs | 6 +- Aaru.Images/CloneCD/CloneCD.cs | 5 +- Aaru.Images/CloneCD/Read.cs | 13 +- Aaru.Images/CloneCD/Verify.cs | 8 +- Aaru.Images/CloneCD/Write.cs | 2 +- Aaru.Images/CopyQM/Constants.cs | 4 +- Aaru.Images/CopyQM/CopyQM.cs | 6 +- Aaru.Images/CopyTape/Read.cs | 12 +- Aaru.Images/D88/Constants.cs | 7 +- Aaru.Images/D88/D88.cs | 5 +- Aaru.Images/D88/Read.cs | 2 +- Aaru.Images/DART/DART.cs | 6 +- Aaru.Images/DIM/DIM.cs | 6 +- Aaru.Images/DiscFerret/DiscFerret.cs | 5 +- Aaru.Images/DiscJuggler/DiscJuggler.cs | 5 +- Aaru.Images/DiscJuggler/Read.cs | 11 +- Aaru.Images/DiscJuggler/Verify.cs | 8 +- Aaru.Images/DiskCopy42/DiskCopy42.cs | 6 +- Aaru.Images/DiskDupe/Constants.cs | 5 +- Aaru.Images/DiskDupe/DiskDupe.cs | 6 +- Aaru.Images/DiskDupe/Structs.cs | 14 +- Aaru.Images/DriDiskCopy/DriDiskCopy.cs | 6 +- Aaru.Images/GDI/GDI.cs | 5 +- Aaru.Images/GDI/Properties.cs | 2 +- Aaru.Images/GDI/Read.cs | 13 +- Aaru.Images/GDI/Verify.cs | 8 +- Aaru.Images/HDCopy/HDCopy.cs | 5 +- Aaru.Images/IMD/IMD.cs | 5 +- Aaru.Images/IMD/Read.cs | 7 +- Aaru.Images/KryoFlux/KryoFlux.cs | 5 +- Aaru.Images/MaxiDisk/MaxiDisk.cs | 6 +- Aaru.Images/NDIF/NDIF.cs | 5 +- Aaru.Images/NHDr0/Constants.cs | 4 +- Aaru.Images/NHDr0/NHDr0.cs | 6 +- Aaru.Images/Nero/Nero.cs | 10 +- Aaru.Images/Nero/Read.cs | 23 +- Aaru.Images/Nero/Verify.cs | 8 +- Aaru.Images/Parallels/Parallels.cs | 5 +- Aaru.Images/PartClone/PartClone.cs | 5 +- Aaru.Images/Partimage/Constants.cs | 4 +- Aaru.Images/Partimage/Partimage.cs | 5 +- Aaru.Images/QCOW/QCOW.cs | 5 +- Aaru.Images/QCOW2/QCOW2.cs | 5 +- Aaru.Images/QCOW2/Write.cs | 7 +- Aaru.Images/QED/QED.cs | 5 +- Aaru.Images/RayDIM/RayDIM.cs | 6 +- Aaru.Images/RsIde/Constants.cs | 5 +- Aaru.Images/RsIde/RsIde.cs | 6 +- Aaru.Images/SaveDskF/SaveDskF.cs | 6 +- Aaru.Images/SuperCardPro/Helpers.cs | 11 +- Aaru.Images/SuperCardPro/Read.cs | 4 +- Aaru.Images/SuperCardPro/SuperCardPro.cs | 5 +- Aaru.Images/T98/T98.cs | 6 +- Aaru.Images/TeleDisk/TeleDisk.cs | 7 +- Aaru.Images/TeleDisk/Verify.cs | 9 +- Aaru.Images/UDIF/Read.cs | 2 +- Aaru.Images/UDIF/UDIF.cs | 5 +- Aaru.Images/UkvFdi/UkvFdi.cs | 6 +- Aaru.Images/VDI/VDI.cs | 5 +- Aaru.Images/VHD/VHD.cs | 6 +- Aaru.Images/VHDX/VHDX.cs | 5 +- Aaru.Images/VMware/VMware.cs | 5 +- Aaru.Images/Virtual98/Constants.cs | 5 +- Aaru.Images/Virtual98/Virtual98.cs | 6 +- Aaru.Images/WCDiskImage/WCDiskImage.cs | 5 +- Aaru.Images/ZZZRawImage/Constants.cs | 13 +- Aaru.Images/ZZZRawImage/Properties.cs | 14 +- Aaru.Images/ZZZRawImage/Read.cs | 17 +- Aaru.Images/ZZZRawImage/Verify.cs | 16 +- Aaru.Images/ZZZRawImage/ZZZRawImage.cs | 4 +- Aaru.Partitions/Acorn.cs | 2 +- Aaru.Partitions/AppleMap.cs | 2 +- Aaru.Partitions/Apricot.cs | 45 +- Aaru.Partitions/Atari.cs | 2 +- Aaru.Partitions/BSD.cs | 12 +- Aaru.Partitions/DEC.cs | 2 +- Aaru.Partitions/DragonFlyBSD.cs | 2 +- Aaru.Partitions/GPT.cs | 4 +- Aaru.Partitions/Human68k.cs | 2 +- Aaru.Partitions/MBR.cs | 8 +- Aaru.Partitions/NeXT.cs | 2 +- Aaru.Partitions/PC98.cs | 2 +- Aaru.Partitions/Plan9.cs | 2 +- Aaru.Partitions/RDB.cs | 10 +- Aaru.Partitions/SGI.cs | 2 +- Aaru.Partitions/Sun.cs | 2 +- Aaru.Partitions/UNIX.cs | 302 +- Aaru.Partitions/VTOC.cs | 2 +- Aaru.Partitions/XENIX.cs | 2 +- Aaru.Partitions/Xbox.cs | 2 +- Aaru.Tests/Checksums/Adler32.cs | 29 +- Aaru.Tests/Checksums/CRC16CCITT.cs | 29 +- Aaru.Tests/Checksums/CRC16IBM.cs | 29 +- Aaru.Tests/Checksums/CRC32.cs | 29 +- Aaru.Tests/Checksums/CRC64.cs | 30 +- Aaru.Tests/Checksums/MD5.cs | 8 +- Aaru.Tests/Checksums/SHA1.cs | 8 +- Aaru.Tests/Checksums/SHA256.cs | 8 +- Aaru.Tests/Checksums/SHA384.cs | 8 +- Aaru.Tests/Checksums/SHA512.cs | 8 +- Aaru.Tests/Devices/IomegaJaz.cs | 20 +- Aaru.Tests/Devices/LS120.cs | 20 +- Aaru.Tests/Devices/MultiMediaCard/CID.cs | 44 +- Aaru.Tests/Devices/MultiMediaCard/CSD.cs | 164 +- .../Devices/MultiMediaCard/ExtendedCSD.cs | 314 +- Aaru.Tests/Devices/PocketZip.cs | 20 +- Aaru.Tests/Devices/SecureDigital/CID.cs | 38 +- Aaru.Tests/Devices/SecureDigital/CSD.cs | 126 +- Aaru.Tests/Devices/SecureDigital/SCR.cs | 119 +- Aaru.Tests/Filesystems/ADFS.cs | 6 +- Aaru.Tests/Filesystems/AFFS/APM.cs | 6 +- Aaru.Tests/Filesystems/AFFS/MBR+RDB.cs | 6 +- Aaru.Tests/Filesystems/AFFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/AFFS/RDB.cs | 6 +- Aaru.Tests/Filesystems/AFFS/Whole.cs | 6 +- Aaru.Tests/Filesystems/AFFS2/APM.cs | 6 +- Aaru.Tests/Filesystems/AFFS2/RDB.cs | 6 +- Aaru.Tests/Filesystems/AFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/AFS/Whole.cs | 6 +- Aaru.Tests/Filesystems/AOFS/MBR+RDB.cs | 6 +- Aaru.Tests/Filesystems/AOFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/AOFS/RDB.cs | 6 +- Aaru.Tests/Filesystems/AOFS/Whole.cs | 6 +- Aaru.Tests/Filesystems/Atheos.cs | 6 +- Aaru.Tests/Filesystems/BeFS/APM.cs | 6 +- Aaru.Tests/Filesystems/BeFS/GPT.cs | 6 +- Aaru.Tests/Filesystems/BeFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/BeFS/Whole.cs | 6 +- Aaru.Tests/Filesystems/COHERENT/MBR.cs | 6 +- Aaru.Tests/Filesystems/COHERENT/Whole.cs | 6 +- Aaru.Tests/Filesystems/CPM/AMSDOS.cs | 6 +- Aaru.Tests/Filesystems/CPM/AmstradCPM.cs | 6 +- Aaru.Tests/Filesystems/CPM/AmstradCPMPlus.cs | 6 +- Aaru.Tests/Filesystems/CPM/Attache.cs | 6 +- Aaru.Tests/Filesystems/CPM/Bondwell.cs | 6 +- Aaru.Tests/Filesystems/CPM/Excalibur64.cs | 6 +- Aaru.Tests/Filesystems/CPM/KayproII.cs | 6 +- Aaru.Tests/Filesystems/CPM/ParaDOS.cs | 6 +- Aaru.Tests/Filesystems/CPM/Plus3DOS.cs | 6 +- Aaru.Tests/Filesystems/CPM/ROMDOS.cs | 6 +- .../Filesystems/CPM/SharpPersonalCPM.cs | 6 +- Aaru.Tests/Filesystems/CPM/XtalDOS.cs | 6 +- Aaru.Tests/Filesystems/DTFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/DTFS/Whole.cs | 6 +- Aaru.Tests/Filesystems/EAFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/EAFS/Whole.cs | 6 +- Aaru.Tests/Filesystems/F2FS.cs | 6 +- Aaru.Tests/Filesystems/FAT12/APM.cs | 6 +- Aaru.Tests/Filesystems/FAT12/GPT.cs | 6 +- Aaru.Tests/Filesystems/FAT12/Human.cs | 6 +- Aaru.Tests/Filesystems/FAT12/MBR.cs | 6 +- Aaru.Tests/Filesystems/FAT12/Whole.cs | 6 +- Aaru.Tests/Filesystems/FAT16/APM.cs | 6 +- Aaru.Tests/Filesystems/FAT16/Atari.cs | 6 +- Aaru.Tests/Filesystems/FAT16/GPT.cs | 6 +- Aaru.Tests/Filesystems/FAT16/Human.cs | 6 +- Aaru.Tests/Filesystems/FAT16/MBR.cs | 6 +- Aaru.Tests/Filesystems/FAT16/RDB.cs | 6 +- Aaru.Tests/Filesystems/FAT16/Whole.cs | 6 +- Aaru.Tests/Filesystems/FAT32/APM.cs | 6 +- Aaru.Tests/Filesystems/FAT32/GPT.cs | 6 +- Aaru.Tests/Filesystems/FAT32/MBR.cs | 6 +- Aaru.Tests/Filesystems/FAT32/Whole.cs | 6 +- Aaru.Tests/Filesystems/FATX/Xbox.cs | 6 +- Aaru.Tests/Filesystems/FATX/Xbox360.cs | 6 +- Aaru.Tests/Filesystems/HAMMER.cs | 6 +- Aaru.Tests/Filesystems/HFS+/APM.cs | 6 +- Aaru.Tests/Filesystems/HFS+/GPT.cs | 6 +- Aaru.Tests/Filesystems/HFS+/MBR.cs | 6 +- Aaru.Tests/Filesystems/HFS/APM.cs | 6 +- Aaru.Tests/Filesystems/HFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/HFS/Optical.cs | 6 +- Aaru.Tests/Filesystems/HFS/RDB.cs | 6 +- Aaru.Tests/Filesystems/HFS/Whole.cs | 6 +- Aaru.Tests/Filesystems/HFSX/APM.cs | 6 +- Aaru.Tests/Filesystems/HFSX/GPT.cs | 6 +- Aaru.Tests/Filesystems/HFSX/MBR.cs | 6 +- Aaru.Tests/Filesystems/HPFS.cs | 6 +- Aaru.Tests/Filesystems/HPOFS.cs | 6 +- Aaru.Tests/Filesystems/HTFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/HTFS/Whole.cs | 6 +- Aaru.Tests/Filesystems/ISO9660.cs | 6 +- Aaru.Tests/Filesystems/JFS2.cs | 6 +- Aaru.Tests/Filesystems/LisaFS.cs | 6 +- Aaru.Tests/Filesystems/Locus.cs | 6 +- Aaru.Tests/Filesystems/MFS.cs | 6 +- Aaru.Tests/Filesystems/MINIX/V1/MBR.cs | 6 +- Aaru.Tests/Filesystems/MINIX/V1/Whole.cs | 6 +- Aaru.Tests/Filesystems/MINIX/V2/MBR.cs | 6 +- Aaru.Tests/Filesystems/MINIX/V2/Whole.cs | 6 +- Aaru.Tests/Filesystems/MINIX/V3/MBR.cs | 6 +- Aaru.Tests/Filesystems/MINIX/V3/Whole.cs | 6 +- Aaru.Tests/Filesystems/NILFS2.cs | 6 +- Aaru.Tests/Filesystems/NTFS/GPT.cs | 6 +- Aaru.Tests/Filesystems/NTFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/PFS3/APM.cs | 6 +- Aaru.Tests/Filesystems/PFS3/RDB.cs | 6 +- Aaru.Tests/Filesystems/ProDOS/APM.cs | 6 +- Aaru.Tests/Filesystems/QNX4/MBR.cs | 6 +- Aaru.Tests/Filesystems/QNX4/Whole.cs | 6 +- Aaru.Tests/Filesystems/ReFS.cs | 6 +- .../Filesystems/ReadOnlyFilesystemTest.cs | 20 +- Aaru.Tests/Filesystems/Reiser3.cs | 6 +- Aaru.Tests/Filesystems/Reiser4.cs | 6 +- Aaru.Tests/Filesystems/SFS/APM.cs | 6 +- Aaru.Tests/Filesystems/SFS/MBR+RDB.cs | 6 +- Aaru.Tests/Filesystems/SFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/SFS/RDB.cs | 6 +- Aaru.Tests/Filesystems/SysV/MBR.cs | 6 +- Aaru.Tests/Filesystems/SysV/RDB.cs | 6 +- Aaru.Tests/Filesystems/SysV/Whole.cs | 6 +- Aaru.Tests/Filesystems/UDF/1.02/Whole.cs | 6 +- Aaru.Tests/Filesystems/UDF/1.50/Optical.cs | 6 +- Aaru.Tests/Filesystems/UDF/1.50/Whole.cs | 6 +- Aaru.Tests/Filesystems/UDF/2.00/Optical.cs | 6 +- Aaru.Tests/Filesystems/UDF/2.00/Whole.cs | 6 +- Aaru.Tests/Filesystems/UDF/2.01/Optical.cs | 6 +- Aaru.Tests/Filesystems/UDF/2.01/Whole.cs | 6 +- Aaru.Tests/Filesystems/UDF/2.50/Whole.cs | 6 +- Aaru.Tests/Filesystems/UDF/2.60/Whole.cs | 6 +- Aaru.Tests/Filesystems/UFS/APM.cs | 6 +- Aaru.Tests/Filesystems/UFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/UFS/NeXT Floppy.cs | 6 +- Aaru.Tests/Filesystems/UFS/NeXT.cs | 6 +- Aaru.Tests/Filesystems/UFS/RDB.cs | 6 +- Aaru.Tests/Filesystems/UFS/Sun i86.cs | 6 +- Aaru.Tests/Filesystems/UFS/Whole.cs | 6 +- Aaru.Tests/Filesystems/UNIXBFS/MBR.cs | 6 +- Aaru.Tests/Filesystems/UNIXBFS/RDB.cs | 6 +- Aaru.Tests/Filesystems/UNIXBFS/Whole.cs | 6 +- Aaru.Tests/Filesystems/XENIX/MBR.cs | 6 +- Aaru.Tests/Filesystems/XENIX/Whole.cs | 6 +- Aaru.Tests/Filesystems/XFS.cs | 6 +- Aaru.Tests/Filesystems/Xia.cs | 6 +- Aaru.Tests/Filesystems/ZFS.cs | 6 +- Aaru.Tests/Filesystems/btrfs.cs | 6 +- Aaru.Tests/Filesystems/exFAT/APM.cs | 6 +- Aaru.Tests/Filesystems/exFAT/GPT.cs | 6 +- Aaru.Tests/Filesystems/exFAT/MBR.cs | 6 +- Aaru.Tests/Filesystems/ext.cs | 6 +- Aaru.Tests/Filesystems/ext2.cs | 6 +- Aaru.Tests/Filters/BZip2.cs | 8 +- Aaru.Tests/Filters/GZip.cs | 8 +- Aaru.Tests/Filters/LZip.cs | 8 +- Aaru.Tests/Filters/XZ.cs | 8 +- Aaru.Tests/Helpers/Marshal.cs | 26 +- Aaru.Tests/Images/2MG.cs | 54 +- Aaru.Tests/Images/AaruFormat/Tape/V1.cs | 162 +- Aaru.Tests/Images/AaruFormat/V1.cs | 258 +- Aaru.Tests/Images/Alcohol120.cs | 264 +- Aaru.Tests/Images/Anex86.cs | 24 +- Aaru.Tests/Images/AppleDOS/DOS.cs | 12 +- Aaru.Tests/Images/AppleDOS/DOS32.cs | 12 +- Aaru.Tests/Images/AppleDOS/ProDOS.cs | 12 +- Aaru.Tests/Images/AppleNIB.cs | 18 +- Aaru.Tests/Images/Apridisk.cs | 30 +- Aaru.Tests/Images/BlindWrite4.cs | 150 +- Aaru.Tests/Images/BlindWrite5.cs | 174 +- Aaru.Tests/Images/BlindWrite6.cs | 96 +- Aaru.Tests/Images/BlindWrite7.cs | 42 +- Aaru.Tests/Images/CDRWin.cs | 180 +- Aaru.Tests/Images/CDRWin10.cs | 72 +- Aaru.Tests/Images/CPCDSK.cs | 84 +- Aaru.Tests/Images/CisCopy/Uncompressed.cs | 114 +- Aaru.Tests/Images/CloneCD.cs | 162 +- Aaru.Tests/Images/Commodore64/D64.cs | 6 +- Aaru.Tests/Images/Commodore64/D81.cs | 6 +- Aaru.Tests/Images/CopyQM.cs | 720 +-- Aaru.Tests/Images/CopyTape.cs | 162 +- Aaru.Tests/Images/D88.cs | 36 +- Aaru.Tests/Images/DiscJuggler.cs | 330 +- Aaru.Tests/Images/DiskCopy42.cs | 6 +- Aaru.Tests/Images/DiskCopy633/DiskCopy42.cs | 18 +- Aaru.Tests/Images/DiskCopy633/NDIF/ROCo.cs | 42 +- Aaru.Tests/Images/DiskCopy633/NDIF/RdWr.cs | 24 +- Aaru.Tests/Images/DiskCopy633/NDIF/Rdxx.cs | 24 +- Aaru.Tests/Images/DiskCopy65/UDCO.cs | 12 +- Aaru.Tests/Images/DiskCopy65/UDCo_obsolete.cs | 12 +- Aaru.Tests/Images/DiskCopy65/UDRAW.cs | 12 +- Aaru.Tests/Images/DiskCopy65/UDRO.cs | 12 +- Aaru.Tests/Images/DiskCopy65/UDRo_obsolete.cs | 12 +- Aaru.Tests/Images/DiskDupe.cs | 162 +- .../Images/DiskImagesFramework/DiskCopy42.cs | 18 +- .../Images/DiskImagesFramework/NDIF/ROCo.cs | 30 +- .../Images/DiskImagesFramework/NDIF/RdWr.cs | 30 +- .../Images/DiskImagesFramework/NDIF/Rdxx.cs | 30 +- .../Images/DiskImagesFramework/UDIF/IPOD.cs | 30 +- .../Images/DiskImagesFramework/UDIF/UDBZ.cs | 30 +- .../Images/DiskImagesFramework/UDIF/UDCO.cs | 30 +- .../Images/DiskImagesFramework/UDIF/UDRO.cs | 30 +- .../Images/DiskImagesFramework/UDIF/UDRW.cs | 30 +- .../Images/DiskImagesFramework/UDIF/UDTO.cs | 30 +- .../Images/DiskImagesFramework/UDIF/UDZO.cs | 30 +- .../Images/DiskImagesFramework/UDIF/UFBI.cs | 30 +- .../Images/DiskImagesFramework/UDIF/ULMO.cs | 6 +- Aaru.Tests/Images/DiskUtilities/ImageDisk.cs | 6 +- Aaru.Tests/Images/DiskUtilities/Raw.cs | 6 +- Aaru.Tests/Images/DriDiskCopy.cs | 1014 ++-- Aaru.Tests/Images/GameJack6.cs | 162 +- Aaru.Tests/Images/HDCopy.cs | 492 +- Aaru.Tests/Images/HxC/ImageDisk.cs | 48 +- Aaru.Tests/Images/HxC/Raw.cs | 54 +- Aaru.Tests/Images/HyperV.cs | 12 +- Aaru.Tests/Images/ImageDisk.cs | 756 +-- Aaru.Tests/Images/IsoBuster/Cuesheet.cs | 198 +- Aaru.Tests/Images/KryoFlux/Raw.cs | 6 +- Aaru.Tests/Images/Lisa/Raw.cs | 6 +- Aaru.Tests/Images/MAME/v1.cs | 6 +- Aaru.Tests/Images/MAME/v3.cs | 72 +- Aaru.Tests/Images/MAME/v4.cs | 108 +- Aaru.Tests/Images/MAME/v5/compressed.cs | 108 +- Aaru.Tests/Images/MAME/v5/uncompressed.cs | 108 +- Aaru.Tests/Images/MagicISO/Cuesheet.cs | 102 +- Aaru.Tests/Images/MagicISO/Nero.cs | 150 +- Aaru.Tests/Images/MaxiDisk.cs | 84 +- Aaru.Tests/Images/NHDr0.cs | 6 +- Aaru.Tests/Images/Nero/V1.cs | 264 +- Aaru.Tests/Images/Nero/V2.cs | 666 +-- Aaru.Tests/Images/PowerISO/Cuesheet.cs | 48 +- Aaru.Tests/Images/QEMU/HyperV.cs | 12 +- Aaru.Tests/Images/QEMU/Parallels.cs | 12 +- Aaru.Tests/Images/QEMU/QCOW.cs | 12 +- Aaru.Tests/Images/QEMU/QCOW2.cs | 18 +- Aaru.Tests/Images/QEMU/QCOW3.cs | 18 +- Aaru.Tests/Images/QEMU/QED.cs | 12 +- Aaru.Tests/Images/QEMU/Raw.cs | 12 +- Aaru.Tests/Images/QEMU/VMware5.cs | 12 +- Aaru.Tests/Images/QEMU/VMware6.cs | 12 +- Aaru.Tests/Images/QEMU/VirtualBox.cs | 12 +- Aaru.Tests/Images/QEMU/VirtualPC.cs | 24 +- Aaru.Tests/Images/RayDIM.cs | 996 ++-- Aaru.Tests/Images/RsIde.cs | 12 +- Aaru.Tests/Images/SaveDskF.cs | 366 +- Aaru.Tests/Images/ShrinkWrap/DiskCopy42.cs | 18 +- Aaru.Tests/Images/ShrinkWrap/DiskDup.cs | 24 +- Aaru.Tests/Images/ShrinkWrap/NDIF/ROCo.cs | 24 +- Aaru.Tests/Images/ShrinkWrap/NDIF/RdWr.cs | 24 +- Aaru.Tests/Images/ShrinkWrap/NDIF/Rdxx.cs | 24 +- Aaru.Tests/Images/ShrinkWrap/Raw.cs | 24 +- Aaru.Tests/Images/TeleDisk.cs | 258 +- Aaru.Tests/Images/Toast.cs | 186 +- Aaru.Tests/Images/UltraISO/Alcohol.cs | 102 +- Aaru.Tests/Images/UltraISO/CloneCD.cs | 66 +- Aaru.Tests/Images/UltraISO/Cuesheet.cs | 90 +- Aaru.Tests/Images/UltraISO/Nero.cs | 102 +- Aaru.Tests/Images/Virtual98.cs | 6 +- Aaru.Tests/Images/VirtualBox/VirtualPC.cs | 6 +- Aaru.Tests/Images/VirtualPC/Raw.cs | 12 +- Aaru.Tests/Images/VirtualPC/VirtualPC.cs | 30 +- Aaru.Tests/Images/cdrdao/cooked/nosub.cs | 60 +- Aaru.Tests/Images/cdrdao/cooked/rw.cs | 60 +- Aaru.Tests/Images/cdrdao/cooked/rw_raw.cs | 60 +- Aaru.Tests/Images/cdrdao/raw/nosub.cs | 60 +- Aaru.Tests/Images/cdrdao/raw/rw.cs | 60 +- Aaru.Tests/Images/cdrdao/raw/rw_raw.cs | 96 +- Aaru.Tests/Images/partclone.cs | 12 +- Aaru.Tests/Images/pce/DiskCopy42.cs | 24 +- Aaru.Tests/Images/pce/ImageDisk.cs | 54 +- Aaru.Tests/Images/pce/TeleDisk.cs | 54 +- Aaru.Tests/Images/pce/XDF.cs | 6 +- Aaru.Tests/Images/pce/raw.cs | 54 +- Aaru.Tests/Issues/448.cs | 12 +- Aaru.Tests/Issues/623.cs | 12 +- Aaru.Tests/Issues/624.cs | 12 +- Aaru.Tests/Issues/625.cs | 12 +- Aaru.Tests/Issues/FsExtractHashIssueTest.cs | 2 +- Aaru.Tests/Issues/FsExtractIssueTest.cs | 2 +- .../Issues/OpticalImageConvertIssueTest.cs | 9 +- Aaru.Tests/Partitions/Acorn.cs | 12 +- Aaru.Tests/Partitions/AppleMap.cs | 150 +- Aaru.Tests/Partitions/Atari.cs | 24 +- Aaru.Tests/Partitions/BSD.cs | 30 +- Aaru.Tests/Partitions/GPT.cs | 18 +- Aaru.Tests/Partitions/MBR.cs | 222 +- Aaru.Tests/Partitions/MINIX.cs | 12 +- Aaru.Tests/Partitions/PC98.cs | 36 +- Aaru.Tests/Partitions/RDB.cs | 24 +- Aaru.Tests/Partitions/SGI.cs | 18 +- Aaru.Tests/Partitions/Sun.cs | 18 +- Aaru.Tests/Partitions/VTOC.cs | 12 +- Aaru.Tests/Partitions/Xbox.cs | 12 +- .../WritableImages/AaruFormat/V1/FromAaru.cs | 12 +- Aaru.Tests/WritableImages/Alcohol/FromAaru.cs | 12 +- Aaru.Tests/WritableImages/CDRDAO/FromAaru.cs | 12 +- Aaru.Tests/WritableImages/CDRWin/FromAaru.cs | 12 +- Aaru.Tests/WritableImages/CloneCD/FromAaru.cs | 12 +- .../WritableOpticalMediaImageTest.cs | 9 +- Aaru.sln.DotSettings | 1 + Aaru/Commands/Archive/Extract.cs | 16 +- Aaru/Commands/Archive/Info.cs | 7 +- Aaru/Commands/Archive/List.cs | 14 +- Aaru/Commands/Device/DeviceReport.cs | 35 +- Aaru/Commands/Device/Info.cs | 7 +- Aaru/Commands/Filesystem/ExtractFiles.cs | 28 +- Aaru/Commands/Filesystem/Info.cs | 19 +- Aaru/Commands/Filesystem/Ls.cs | 28 +- Aaru/Commands/Image/Checksum.cs | 49 +- Aaru/Commands/Image/Convert.cs | 97 +- Aaru/Commands/Image/CreateSidecar.cs | 21 +- Aaru/Commands/Image/Decode.cs | 26 +- Aaru/Commands/Image/Entropy.cs | 17 +- Aaru/Commands/Image/Print.cs | 29 +- Aaru/Commands/Image/Verify.cs | 46 +- Aaru/Commands/Media/Dump.cs | 171 +- Aaru/Commands/Media/Info.cs | 7 +- Aaru/Commands/Media/Scan.cs | 17 +- Aaru/Main.cs | 19 +- 667 files changed, 12936 insertions(+), 13750 deletions(-) diff --git a/Aaru.Archives/Symbian/Files.cs b/Aaru.Archives/Symbian/Files.cs index 95b68435b..fca292e10 100644 --- a/Aaru.Archives/Symbian/Files.cs +++ b/Aaru.Archives/Symbian/Files.cs @@ -159,7 +159,7 @@ public sealed partial class Symbian if(_compressed) { if(_files[entryNumber].originalLength == 0) - stream = new MemoryStream(Array.Empty()); + stream = new MemoryStream([]); else { stream = new ForcedSeekStream(_files[entryNumber].originalLength, diff --git a/Aaru.Archives/Symbian/Info.cs b/Aaru.Archives/Symbian/Info.cs index 81d70ea3e..0c26390f6 100644 --- a/Aaru.Archives/Symbian/Info.cs +++ b/Aaru.Archives/Symbian/Info.cs @@ -305,13 +305,13 @@ public sealed partial class Symbian // description.AppendFormat("{0} = {1}", kvp.Key, kvp.Value).AppendLine(); // Set instance values - _files = new List(); - _conditions = new List(); + _files = []; + _conditions = []; uint currentFile = 0; offset = sh.files_ptr; var conditionLevel = 0; - _options = new List(); + _options = []; // Get only the options records do diff --git a/Aaru.Archives/Symbian/Open.cs b/Aaru.Archives/Symbian/Open.cs index c8df15dc7..a556c4215 100644 --- a/Aaru.Archives/Symbian/Open.cs +++ b/Aaru.Archives/Symbian/Open.cs @@ -125,9 +125,9 @@ public sealed partial class Symbian br.BaseStream.Seek(sh.lang_ptr, SeekOrigin.Begin); for(var i = 0; i < sh.languages; i++) languages.Add(((LanguageCodes)br.ReadUInt16()).ToString("G")); - _files = new List(); - _conditions = new List(); - _options = new List(); + _files = []; + _conditions = []; + _options = []; uint currentFile = 0; uint offset = sh.files_ptr; @@ -152,7 +152,7 @@ public sealed partial class Symbian // Files appear on .sis in the reverse order they should be processed _files.Reverse(); - List filesWithFixedFilenames = new(); + List filesWithFixedFilenames = []; foreach(DecodedFileRecord f in _files) { diff --git a/Aaru.Archives/Symbian/Xattrs.cs b/Aaru.Archives/Symbian/Xattrs.cs index d4d8883b3..e70a2595a 100644 --- a/Aaru.Archives/Symbian/Xattrs.cs +++ b/Aaru.Archives/Symbian/Xattrs.cs @@ -49,7 +49,7 @@ public sealed partial class Symbian if(entryNumber < 0 || entryNumber >= _files.Count) return ErrorNumber.OutOfRange; - xattrs = new List(); + xattrs = []; if(_files[entryNumber].mime is not null) xattrs.Add("org.iana.mime_type"); diff --git a/Aaru.Checksums/CRC16CCITTContext.cs b/Aaru.Checksums/CRC16CCITTContext.cs index 17d5d53d8..c779af1df 100644 --- a/Aaru.Checksums/CRC16CCITTContext.cs +++ b/Aaru.Checksums/CRC16CCITTContext.cs @@ -45,9 +45,8 @@ public sealed class CRC16CcittContext : Crc16Context /// CCITT CRC16 seed public const ushort CRC16_CCITT_SEED = 0x0000; static readonly ushort[][] _ccittCrc16Table = - { - new ushort[] - { + [ + [ 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, 0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, 0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, 0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, 0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, @@ -68,9 +67,8 @@ public sealed class CRC16CcittContext : Crc16Context 0x1AD0, 0x2AB3, 0x3A92, 0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9, 0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1, 0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8, 0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0 - }, - new ushort[] - { + ], + [ 0x0000, 0x3331, 0x6662, 0x5553, 0xCCC4, 0xFFF5, 0xAAA6, 0x9997, 0x89A9, 0xBA98, 0xEFCB, 0xDCFA, 0x456D, 0x765C, 0x230F, 0x103E, 0x0373, 0x3042, 0x6511, 0x5620, 0xCFB7, 0xFC86, 0xA9D5, 0x9AE4, 0x8ADA, 0xB9EB, 0xECB8, 0xDF89, 0x461E, 0x752F, 0x207C, 0x134D, 0x06E6, 0x35D7, 0x6084, 0x53B5, 0xCA22, 0xF913, 0xAC40, @@ -91,9 +89,8 @@ public sealed class CRC16CcittContext : Crc16Context 0x637B, 0x3628, 0x0519, 0x10B2, 0x2383, 0x76D0, 0x45E1, 0xDC76, 0xEF47, 0xBA14, 0x8925, 0x991B, 0xAA2A, 0xFF79, 0xCC48, 0x55DF, 0x66EE, 0x33BD, 0x008C, 0x13C1, 0x20F0, 0x75A3, 0x4692, 0xDF05, 0xEC34, 0xB967, 0x8A56, 0x9A68, 0xA959, 0xFC0A, 0xCF3B, 0x56AC, 0x659D, 0x30CE, 0x03FF - }, - new ushort[] - { + ], + [ 0x0000, 0x3730, 0x6E60, 0x5950, 0xDCC0, 0xEBF0, 0xB2A0, 0x8590, 0xA9A1, 0x9E91, 0xC7C1, 0xF0F1, 0x7561, 0x4251, 0x1B01, 0x2C31, 0x4363, 0x7453, 0x2D03, 0x1A33, 0x9FA3, 0xA893, 0xF1C3, 0xC6F3, 0xEAC2, 0xDDF2, 0x84A2, 0xB392, 0x3602, 0x0132, 0x5862, 0x6F52, 0x86C6, 0xB1F6, 0xE8A6, 0xDF96, 0x5A06, 0x6D36, 0x3466, @@ -114,9 +111,8 @@ public sealed class CRC16CcittContext : Crc16Context 0x27C5, 0x7E95, 0x49A5, 0xA031, 0x9701, 0xCE51, 0xF961, 0x7CF1, 0x4BC1, 0x1291, 0x25A1, 0x0990, 0x3EA0, 0x67F0, 0x50C0, 0xD550, 0xE260, 0xBB30, 0x8C00, 0xE352, 0xD462, 0x8D32, 0xBA02, 0x3F92, 0x08A2, 0x51F2, 0x66C2, 0x4AF3, 0x7DC3, 0x2493, 0x13A3, 0x9633, 0xA103, 0xF853, 0xCF63 - }, - new ushort[] - { + ], + [ 0x0000, 0x76B4, 0xED68, 0x9BDC, 0xCAF1, 0xBC45, 0x2799, 0x512D, 0x85C3, 0xF377, 0x68AB, 0x1E1F, 0x4F32, 0x3986, 0xA25A, 0xD4EE, 0x1BA7, 0x6D13, 0xF6CF, 0x807B, 0xD156, 0xA7E2, 0x3C3E, 0x4A8A, 0x9E64, 0xE8D0, 0x730C, 0x05B8, 0x5495, 0x2221, 0xB9FD, 0xCF49, 0x374E, 0x41FA, 0xDA26, 0xAC92, 0xFDBF, 0x8B0B, 0x10D7, @@ -137,9 +133,8 @@ public sealed class CRC16CcittContext : Crc16Context 0x9185, 0x0A59, 0x7CED, 0x84EA, 0xF25E, 0x6982, 0x1F36, 0x4E1B, 0x38AF, 0xA373, 0xD5C7, 0x0129, 0x779D, 0xEC41, 0x9AF5, 0xCBD8, 0xBD6C, 0x26B0, 0x5004, 0x9F4D, 0xE9F9, 0x7225, 0x0491, 0x55BC, 0x2308, 0xB8D4, 0xCE60, 0x1A8E, 0x6C3A, 0xF7E6, 0x8152, 0xD07F, 0xA6CB, 0x3D17, 0x4BA3 - }, - new ushort[] - { + ], + [ 0x0000, 0xAA51, 0x4483, 0xEED2, 0x8906, 0x2357, 0xCD85, 0x67D4, 0x022D, 0xA87C, 0x46AE, 0xECFF, 0x8B2B, 0x217A, 0xCFA8, 0x65F9, 0x045A, 0xAE0B, 0x40D9, 0xEA88, 0x8D5C, 0x270D, 0xC9DF, 0x638E, 0x0677, 0xAC26, 0x42F4, 0xE8A5, 0x8F71, 0x2520, 0xCBF2, 0x61A3, 0x08B4, 0xA2E5, 0x4C37, 0xE666, 0x81B2, 0x2BE3, 0xC531, @@ -160,9 +155,8 @@ public sealed class CRC16CcittContext : Crc16Context 0x1698, 0xF84A, 0x521B, 0x3B0C, 0x915D, 0x7F8F, 0xD5DE, 0xB20A, 0x185B, 0xF689, 0x5CD8, 0x3921, 0x9370, 0x7DA2, 0xD7F3, 0xB027, 0x1A76, 0xF4A4, 0x5EF5, 0x3F56, 0x9507, 0x7BD5, 0xD184, 0xB650, 0x1C01, 0xF2D3, 0x5882, 0x3D7B, 0x972A, 0x79F8, 0xD3A9, 0xB47D, 0x1E2C, 0xF0FE, 0x5AAF - }, - new ushort[] - { + ], + [ 0x0000, 0x45A0, 0x8B40, 0xCEE0, 0x06A1, 0x4301, 0x8DE1, 0xC841, 0x0D42, 0x48E2, 0x8602, 0xC3A2, 0x0BE3, 0x4E43, 0x80A3, 0xC503, 0x1A84, 0x5F24, 0x91C4, 0xD464, 0x1C25, 0x5985, 0x9765, 0xD2C5, 0x17C6, 0x5266, 0x9C86, 0xD926, 0x1167, 0x54C7, 0x9A27, 0xDF87, 0x3508, 0x70A8, 0xBE48, 0xFBE8, 0x33A9, 0x7609, 0xB8E9, @@ -183,9 +177,8 @@ public sealed class CRC16CcittContext : Crc16Context 0xEAF7, 0x2417, 0x61B7, 0x8B38, 0xCE98, 0x0078, 0x45D8, 0x8D99, 0xC839, 0x06D9, 0x4379, 0x867A, 0xC3DA, 0x0D3A, 0x489A, 0x80DB, 0xC57B, 0x0B9B, 0x4E3B, 0x91BC, 0xD41C, 0x1AFC, 0x5F5C, 0x971D, 0xD2BD, 0x1C5D, 0x59FD, 0x9CFE, 0xD95E, 0x17BE, 0x521E, 0x9A5F, 0xDFFF, 0x111F, 0x54BF - }, - new ushort[] - { + ], + [ 0x0000, 0xB861, 0x60E3, 0xD882, 0xC1C6, 0x79A7, 0xA125, 0x1944, 0x93AD, 0x2BCC, 0xF34E, 0x4B2F, 0x526B, 0xEA0A, 0x3288, 0x8AE9, 0x377B, 0x8F1A, 0x5798, 0xEFF9, 0xF6BD, 0x4EDC, 0x965E, 0x2E3F, 0xA4D6, 0x1CB7, 0xC435, 0x7C54, 0x6510, 0xDD71, 0x05F3, 0xBD92, 0x6EF6, 0xD697, 0x0E15, 0xB674, 0xAF30, 0x1751, 0xCFD3, @@ -206,9 +199,8 @@ public sealed class CRC16CcittContext : Crc16Context 0xAB64, 0x73E6, 0xCB87, 0x18E3, 0xA082, 0x7800, 0xC061, 0xD925, 0x6144, 0xB9C6, 0x01A7, 0x8B4E, 0x332F, 0xEBAD, 0x53CC, 0x4A88, 0xF2E9, 0x2A6B, 0x920A, 0x2F98, 0x97F9, 0x4F7B, 0xF71A, 0xEE5E, 0x563F, 0x8EBD, 0x36DC, 0xBC35, 0x0454, 0xDCD6, 0x64B7, 0x7DF3, 0xC592, 0x1D10, 0xA571 - }, - new ushort[] - { + ], + [ 0x0000, 0x47D3, 0x8FA6, 0xC875, 0x0F6D, 0x48BE, 0x80CB, 0xC718, 0x1EDA, 0x5909, 0x917C, 0xD6AF, 0x11B7, 0x5664, 0x9E11, 0xD9C2, 0x3DB4, 0x7A67, 0xB212, 0xF5C1, 0x32D9, 0x750A, 0xBD7F, 0xFAAC, 0x236E, 0x64BD, 0xACC8, 0xEB1B, 0x2C03, 0x6BD0, 0xA3A5, 0xE476, 0x7B68, 0x3CBB, 0xF4CE, 0xB31D, 0x7405, 0x33D6, 0xFBA3, @@ -229,8 +221,8 @@ public sealed class CRC16CcittContext : Crc16Context 0x6081, 0xA8F4, 0xEF27, 0x7039, 0x37EA, 0xFF9F, 0xB84C, 0x7F54, 0x3887, 0xF0F2, 0xB721, 0x6EE3, 0x2930, 0xE145, 0xA696, 0x618E, 0x265D, 0xEE28, 0xA9FB, 0x4D8D, 0x0A5E, 0xC22B, 0x85F8, 0x42E0, 0x0533, 0xCD46, 0x8A95, 0x5357, 0x1484, 0xDCF1, 0x9B22, 0x5C3A, 0x1BE9, 0xD39C, 0x944F - } - }; + ] + ]; /// Initializes an instance of the CRC16 with CCITT polynomial and seed. /// diff --git a/Aaru.Checksums/CRC16IBMContext.cs b/Aaru.Checksums/CRC16IBMContext.cs index 63e726159..c06c25e5e 100644 --- a/Aaru.Checksums/CRC16IBMContext.cs +++ b/Aaru.Checksums/CRC16IBMContext.cs @@ -46,9 +46,8 @@ public sealed class CRC16IbmContext : Crc16Context internal const ushort CRC16_IBM_SEED = 0x0000; static readonly ushort[][] _ibmCrc16Table = - { - new ushort[] - { + [ + [ 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, @@ -69,9 +68,8 @@ public sealed class CRC16IbmContext : Crc16Context 0x59C0, 0x5880, 0x9841, 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 - }, - new ushort[] - { + ], + [ 0x0000, 0x9001, 0x6001, 0xF000, 0xC002, 0x5003, 0xA003, 0x3002, 0xC007, 0x5006, 0xA006, 0x3007, 0x0005, 0x9004, 0x6004, 0xF005, 0xC00D, 0x500C, 0xA00C, 0x300D, 0x000F, 0x900E, 0x600E, 0xF00F, 0x000A, 0x900B, 0x600B, 0xF00A, 0xC008, 0x5009, 0xA009, 0x3008, 0xC019, 0x5018, 0xA018, 0x3019, 0x001B, 0x901A, 0x601A, @@ -92,9 +90,8 @@ public sealed class CRC16IbmContext : Crc16Context 0x5059, 0xA059, 0x3058, 0xC049, 0x5048, 0xA048, 0x3049, 0x004B, 0x904A, 0x604A, 0xF04B, 0x004E, 0x904F, 0x604F, 0xF04E, 0xC04C, 0x504D, 0xA04D, 0x304C, 0x0044, 0x9045, 0x6045, 0xF044, 0xC046, 0x5047, 0xA047, 0x3046, 0xC043, 0x5042, 0xA042, 0x3043, 0x0041, 0x9040, 0x6040, 0xF041 - }, - new ushort[] - { + ], + [ 0x0000, 0xC051, 0xC0A1, 0x00F0, 0xC141, 0x0110, 0x01E0, 0xC1B1, 0xC281, 0x02D0, 0x0220, 0xC271, 0x03C0, 0xC391, 0xC361, 0x0330, 0xC501, 0x0550, 0x05A0, 0xC5F1, 0x0440, 0xC411, 0xC4E1, 0x04B0, 0x0780, 0xC7D1, 0xC721, 0x0770, 0xC6C1, 0x0690, 0x0660, 0xC631, 0xCA01, 0x0A50, 0x0AA0, 0xCAF1, 0x0B40, 0xCB11, 0xCBE1, @@ -115,9 +112,8 @@ public sealed class CRC16IbmContext : Crc16Context 0x3A90, 0x3A60, 0xFA31, 0xF601, 0x3650, 0x36A0, 0xF6F1, 0x3740, 0xF711, 0xF7E1, 0x37B0, 0x3480, 0xF4D1, 0xF421, 0x3470, 0xF5C1, 0x3590, 0x3560, 0xF531, 0x3300, 0xF351, 0xF3A1, 0x33F0, 0xF241, 0x3210, 0x32E0, 0xF2B1, 0xF181, 0x31D0, 0x3120, 0xF171, 0x30C0, 0xF091, 0xF061, 0x3030 - }, - new ushort[] - { + ], + [ 0x0000, 0xFC01, 0xB801, 0x4400, 0x3001, 0xCC00, 0x8800, 0x7401, 0x6002, 0x9C03, 0xD803, 0x2402, 0x5003, 0xAC02, 0xE802, 0x1403, 0xC004, 0x3C05, 0x7805, 0x8404, 0xF005, 0x0C04, 0x4804, 0xB405, 0xA006, 0x5C07, 0x1807, 0xE406, 0x9007, 0x6C06, 0x2806, 0xD407, 0xC00B, 0x3C0A, 0x780A, 0x840B, 0xF00A, 0x0C0B, 0x480B, @@ -138,9 +134,8 @@ public sealed class CRC16IbmContext : Crc16Context 0x6C3A, 0x283A, 0xD43B, 0xC037, 0x3C36, 0x7836, 0x8437, 0xF036, 0x0C37, 0x4837, 0xB436, 0xA035, 0x5C34, 0x1834, 0xE435, 0x9034, 0x6C35, 0x2835, 0xD434, 0x0033, 0xFC32, 0xB832, 0x4433, 0x3032, 0xCC33, 0x8833, 0x7432, 0x6031, 0x9C30, 0xD830, 0x2431, 0x5030, 0xAC31, 0xE831, 0x1430 - }, - new ushort[] - { + ], + [ 0x0000, 0xC03D, 0xC079, 0x0044, 0xC0F1, 0x00CC, 0x0088, 0xC0B5, 0xC1E1, 0x01DC, 0x0198, 0xC1A5, 0x0110, 0xC12D, 0xC169, 0x0154, 0xC3C1, 0x03FC, 0x03B8, 0xC385, 0x0330, 0xC30D, 0xC349, 0x0374, 0x0220, 0xC21D, 0xC259, 0x0264, 0xC2D1, 0x02EC, 0x02A8, 0xC295, 0xC781, 0x07BC, 0x07F8, 0xC7C5, 0x0770, 0xC74D, 0xC709, @@ -161,9 +156,8 @@ public sealed class CRC16IbmContext : Crc16Context 0x13EC, 0x13A8, 0xD395, 0xD681, 0x16BC, 0x16F8, 0xD6C5, 0x1670, 0xD64D, 0xD609, 0x1634, 0x1760, 0xD75D, 0xD719, 0x1724, 0xD791, 0x17AC, 0x17E8, 0xD7D5, 0x1540, 0xD57D, 0xD539, 0x1504, 0xD5B1, 0x158C, 0x15C8, 0xD5F5, 0xD4A1, 0x149C, 0x14D8, 0xD4E5, 0x1450, 0xD46D, 0xD429, 0x1414 - }, - new ushort[] - { + ], + [ 0x0000, 0xD101, 0xE201, 0x3300, 0x8401, 0x5500, 0x6600, 0xB701, 0x4801, 0x9900, 0xAA00, 0x7B01, 0xCC00, 0x1D01, 0x2E01, 0xFF00, 0x9002, 0x4103, 0x7203, 0xA302, 0x1403, 0xC502, 0xF602, 0x2703, 0xD803, 0x0902, 0x3A02, 0xEB03, 0x5C02, 0x8D03, 0xBE03, 0x6F02, 0x6007, 0xB106, 0x8206, 0x5307, 0xE406, 0x3507, 0x0607, @@ -184,9 +178,8 @@ public sealed class CRC16IbmContext : Crc16Context 0x8D12, 0xBE12, 0x6F13, 0x6016, 0xB117, 0x8217, 0x5316, 0xE417, 0x3516, 0x0616, 0xD717, 0x2817, 0xF916, 0xCA16, 0x1B17, 0xAC16, 0x7D17, 0x4E17, 0x9F16, 0xF014, 0x2115, 0x1215, 0xC314, 0x7415, 0xA514, 0x9614, 0x4715, 0xB815, 0x6914, 0x5A14, 0x8B15, 0x3C14, 0xED15, 0xDE15, 0x0F14 - }, - new ushort[] - { + ], + [ 0x0000, 0xC010, 0xC023, 0x0033, 0xC045, 0x0055, 0x0066, 0xC076, 0xC089, 0x0099, 0x00AA, 0xC0BA, 0x00CC, 0xC0DC, 0xC0EF, 0x00FF, 0xC111, 0x0101, 0x0132, 0xC122, 0x0154, 0xC144, 0xC177, 0x0167, 0x0198, 0xC188, 0xC1BB, 0x01AB, 0xC1DD, 0x01CD, 0x01FE, 0xC1EE, 0xC221, 0x0231, 0x0202, 0xC212, 0x0264, 0xC274, 0xC247, @@ -207,9 +200,8 @@ public sealed class CRC16IbmContext : Crc16Context 0x0D0D, 0x0D3E, 0xCD2E, 0xCEE1, 0x0EF1, 0x0EC2, 0xCED2, 0x0EA4, 0xCEB4, 0xCE87, 0x0E97, 0x0E68, 0xCE78, 0xCE4B, 0x0E5B, 0xCE2D, 0x0E3D, 0x0E0E, 0xCE1E, 0x0FF0, 0xCFE0, 0xCFD3, 0x0FC3, 0xCFB5, 0x0FA5, 0x0F96, 0xCF86, 0xCF79, 0x0F69, 0x0F5A, 0xCF4A, 0x0F3C, 0xCF2C, 0xCF1F, 0x0F0F - }, - new ushort[] - { + ], + [ 0x0000, 0xCCC1, 0xD981, 0x1540, 0xF301, 0x3FC0, 0x2A80, 0xE641, 0xA601, 0x6AC0, 0x7F80, 0xB341, 0x5500, 0x99C1, 0x8C81, 0x4040, 0x0C01, 0xC0C0, 0xD580, 0x1941, 0xFF00, 0x33C1, 0x2681, 0xEA40, 0xAA00, 0x66C1, 0x7381, 0xBF40, 0x5901, 0x95C0, 0x8080, 0x4C41, 0x1802, 0xD4C3, 0xC183, 0x0D42, 0xEB03, 0x27C2, 0x3282, @@ -230,8 +222,8 @@ public sealed class CRC16IbmContext : Crc16Context 0xC5CC, 0xD08C, 0x1C4D, 0x480E, 0x84CF, 0x918F, 0x5D4E, 0xBB0F, 0x77CE, 0x628E, 0xAE4F, 0xEE0F, 0x22CE, 0x378E, 0xFB4F, 0x1D0E, 0xD1CF, 0xC48F, 0x084E, 0x440F, 0x88CE, 0x9D8E, 0x514F, 0xB70E, 0x7BCF, 0x6E8F, 0xA24E, 0xE20E, 0x2ECF, 0x3B8F, 0xF74E, 0x110F, 0xDDCE, 0xC88E, 0x044F - } - }; + ] + ]; /// Initializes an instance of the CRC16 with IBM polynomial and seed. /// diff --git a/Aaru.Checksums/CRC32/clmul.cs b/Aaru.Checksums/CRC32/clmul.cs index 41a0d3970..03a1e5d87 100644 --- a/Aaru.Checksums/CRC32/clmul.cs +++ b/Aaru.Checksums/CRC32/clmul.cs @@ -57,10 +57,10 @@ namespace Aaru.Checksums.CRC32; static class Clmul { static readonly uint[] _crcK = - { + [ 0xccaa009e, 0x00000000, /* rk1 */ 0x751997d0, 0x00000001, /* rk2 */ 0xccaa009e, 0x00000000, /* rk5 */ 0x63cd6124, 0x00000001, /* rk6 */ 0xf7011640, 0x00000001, /* rk7 */ 0xdb710640, 0x00000001 /* rk8 */ - }; + ]; [MethodImpl(MethodImplOptions.AggressiveInlining)] static void Fold4(ref Vector128 xmmCRC0, ref Vector128 xmmCRC1, ref Vector128 xmmCRC2, diff --git a/Aaru.Checksums/CRC32Context.cs b/Aaru.Checksums/CRC32Context.cs index 45cf7c4e7..0f21f068b 100644 --- a/Aaru.Checksums/CRC32Context.cs +++ b/Aaru.Checksums/CRC32Context.cs @@ -55,264 +55,280 @@ public sealed class Crc32Context : IChecksum const uint CRC32_ISO_SEED = 0xFFFFFFFF; internal static readonly uint[][] ISOCrc32Table = - { - new uint[] - { - 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, - 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, - 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, 0x646BA8C0, 0xFD62F97A, - 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, - 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, - 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, - 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, - 0xB6662D3D, 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, - 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, 0x6B6B51F4, - 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, - 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, - 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, - 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, - 0x206F85B3, 0xB966D409, 0xCE61E49F, 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, - 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, - 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, - 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, 0xFED41B76, - 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, - 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, - 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, - 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, - 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, - 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, - 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, - 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, - 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, - 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, - 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, - 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D - }, - new uint[] - { - 0x00000000, 0x191B3141, 0x32366282, 0x2B2D53C3, 0x646CC504, 0x7D77F445, 0x565AA786, 0x4F4196C7, 0xC8D98A08, - 0xD1C2BB49, 0xFAEFE88A, 0xE3F4D9CB, 0xACB54F0C, 0xB5AE7E4D, 0x9E832D8E, 0x87981CCF, 0x4AC21251, 0x53D92310, - 0x78F470D3, 0x61EF4192, 0x2EAED755, 0x37B5E614, 0x1C98B5D7, 0x05838496, 0x821B9859, 0x9B00A918, 0xB02DFADB, - 0xA936CB9A, 0xE6775D5D, 0xFF6C6C1C, 0xD4413FDF, 0xCD5A0E9E, 0x958424A2, 0x8C9F15E3, 0xA7B24620, 0xBEA97761, - 0xF1E8E1A6, 0xE8F3D0E7, 0xC3DE8324, 0xDAC5B265, 0x5D5DAEAA, 0x44469FEB, 0x6F6BCC28, 0x7670FD69, 0x39316BAE, - 0x202A5AEF, 0x0B07092C, 0x121C386D, 0xDF4636F3, 0xC65D07B2, 0xED705471, 0xF46B6530, 0xBB2AF3F7, 0xA231C2B6, - 0x891C9175, 0x9007A034, 0x179FBCFB, 0x0E848DBA, 0x25A9DE79, 0x3CB2EF38, 0x73F379FF, 0x6AE848BE, 0x41C51B7D, - 0x58DE2A3C, 0xF0794F05, 0xE9627E44, 0xC24F2D87, 0xDB541CC6, 0x94158A01, 0x8D0EBB40, 0xA623E883, 0xBF38D9C2, - 0x38A0C50D, 0x21BBF44C, 0x0A96A78F, 0x138D96CE, 0x5CCC0009, 0x45D73148, 0x6EFA628B, 0x77E153CA, 0xBABB5D54, - 0xA3A06C15, 0x888D3FD6, 0x91960E97, 0xDED79850, 0xC7CCA911, 0xECE1FAD2, 0xF5FACB93, 0x7262D75C, 0x6B79E61D, - 0x4054B5DE, 0x594F849F, 0x160E1258, 0x0F152319, 0x243870DA, 0x3D23419B, 0x65FD6BA7, 0x7CE65AE6, 0x57CB0925, - 0x4ED03864, 0x0191AEA3, 0x188A9FE2, 0x33A7CC21, 0x2ABCFD60, 0xAD24E1AF, 0xB43FD0EE, 0x9F12832D, 0x8609B26C, - 0xC94824AB, 0xD05315EA, 0xFB7E4629, 0xE2657768, 0x2F3F79F6, 0x362448B7, 0x1D091B74, 0x04122A35, 0x4B53BCF2, - 0x52488DB3, 0x7965DE70, 0x607EEF31, 0xE7E6F3FE, 0xFEFDC2BF, 0xD5D0917C, 0xCCCBA03D, 0x838A36FA, 0x9A9107BB, - 0xB1BC5478, 0xA8A76539, 0x3B83984B, 0x2298A90A, 0x09B5FAC9, 0x10AECB88, 0x5FEF5D4F, 0x46F46C0E, 0x6DD93FCD, - 0x74C20E8C, 0xF35A1243, 0xEA412302, 0xC16C70C1, 0xD8774180, 0x9736D747, 0x8E2DE606, 0xA500B5C5, 0xBC1B8484, - 0x71418A1A, 0x685ABB5B, 0x4377E898, 0x5A6CD9D9, 0x152D4F1E, 0x0C367E5F, 0x271B2D9C, 0x3E001CDD, 0xB9980012, - 0xA0833153, 0x8BAE6290, 0x92B553D1, 0xDDF4C516, 0xC4EFF457, 0xEFC2A794, 0xF6D996D5, 0xAE07BCE9, 0xB71C8DA8, - 0x9C31DE6B, 0x852AEF2A, 0xCA6B79ED, 0xD37048AC, 0xF85D1B6F, 0xE1462A2E, 0x66DE36E1, 0x7FC507A0, 0x54E85463, - 0x4DF36522, 0x02B2F3E5, 0x1BA9C2A4, 0x30849167, 0x299FA026, 0xE4C5AEB8, 0xFDDE9FF9, 0xD6F3CC3A, 0xCFE8FD7B, - 0x80A96BBC, 0x99B25AFD, 0xB29F093E, 0xAB84387F, 0x2C1C24B0, 0x350715F1, 0x1E2A4632, 0x07317773, 0x4870E1B4, - 0x516BD0F5, 0x7A468336, 0x635DB277, 0xCBFAD74E, 0xD2E1E60F, 0xF9CCB5CC, 0xE0D7848D, 0xAF96124A, 0xB68D230B, - 0x9DA070C8, 0x84BB4189, 0x03235D46, 0x1A386C07, 0x31153FC4, 0x280E0E85, 0x674F9842, 0x7E54A903, 0x5579FAC0, - 0x4C62CB81, 0x8138C51F, 0x9823F45E, 0xB30EA79D, 0xAA1596DC, 0xE554001B, 0xFC4F315A, 0xD7626299, 0xCE7953D8, - 0x49E14F17, 0x50FA7E56, 0x7BD72D95, 0x62CC1CD4, 0x2D8D8A13, 0x3496BB52, 0x1FBBE891, 0x06A0D9D0, 0x5E7EF3EC, - 0x4765C2AD, 0x6C48916E, 0x7553A02F, 0x3A1236E8, 0x230907A9, 0x0824546A, 0x113F652B, 0x96A779E4, 0x8FBC48A5, - 0xA4911B66, 0xBD8A2A27, 0xF2CBBCE0, 0xEBD08DA1, 0xC0FDDE62, 0xD9E6EF23, 0x14BCE1BD, 0x0DA7D0FC, 0x268A833F, - 0x3F91B27E, 0x70D024B9, 0x69CB15F8, 0x42E6463B, 0x5BFD777A, 0xDC656BB5, 0xC57E5AF4, 0xEE530937, 0xF7483876, - 0xB809AEB1, 0xA1129FF0, 0x8A3FCC33, 0x9324FD72 - }, - new uint[] - { - 0x00000000, 0x01C26A37, 0x0384D46E, 0x0246BE59, 0x0709A8DC, 0x06CBC2EB, 0x048D7CB2, 0x054F1685, 0x0E1351B8, - 0x0FD13B8F, 0x0D9785D6, 0x0C55EFE1, 0x091AF964, 0x08D89353, 0x0A9E2D0A, 0x0B5C473D, 0x1C26A370, 0x1DE4C947, - 0x1FA2771E, 0x1E601D29, 0x1B2F0BAC, 0x1AED619B, 0x18ABDFC2, 0x1969B5F5, 0x1235F2C8, 0x13F798FF, 0x11B126A6, - 0x10734C91, 0x153C5A14, 0x14FE3023, 0x16B88E7A, 0x177AE44D, 0x384D46E0, 0x398F2CD7, 0x3BC9928E, 0x3A0BF8B9, - 0x3F44EE3C, 0x3E86840B, 0x3CC03A52, 0x3D025065, 0x365E1758, 0x379C7D6F, 0x35DAC336, 0x3418A901, 0x3157BF84, - 0x3095D5B3, 0x32D36BEA, 0x331101DD, 0x246BE590, 0x25A98FA7, 0x27EF31FE, 0x262D5BC9, 0x23624D4C, 0x22A0277B, - 0x20E69922, 0x2124F315, 0x2A78B428, 0x2BBADE1F, 0x29FC6046, 0x283E0A71, 0x2D711CF4, 0x2CB376C3, 0x2EF5C89A, - 0x2F37A2AD, 0x709A8DC0, 0x7158E7F7, 0x731E59AE, 0x72DC3399, 0x7793251C, 0x76514F2B, 0x7417F172, 0x75D59B45, - 0x7E89DC78, 0x7F4BB64F, 0x7D0D0816, 0x7CCF6221, 0x798074A4, 0x78421E93, 0x7A04A0CA, 0x7BC6CAFD, 0x6CBC2EB0, - 0x6D7E4487, 0x6F38FADE, 0x6EFA90E9, 0x6BB5866C, 0x6A77EC5B, 0x68315202, 0x69F33835, 0x62AF7F08, 0x636D153F, - 0x612BAB66, 0x60E9C151, 0x65A6D7D4, 0x6464BDE3, 0x662203BA, 0x67E0698D, 0x48D7CB20, 0x4915A117, 0x4B531F4E, - 0x4A917579, 0x4FDE63FC, 0x4E1C09CB, 0x4C5AB792, 0x4D98DDA5, 0x46C49A98, 0x4706F0AF, 0x45404EF6, 0x448224C1, - 0x41CD3244, 0x400F5873, 0x4249E62A, 0x438B8C1D, 0x54F16850, 0x55330267, 0x5775BC3E, 0x56B7D609, 0x53F8C08C, - 0x523AAABB, 0x507C14E2, 0x51BE7ED5, 0x5AE239E8, 0x5B2053DF, 0x5966ED86, 0x58A487B1, 0x5DEB9134, 0x5C29FB03, - 0x5E6F455A, 0x5FAD2F6D, 0xE1351B80, 0xE0F771B7, 0xE2B1CFEE, 0xE373A5D9, 0xE63CB35C, 0xE7FED96B, 0xE5B86732, - 0xE47A0D05, 0xEF264A38, 0xEEE4200F, 0xECA29E56, 0xED60F461, 0xE82FE2E4, 0xE9ED88D3, 0xEBAB368A, 0xEA695CBD, - 0xFD13B8F0, 0xFCD1D2C7, 0xFE976C9E, 0xFF5506A9, 0xFA1A102C, 0xFBD87A1B, 0xF99EC442, 0xF85CAE75, 0xF300E948, - 0xF2C2837F, 0xF0843D26, 0xF1465711, 0xF4094194, 0xF5CB2BA3, 0xF78D95FA, 0xF64FFFCD, 0xD9785D60, 0xD8BA3757, - 0xDAFC890E, 0xDB3EE339, 0xDE71F5BC, 0xDFB39F8B, 0xDDF521D2, 0xDC374BE5, 0xD76B0CD8, 0xD6A966EF, 0xD4EFD8B6, - 0xD52DB281, 0xD062A404, 0xD1A0CE33, 0xD3E6706A, 0xD2241A5D, 0xC55EFE10, 0xC49C9427, 0xC6DA2A7E, 0xC7184049, - 0xC25756CC, 0xC3953CFB, 0xC1D382A2, 0xC011E895, 0xCB4DAFA8, 0xCA8FC59F, 0xC8C97BC6, 0xC90B11F1, 0xCC440774, - 0xCD866D43, 0xCFC0D31A, 0xCE02B92D, 0x91AF9640, 0x906DFC77, 0x922B422E, 0x93E92819, 0x96A63E9C, 0x976454AB, - 0x9522EAF2, 0x94E080C5, 0x9FBCC7F8, 0x9E7EADCF, 0x9C381396, 0x9DFA79A1, 0x98B56F24, 0x99770513, 0x9B31BB4A, - 0x9AF3D17D, 0x8D893530, 0x8C4B5F07, 0x8E0DE15E, 0x8FCF8B69, 0x8A809DEC, 0x8B42F7DB, 0x89044982, 0x88C623B5, - 0x839A6488, 0x82580EBF, 0x801EB0E6, 0x81DCDAD1, 0x8493CC54, 0x8551A663, 0x8717183A, 0x86D5720D, 0xA9E2D0A0, - 0xA820BA97, 0xAA6604CE, 0xABA46EF9, 0xAEEB787C, 0xAF29124B, 0xAD6FAC12, 0xACADC625, 0xA7F18118, 0xA633EB2F, - 0xA4755576, 0xA5B73F41, 0xA0F829C4, 0xA13A43F3, 0xA37CFDAA, 0xA2BE979D, 0xB5C473D0, 0xB40619E7, 0xB640A7BE, - 0xB782CD89, 0xB2CDDB0C, 0xB30FB13B, 0xB1490F62, 0xB08B6555, 0xBBD72268, 0xBA15485F, 0xB853F606, 0xB9919C31, - 0xBCDE8AB4, 0xBD1CE083, 0xBF5A5EDA, 0xBE9834ED - }, - new uint[] - { - 0x00000000, 0xB8BC6765, 0xAA09C88B, 0x12B5AFEE, 0x8F629757, 0x37DEF032, 0x256B5FDC, 0x9DD738B9, 0xC5B428EF, - 0x7D084F8A, 0x6FBDE064, 0xD7018701, 0x4AD6BFB8, 0xF26AD8DD, 0xE0DF7733, 0x58631056, 0x5019579F, 0xE8A530FA, - 0xFA109F14, 0x42ACF871, 0xDF7BC0C8, 0x67C7A7AD, 0x75720843, 0xCDCE6F26, 0x95AD7F70, 0x2D111815, 0x3FA4B7FB, - 0x8718D09E, 0x1ACFE827, 0xA2738F42, 0xB0C620AC, 0x087A47C9, 0xA032AF3E, 0x188EC85B, 0x0A3B67B5, 0xB28700D0, - 0x2F503869, 0x97EC5F0C, 0x8559F0E2, 0x3DE59787, 0x658687D1, 0xDD3AE0B4, 0xCF8F4F5A, 0x7733283F, 0xEAE41086, - 0x525877E3, 0x40EDD80D, 0xF851BF68, 0xF02BF8A1, 0x48979FC4, 0x5A22302A, 0xE29E574F, 0x7F496FF6, 0xC7F50893, - 0xD540A77D, 0x6DFCC018, 0x359FD04E, 0x8D23B72B, 0x9F9618C5, 0x272A7FA0, 0xBAFD4719, 0x0241207C, 0x10F48F92, - 0xA848E8F7, 0x9B14583D, 0x23A83F58, 0x311D90B6, 0x89A1F7D3, 0x1476CF6A, 0xACCAA80F, 0xBE7F07E1, 0x06C36084, - 0x5EA070D2, 0xE61C17B7, 0xF4A9B859, 0x4C15DF3C, 0xD1C2E785, 0x697E80E0, 0x7BCB2F0E, 0xC377486B, 0xCB0D0FA2, - 0x73B168C7, 0x6104C729, 0xD9B8A04C, 0x446F98F5, 0xFCD3FF90, 0xEE66507E, 0x56DA371B, 0x0EB9274D, 0xB6054028, - 0xA4B0EFC6, 0x1C0C88A3, 0x81DBB01A, 0x3967D77F, 0x2BD27891, 0x936E1FF4, 0x3B26F703, 0x839A9066, 0x912F3F88, - 0x299358ED, 0xB4446054, 0x0CF80731, 0x1E4DA8DF, 0xA6F1CFBA, 0xFE92DFEC, 0x462EB889, 0x549B1767, 0xEC277002, - 0x71F048BB, 0xC94C2FDE, 0xDBF98030, 0x6345E755, 0x6B3FA09C, 0xD383C7F9, 0xC1366817, 0x798A0F72, 0xE45D37CB, - 0x5CE150AE, 0x4E54FF40, 0xF6E89825, 0xAE8B8873, 0x1637EF16, 0x048240F8, 0xBC3E279D, 0x21E91F24, 0x99557841, - 0x8BE0D7AF, 0x335CB0CA, 0xED59B63B, 0x55E5D15E, 0x47507EB0, 0xFFEC19D5, 0x623B216C, 0xDA874609, 0xC832E9E7, - 0x708E8E82, 0x28ED9ED4, 0x9051F9B1, 0x82E4565F, 0x3A58313A, 0xA78F0983, 0x1F336EE6, 0x0D86C108, 0xB53AA66D, - 0xBD40E1A4, 0x05FC86C1, 0x1749292F, 0xAFF54E4A, 0x322276F3, 0x8A9E1196, 0x982BBE78, 0x2097D91D, 0x78F4C94B, - 0xC048AE2E, 0xD2FD01C0, 0x6A4166A5, 0xF7965E1C, 0x4F2A3979, 0x5D9F9697, 0xE523F1F2, 0x4D6B1905, 0xF5D77E60, - 0xE762D18E, 0x5FDEB6EB, 0xC2098E52, 0x7AB5E937, 0x680046D9, 0xD0BC21BC, 0x88DF31EA, 0x3063568F, 0x22D6F961, - 0x9A6A9E04, 0x07BDA6BD, 0xBF01C1D8, 0xADB46E36, 0x15080953, 0x1D724E9A, 0xA5CE29FF, 0xB77B8611, 0x0FC7E174, - 0x9210D9CD, 0x2AACBEA8, 0x38191146, 0x80A57623, 0xD8C66675, 0x607A0110, 0x72CFAEFE, 0xCA73C99B, 0x57A4F122, - 0xEF189647, 0xFDAD39A9, 0x45115ECC, 0x764DEE06, 0xCEF18963, 0xDC44268D, 0x64F841E8, 0xF92F7951, 0x41931E34, - 0x5326B1DA, 0xEB9AD6BF, 0xB3F9C6E9, 0x0B45A18C, 0x19F00E62, 0xA14C6907, 0x3C9B51BE, 0x842736DB, 0x96929935, - 0x2E2EFE50, 0x2654B999, 0x9EE8DEFC, 0x8C5D7112, 0x34E11677, 0xA9362ECE, 0x118A49AB, 0x033FE645, 0xBB838120, - 0xE3E09176, 0x5B5CF613, 0x49E959FD, 0xF1553E98, 0x6C820621, 0xD43E6144, 0xC68BCEAA, 0x7E37A9CF, 0xD67F4138, - 0x6EC3265D, 0x7C7689B3, 0xC4CAEED6, 0x591DD66F, 0xE1A1B10A, 0xF3141EE4, 0x4BA87981, 0x13CB69D7, 0xAB770EB2, - 0xB9C2A15C, 0x017EC639, 0x9CA9FE80, 0x241599E5, 0x36A0360B, 0x8E1C516E, 0x866616A7, 0x3EDA71C2, 0x2C6FDE2C, - 0x94D3B949, 0x090481F0, 0xB1B8E695, 0xA30D497B, 0x1BB12E1E, 0x43D23E48, 0xFB6E592D, 0xE9DBF6C3, 0x516791A6, - 0xCCB0A91F, 0x740CCE7A, 0x66B96194, 0xDE0506F1 - }, - new uint[] - { - 0x00000000, 0x3D6029B0, 0x7AC05360, 0x47A07AD0, 0xF580A6C0, 0xC8E08F70, 0x8F40F5A0, 0xB220DC10, 0x30704BC1, - 0x0D106271, 0x4AB018A1, 0x77D03111, 0xC5F0ED01, 0xF890C4B1, 0xBF30BE61, 0x825097D1, 0x60E09782, 0x5D80BE32, - 0x1A20C4E2, 0x2740ED52, 0x95603142, 0xA80018F2, 0xEFA06222, 0xD2C04B92, 0x5090DC43, 0x6DF0F5F3, 0x2A508F23, - 0x1730A693, 0xA5107A83, 0x98705333, 0xDFD029E3, 0xE2B00053, 0xC1C12F04, 0xFCA106B4, 0xBB017C64, 0x866155D4, - 0x344189C4, 0x0921A074, 0x4E81DAA4, 0x73E1F314, 0xF1B164C5, 0xCCD14D75, 0x8B7137A5, 0xB6111E15, 0x0431C205, - 0x3951EBB5, 0x7EF19165, 0x4391B8D5, 0xA121B886, 0x9C419136, 0xDBE1EBE6, 0xE681C256, 0x54A11E46, 0x69C137F6, - 0x2E614D26, 0x13016496, 0x9151F347, 0xAC31DAF7, 0xEB91A027, 0xD6F18997, 0x64D15587, 0x59B17C37, 0x1E1106E7, - 0x23712F57, 0x58F35849, 0x659371F9, 0x22330B29, 0x1F532299, 0xAD73FE89, 0x9013D739, 0xD7B3ADE9, 0xEAD38459, - 0x68831388, 0x55E33A38, 0x124340E8, 0x2F236958, 0x9D03B548, 0xA0639CF8, 0xE7C3E628, 0xDAA3CF98, 0x3813CFCB, - 0x0573E67B, 0x42D39CAB, 0x7FB3B51B, 0xCD93690B, 0xF0F340BB, 0xB7533A6B, 0x8A3313DB, 0x0863840A, 0x3503ADBA, - 0x72A3D76A, 0x4FC3FEDA, 0xFDE322CA, 0xC0830B7A, 0x872371AA, 0xBA43581A, 0x9932774D, 0xA4525EFD, 0xE3F2242D, - 0xDE920D9D, 0x6CB2D18D, 0x51D2F83D, 0x167282ED, 0x2B12AB5D, 0xA9423C8C, 0x9422153C, 0xD3826FEC, 0xEEE2465C, - 0x5CC29A4C, 0x61A2B3FC, 0x2602C92C, 0x1B62E09C, 0xF9D2E0CF, 0xC4B2C97F, 0x8312B3AF, 0xBE729A1F, 0x0C52460F, - 0x31326FBF, 0x7692156F, 0x4BF23CDF, 0xC9A2AB0E, 0xF4C282BE, 0xB362F86E, 0x8E02D1DE, 0x3C220DCE, 0x0142247E, - 0x46E25EAE, 0x7B82771E, 0xB1E6B092, 0x8C869922, 0xCB26E3F2, 0xF646CA42, 0x44661652, 0x79063FE2, 0x3EA64532, - 0x03C66C82, 0x8196FB53, 0xBCF6D2E3, 0xFB56A833, 0xC6368183, 0x74165D93, 0x49767423, 0x0ED60EF3, 0x33B62743, - 0xD1062710, 0xEC660EA0, 0xABC67470, 0x96A65DC0, 0x248681D0, 0x19E6A860, 0x5E46D2B0, 0x6326FB00, 0xE1766CD1, - 0xDC164561, 0x9BB63FB1, 0xA6D61601, 0x14F6CA11, 0x2996E3A1, 0x6E369971, 0x5356B0C1, 0x70279F96, 0x4D47B626, - 0x0AE7CCF6, 0x3787E546, 0x85A73956, 0xB8C710E6, 0xFF676A36, 0xC2074386, 0x4057D457, 0x7D37FDE7, 0x3A978737, - 0x07F7AE87, 0xB5D77297, 0x88B75B27, 0xCF1721F7, 0xF2770847, 0x10C70814, 0x2DA721A4, 0x6A075B74, 0x576772C4, - 0xE547AED4, 0xD8278764, 0x9F87FDB4, 0xA2E7D404, 0x20B743D5, 0x1DD76A65, 0x5A7710B5, 0x67173905, 0xD537E515, - 0xE857CCA5, 0xAFF7B675, 0x92979FC5, 0xE915E8DB, 0xD475C16B, 0x93D5BBBB, 0xAEB5920B, 0x1C954E1B, 0x21F567AB, - 0x66551D7B, 0x5B3534CB, 0xD965A31A, 0xE4058AAA, 0xA3A5F07A, 0x9EC5D9CA, 0x2CE505DA, 0x11852C6A, 0x562556BA, - 0x6B457F0A, 0x89F57F59, 0xB49556E9, 0xF3352C39, 0xCE550589, 0x7C75D999, 0x4115F029, 0x06B58AF9, 0x3BD5A349, - 0xB9853498, 0x84E51D28, 0xC34567F8, 0xFE254E48, 0x4C059258, 0x7165BBE8, 0x36C5C138, 0x0BA5E888, 0x28D4C7DF, - 0x15B4EE6F, 0x521494BF, 0x6F74BD0F, 0xDD54611F, 0xE03448AF, 0xA794327F, 0x9AF41BCF, 0x18A48C1E, 0x25C4A5AE, - 0x6264DF7E, 0x5F04F6CE, 0xED242ADE, 0xD044036E, 0x97E479BE, 0xAA84500E, 0x4834505D, 0x755479ED, 0x32F4033D, - 0x0F942A8D, 0xBDB4F69D, 0x80D4DF2D, 0xC774A5FD, 0xFA148C4D, 0x78441B9C, 0x4524322C, 0x028448FC, 0x3FE4614C, - 0x8DC4BD5C, 0xB0A494EC, 0xF704EE3C, 0xCA64C78C - }, - new uint[] - { - 0x00000000, 0xCB5CD3A5, 0x4DC8A10B, 0x869472AE, 0x9B914216, 0x50CD91B3, 0xD659E31D, 0x1D0530B8, 0xEC53826D, - 0x270F51C8, 0xA19B2366, 0x6AC7F0C3, 0x77C2C07B, 0xBC9E13DE, 0x3A0A6170, 0xF156B2D5, 0x03D6029B, 0xC88AD13E, - 0x4E1EA390, 0x85427035, 0x9847408D, 0x531B9328, 0xD58FE186, 0x1ED33223, 0xEF8580F6, 0x24D95353, 0xA24D21FD, - 0x6911F258, 0x7414C2E0, 0xBF481145, 0x39DC63EB, 0xF280B04E, 0x07AC0536, 0xCCF0D693, 0x4A64A43D, 0x81387798, - 0x9C3D4720, 0x57619485, 0xD1F5E62B, 0x1AA9358E, 0xEBFF875B, 0x20A354FE, 0xA6372650, 0x6D6BF5F5, 0x706EC54D, - 0xBB3216E8, 0x3DA66446, 0xF6FAB7E3, 0x047A07AD, 0xCF26D408, 0x49B2A6A6, 0x82EE7503, 0x9FEB45BB, 0x54B7961E, - 0xD223E4B0, 0x197F3715, 0xE82985C0, 0x23755665, 0xA5E124CB, 0x6EBDF76E, 0x73B8C7D6, 0xB8E41473, 0x3E7066DD, - 0xF52CB578, 0x0F580A6C, 0xC404D9C9, 0x4290AB67, 0x89CC78C2, 0x94C9487A, 0x5F959BDF, 0xD901E971, 0x125D3AD4, - 0xE30B8801, 0x28575BA4, 0xAEC3290A, 0x659FFAAF, 0x789ACA17, 0xB3C619B2, 0x35526B1C, 0xFE0EB8B9, 0x0C8E08F7, - 0xC7D2DB52, 0x4146A9FC, 0x8A1A7A59, 0x971F4AE1, 0x5C439944, 0xDAD7EBEA, 0x118B384F, 0xE0DD8A9A, 0x2B81593F, - 0xAD152B91, 0x6649F834, 0x7B4CC88C, 0xB0101B29, 0x36846987, 0xFDD8BA22, 0x08F40F5A, 0xC3A8DCFF, 0x453CAE51, - 0x8E607DF4, 0x93654D4C, 0x58399EE9, 0xDEADEC47, 0x15F13FE2, 0xE4A78D37, 0x2FFB5E92, 0xA96F2C3C, 0x6233FF99, - 0x7F36CF21, 0xB46A1C84, 0x32FE6E2A, 0xF9A2BD8F, 0x0B220DC1, 0xC07EDE64, 0x46EAACCA, 0x8DB67F6F, 0x90B34FD7, - 0x5BEF9C72, 0xDD7BEEDC, 0x16273D79, 0xE7718FAC, 0x2C2D5C09, 0xAAB92EA7, 0x61E5FD02, 0x7CE0CDBA, 0xB7BC1E1F, - 0x31286CB1, 0xFA74BF14, 0x1EB014D8, 0xD5ECC77D, 0x5378B5D3, 0x98246676, 0x852156CE, 0x4E7D856B, 0xC8E9F7C5, - 0x03B52460, 0xF2E396B5, 0x39BF4510, 0xBF2B37BE, 0x7477E41B, 0x6972D4A3, 0xA22E0706, 0x24BA75A8, 0xEFE6A60D, - 0x1D661643, 0xD63AC5E6, 0x50AEB748, 0x9BF264ED, 0x86F75455, 0x4DAB87F0, 0xCB3FF55E, 0x006326FB, 0xF135942E, - 0x3A69478B, 0xBCFD3525, 0x77A1E680, 0x6AA4D638, 0xA1F8059D, 0x276C7733, 0xEC30A496, 0x191C11EE, 0xD240C24B, - 0x54D4B0E5, 0x9F886340, 0x828D53F8, 0x49D1805D, 0xCF45F2F3, 0x04192156, 0xF54F9383, 0x3E134026, 0xB8873288, - 0x73DBE12D, 0x6EDED195, 0xA5820230, 0x2316709E, 0xE84AA33B, 0x1ACA1375, 0xD196C0D0, 0x5702B27E, 0x9C5E61DB, - 0x815B5163, 0x4A0782C6, 0xCC93F068, 0x07CF23CD, 0xF6999118, 0x3DC542BD, 0xBB513013, 0x700DE3B6, 0x6D08D30E, - 0xA65400AB, 0x20C07205, 0xEB9CA1A0, 0x11E81EB4, 0xDAB4CD11, 0x5C20BFBF, 0x977C6C1A, 0x8A795CA2, 0x41258F07, - 0xC7B1FDA9, 0x0CED2E0C, 0xFDBB9CD9, 0x36E74F7C, 0xB0733DD2, 0x7B2FEE77, 0x662ADECF, 0xAD760D6A, 0x2BE27FC4, - 0xE0BEAC61, 0x123E1C2F, 0xD962CF8A, 0x5FF6BD24, 0x94AA6E81, 0x89AF5E39, 0x42F38D9C, 0xC467FF32, 0x0F3B2C97, - 0xFE6D9E42, 0x35314DE7, 0xB3A53F49, 0x78F9ECEC, 0x65FCDC54, 0xAEA00FF1, 0x28347D5F, 0xE368AEFA, 0x16441B82, - 0xDD18C827, 0x5B8CBA89, 0x90D0692C, 0x8DD55994, 0x46898A31, 0xC01DF89F, 0x0B412B3A, 0xFA1799EF, 0x314B4A4A, - 0xB7DF38E4, 0x7C83EB41, 0x6186DBF9, 0xAADA085C, 0x2C4E7AF2, 0xE712A957, 0x15921919, 0xDECECABC, 0x585AB812, - 0x93066BB7, 0x8E035B0F, 0x455F88AA, 0xC3CBFA04, 0x089729A1, 0xF9C19B74, 0x329D48D1, 0xB4093A7F, 0x7F55E9DA, - 0x6250D962, 0xA90C0AC7, 0x2F987869, 0xE4C4ABCC - }, - new uint[] - { - 0x00000000, 0xA6770BB4, 0x979F1129, 0x31E81A9D, 0xF44F2413, 0x52382FA7, 0x63D0353A, 0xC5A73E8E, 0x33EF4E67, - 0x959845D3, 0xA4705F4E, 0x020754FA, 0xC7A06A74, 0x61D761C0, 0x503F7B5D, 0xF64870E9, 0x67DE9CCE, 0xC1A9977A, - 0xF0418DE7, 0x56368653, 0x9391B8DD, 0x35E6B369, 0x040EA9F4, 0xA279A240, 0x5431D2A9, 0xF246D91D, 0xC3AEC380, - 0x65D9C834, 0xA07EF6BA, 0x0609FD0E, 0x37E1E793, 0x9196EC27, 0xCFBD399C, 0x69CA3228, 0x582228B5, 0xFE552301, - 0x3BF21D8F, 0x9D85163B, 0xAC6D0CA6, 0x0A1A0712, 0xFC5277FB, 0x5A257C4F, 0x6BCD66D2, 0xCDBA6D66, 0x081D53E8, - 0xAE6A585C, 0x9F8242C1, 0x39F54975, 0xA863A552, 0x0E14AEE6, 0x3FFCB47B, 0x998BBFCF, 0x5C2C8141, 0xFA5B8AF5, - 0xCBB39068, 0x6DC49BDC, 0x9B8CEB35, 0x3DFBE081, 0x0C13FA1C, 0xAA64F1A8, 0x6FC3CF26, 0xC9B4C492, 0xF85CDE0F, - 0x5E2BD5BB, 0x440B7579, 0xE27C7ECD, 0xD3946450, 0x75E36FE4, 0xB044516A, 0x16335ADE, 0x27DB4043, 0x81AC4BF7, - 0x77E43B1E, 0xD19330AA, 0xE07B2A37, 0x460C2183, 0x83AB1F0D, 0x25DC14B9, 0x14340E24, 0xB2430590, 0x23D5E9B7, - 0x85A2E203, 0xB44AF89E, 0x123DF32A, 0xD79ACDA4, 0x71EDC610, 0x4005DC8D, 0xE672D739, 0x103AA7D0, 0xB64DAC64, - 0x87A5B6F9, 0x21D2BD4D, 0xE47583C3, 0x42028877, 0x73EA92EA, 0xD59D995E, 0x8BB64CE5, 0x2DC14751, 0x1C295DCC, - 0xBA5E5678, 0x7FF968F6, 0xD98E6342, 0xE86679DF, 0x4E11726B, 0xB8590282, 0x1E2E0936, 0x2FC613AB, 0x89B1181F, - 0x4C162691, 0xEA612D25, 0xDB8937B8, 0x7DFE3C0C, 0xEC68D02B, 0x4A1FDB9F, 0x7BF7C102, 0xDD80CAB6, 0x1827F438, - 0xBE50FF8C, 0x8FB8E511, 0x29CFEEA5, 0xDF879E4C, 0x79F095F8, 0x48188F65, 0xEE6F84D1, 0x2BC8BA5F, 0x8DBFB1EB, - 0xBC57AB76, 0x1A20A0C2, 0x8816EAF2, 0x2E61E146, 0x1F89FBDB, 0xB9FEF06F, 0x7C59CEE1, 0xDA2EC555, 0xEBC6DFC8, - 0x4DB1D47C, 0xBBF9A495, 0x1D8EAF21, 0x2C66B5BC, 0x8A11BE08, 0x4FB68086, 0xE9C18B32, 0xD82991AF, 0x7E5E9A1B, - 0xEFC8763C, 0x49BF7D88, 0x78576715, 0xDE206CA1, 0x1B87522F, 0xBDF0599B, 0x8C184306, 0x2A6F48B2, 0xDC27385B, - 0x7A5033EF, 0x4BB82972, 0xEDCF22C6, 0x28681C48, 0x8E1F17FC, 0xBFF70D61, 0x198006D5, 0x47ABD36E, 0xE1DCD8DA, - 0xD034C247, 0x7643C9F3, 0xB3E4F77D, 0x1593FCC9, 0x247BE654, 0x820CEDE0, 0x74449D09, 0xD23396BD, 0xE3DB8C20, - 0x45AC8794, 0x800BB91A, 0x267CB2AE, 0x1794A833, 0xB1E3A387, 0x20754FA0, 0x86024414, 0xB7EA5E89, 0x119D553D, - 0xD43A6BB3, 0x724D6007, 0x43A57A9A, 0xE5D2712E, 0x139A01C7, 0xB5ED0A73, 0x840510EE, 0x22721B5A, 0xE7D525D4, - 0x41A22E60, 0x704A34FD, 0xD63D3F49, 0xCC1D9F8B, 0x6A6A943F, 0x5B828EA2, 0xFDF58516, 0x3852BB98, 0x9E25B02C, - 0xAFCDAAB1, 0x09BAA105, 0xFFF2D1EC, 0x5985DA58, 0x686DC0C5, 0xCE1ACB71, 0x0BBDF5FF, 0xADCAFE4B, 0x9C22E4D6, - 0x3A55EF62, 0xABC30345, 0x0DB408F1, 0x3C5C126C, 0x9A2B19D8, 0x5F8C2756, 0xF9FB2CE2, 0xC813367F, 0x6E643DCB, - 0x982C4D22, 0x3E5B4696, 0x0FB35C0B, 0xA9C457BF, 0x6C636931, 0xCA146285, 0xFBFC7818, 0x5D8B73AC, 0x03A0A617, - 0xA5D7ADA3, 0x943FB73E, 0x3248BC8A, 0xF7EF8204, 0x519889B0, 0x6070932D, 0xC6079899, 0x304FE870, 0x9638E3C4, - 0xA7D0F959, 0x01A7F2ED, 0xC400CC63, 0x6277C7D7, 0x539FDD4A, 0xF5E8D6FE, 0x647E3AD9, 0xC209316D, 0xF3E12BF0, - 0x55962044, 0x90311ECA, 0x3646157E, 0x07AE0FE3, 0xA1D90457, 0x579174BE, 0xF1E67F0A, 0xC00E6597, 0x66796E23, - 0xA3DE50AD, 0x05A95B19, 0x34414184, 0x92364A30 - }, - new uint[] - { - 0x00000000, 0xCCAA009E, 0x4225077D, 0x8E8F07E3, 0x844A0EFA, 0x48E00E64, 0xC66F0987, 0x0AC50919, 0xD3E51BB5, - 0x1F4F1B2B, 0x91C01CC8, 0x5D6A1C56, 0x57AF154F, 0x9B0515D1, 0x158A1232, 0xD92012AC, 0x7CBB312B, 0xB01131B5, - 0x3E9E3656, 0xF23436C8, 0xF8F13FD1, 0x345B3F4F, 0xBAD438AC, 0x767E3832, 0xAF5E2A9E, 0x63F42A00, 0xED7B2DE3, - 0x21D12D7D, 0x2B142464, 0xE7BE24FA, 0x69312319, 0xA59B2387, 0xF9766256, 0x35DC62C8, 0xBB53652B, 0x77F965B5, - 0x7D3C6CAC, 0xB1966C32, 0x3F196BD1, 0xF3B36B4F, 0x2A9379E3, 0xE639797D, 0x68B67E9E, 0xA41C7E00, 0xAED97719, - 0x62737787, 0xECFC7064, 0x205670FA, 0x85CD537D, 0x496753E3, 0xC7E85400, 0x0B42549E, 0x01875D87, 0xCD2D5D19, - 0x43A25AFA, 0x8F085A64, 0x562848C8, 0x9A824856, 0x140D4FB5, 0xD8A74F2B, 0xD2624632, 0x1EC846AC, 0x9047414F, - 0x5CED41D1, 0x299DC2ED, 0xE537C273, 0x6BB8C590, 0xA712C50E, 0xADD7CC17, 0x617DCC89, 0xEFF2CB6A, 0x2358CBF4, - 0xFA78D958, 0x36D2D9C6, 0xB85DDE25, 0x74F7DEBB, 0x7E32D7A2, 0xB298D73C, 0x3C17D0DF, 0xF0BDD041, 0x5526F3C6, - 0x998CF358, 0x1703F4BB, 0xDBA9F425, 0xD16CFD3C, 0x1DC6FDA2, 0x9349FA41, 0x5FE3FADF, 0x86C3E873, 0x4A69E8ED, - 0xC4E6EF0E, 0x084CEF90, 0x0289E689, 0xCE23E617, 0x40ACE1F4, 0x8C06E16A, 0xD0EBA0BB, 0x1C41A025, 0x92CEA7C6, - 0x5E64A758, 0x54A1AE41, 0x980BAEDF, 0x1684A93C, 0xDA2EA9A2, 0x030EBB0E, 0xCFA4BB90, 0x412BBC73, 0x8D81BCED, - 0x8744B5F4, 0x4BEEB56A, 0xC561B289, 0x09CBB217, 0xAC509190, 0x60FA910E, 0xEE7596ED, 0x22DF9673, 0x281A9F6A, - 0xE4B09FF4, 0x6A3F9817, 0xA6959889, 0x7FB58A25, 0xB31F8ABB, 0x3D908D58, 0xF13A8DC6, 0xFBFF84DF, 0x37558441, - 0xB9DA83A2, 0x7570833C, 0x533B85DA, 0x9F918544, 0x111E82A7, 0xDDB48239, 0xD7718B20, 0x1BDB8BBE, 0x95548C5D, - 0x59FE8CC3, 0x80DE9E6F, 0x4C749EF1, 0xC2FB9912, 0x0E51998C, 0x04949095, 0xC83E900B, 0x46B197E8, 0x8A1B9776, - 0x2F80B4F1, 0xE32AB46F, 0x6DA5B38C, 0xA10FB312, 0xABCABA0B, 0x6760BA95, 0xE9EFBD76, 0x2545BDE8, 0xFC65AF44, - 0x30CFAFDA, 0xBE40A839, 0x72EAA8A7, 0x782FA1BE, 0xB485A120, 0x3A0AA6C3, 0xF6A0A65D, 0xAA4DE78C, 0x66E7E712, - 0xE868E0F1, 0x24C2E06F, 0x2E07E976, 0xE2ADE9E8, 0x6C22EE0B, 0xA088EE95, 0x79A8FC39, 0xB502FCA7, 0x3B8DFB44, - 0xF727FBDA, 0xFDE2F2C3, 0x3148F25D, 0xBFC7F5BE, 0x736DF520, 0xD6F6D6A7, 0x1A5CD639, 0x94D3D1DA, 0x5879D144, - 0x52BCD85D, 0x9E16D8C3, 0x1099DF20, 0xDC33DFBE, 0x0513CD12, 0xC9B9CD8C, 0x4736CA6F, 0x8B9CCAF1, 0x8159C3E8, - 0x4DF3C376, 0xC37CC495, 0x0FD6C40B, 0x7AA64737, 0xB60C47A9, 0x3883404A, 0xF42940D4, 0xFEEC49CD, 0x32464953, - 0xBCC94EB0, 0x70634E2E, 0xA9435C82, 0x65E95C1C, 0xEB665BFF, 0x27CC5B61, 0x2D095278, 0xE1A352E6, 0x6F2C5505, - 0xA386559B, 0x061D761C, 0xCAB77682, 0x44387161, 0x889271FF, 0x825778E6, 0x4EFD7878, 0xC0727F9B, 0x0CD87F05, - 0xD5F86DA9, 0x19526D37, 0x97DD6AD4, 0x5B776A4A, 0x51B26353, 0x9D1863CD, 0x1397642E, 0xDF3D64B0, 0x83D02561, - 0x4F7A25FF, 0xC1F5221C, 0x0D5F2282, 0x079A2B9B, 0xCB302B05, 0x45BF2CE6, 0x89152C78, 0x50353ED4, 0x9C9F3E4A, - 0x121039A9, 0xDEBA3937, 0xD47F302E, 0x18D530B0, 0x965A3753, 0x5AF037CD, 0xFF6B144A, 0x33C114D4, 0xBD4E1337, - 0x71E413A9, 0x7B211AB0, 0xB78B1A2E, 0x39041DCD, 0xF5AE1D53, 0x2C8E0FFF, 0xE0240F61, 0x6EAB0882, 0xA201081C, - 0xA8C40105, 0x646E019B, 0xEAE10678, 0x264B06E6 - } - }; + [ + [ + 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, + 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, + 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, + 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, + 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, + 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, + 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, + 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, + 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, + 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, + 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, + 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, + 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, + 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, + 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, + 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, + 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, + 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, + 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, + 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, + 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, + 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, + 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, + 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, + 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, + 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, + 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, + 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, + 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, + 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, + 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, + 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D + ], + [ + 0x00000000, 0x191B3141, 0x32366282, 0x2B2D53C3, 0x646CC504, 0x7D77F445, 0x565AA786, 0x4F4196C7, + 0xC8D98A08, 0xD1C2BB49, 0xFAEFE88A, 0xE3F4D9CB, 0xACB54F0C, 0xB5AE7E4D, 0x9E832D8E, 0x87981CCF, + 0x4AC21251, 0x53D92310, 0x78F470D3, 0x61EF4192, 0x2EAED755, 0x37B5E614, 0x1C98B5D7, 0x05838496, + 0x821B9859, 0x9B00A918, 0xB02DFADB, 0xA936CB9A, 0xE6775D5D, 0xFF6C6C1C, 0xD4413FDF, 0xCD5A0E9E, + 0x958424A2, 0x8C9F15E3, 0xA7B24620, 0xBEA97761, 0xF1E8E1A6, 0xE8F3D0E7, 0xC3DE8324, 0xDAC5B265, + 0x5D5DAEAA, 0x44469FEB, 0x6F6BCC28, 0x7670FD69, 0x39316BAE, 0x202A5AEF, 0x0B07092C, 0x121C386D, + 0xDF4636F3, 0xC65D07B2, 0xED705471, 0xF46B6530, 0xBB2AF3F7, 0xA231C2B6, 0x891C9175, 0x9007A034, + 0x179FBCFB, 0x0E848DBA, 0x25A9DE79, 0x3CB2EF38, 0x73F379FF, 0x6AE848BE, 0x41C51B7D, 0x58DE2A3C, + 0xF0794F05, 0xE9627E44, 0xC24F2D87, 0xDB541CC6, 0x94158A01, 0x8D0EBB40, 0xA623E883, 0xBF38D9C2, + 0x38A0C50D, 0x21BBF44C, 0x0A96A78F, 0x138D96CE, 0x5CCC0009, 0x45D73148, 0x6EFA628B, 0x77E153CA, + 0xBABB5D54, 0xA3A06C15, 0x888D3FD6, 0x91960E97, 0xDED79850, 0xC7CCA911, 0xECE1FAD2, 0xF5FACB93, + 0x7262D75C, 0x6B79E61D, 0x4054B5DE, 0x594F849F, 0x160E1258, 0x0F152319, 0x243870DA, 0x3D23419B, + 0x65FD6BA7, 0x7CE65AE6, 0x57CB0925, 0x4ED03864, 0x0191AEA3, 0x188A9FE2, 0x33A7CC21, 0x2ABCFD60, + 0xAD24E1AF, 0xB43FD0EE, 0x9F12832D, 0x8609B26C, 0xC94824AB, 0xD05315EA, 0xFB7E4629, 0xE2657768, + 0x2F3F79F6, 0x362448B7, 0x1D091B74, 0x04122A35, 0x4B53BCF2, 0x52488DB3, 0x7965DE70, 0x607EEF31, + 0xE7E6F3FE, 0xFEFDC2BF, 0xD5D0917C, 0xCCCBA03D, 0x838A36FA, 0x9A9107BB, 0xB1BC5478, 0xA8A76539, + 0x3B83984B, 0x2298A90A, 0x09B5FAC9, 0x10AECB88, 0x5FEF5D4F, 0x46F46C0E, 0x6DD93FCD, 0x74C20E8C, + 0xF35A1243, 0xEA412302, 0xC16C70C1, 0xD8774180, 0x9736D747, 0x8E2DE606, 0xA500B5C5, 0xBC1B8484, + 0x71418A1A, 0x685ABB5B, 0x4377E898, 0x5A6CD9D9, 0x152D4F1E, 0x0C367E5F, 0x271B2D9C, 0x3E001CDD, + 0xB9980012, 0xA0833153, 0x8BAE6290, 0x92B553D1, 0xDDF4C516, 0xC4EFF457, 0xEFC2A794, 0xF6D996D5, + 0xAE07BCE9, 0xB71C8DA8, 0x9C31DE6B, 0x852AEF2A, 0xCA6B79ED, 0xD37048AC, 0xF85D1B6F, 0xE1462A2E, + 0x66DE36E1, 0x7FC507A0, 0x54E85463, 0x4DF36522, 0x02B2F3E5, 0x1BA9C2A4, 0x30849167, 0x299FA026, + 0xE4C5AEB8, 0xFDDE9FF9, 0xD6F3CC3A, 0xCFE8FD7B, 0x80A96BBC, 0x99B25AFD, 0xB29F093E, 0xAB84387F, + 0x2C1C24B0, 0x350715F1, 0x1E2A4632, 0x07317773, 0x4870E1B4, 0x516BD0F5, 0x7A468336, 0x635DB277, + 0xCBFAD74E, 0xD2E1E60F, 0xF9CCB5CC, 0xE0D7848D, 0xAF96124A, 0xB68D230B, 0x9DA070C8, 0x84BB4189, + 0x03235D46, 0x1A386C07, 0x31153FC4, 0x280E0E85, 0x674F9842, 0x7E54A903, 0x5579FAC0, 0x4C62CB81, + 0x8138C51F, 0x9823F45E, 0xB30EA79D, 0xAA1596DC, 0xE554001B, 0xFC4F315A, 0xD7626299, 0xCE7953D8, + 0x49E14F17, 0x50FA7E56, 0x7BD72D95, 0x62CC1CD4, 0x2D8D8A13, 0x3496BB52, 0x1FBBE891, 0x06A0D9D0, + 0x5E7EF3EC, 0x4765C2AD, 0x6C48916E, 0x7553A02F, 0x3A1236E8, 0x230907A9, 0x0824546A, 0x113F652B, + 0x96A779E4, 0x8FBC48A5, 0xA4911B66, 0xBD8A2A27, 0xF2CBBCE0, 0xEBD08DA1, 0xC0FDDE62, 0xD9E6EF23, + 0x14BCE1BD, 0x0DA7D0FC, 0x268A833F, 0x3F91B27E, 0x70D024B9, 0x69CB15F8, 0x42E6463B, 0x5BFD777A, + 0xDC656BB5, 0xC57E5AF4, 0xEE530937, 0xF7483876, 0xB809AEB1, 0xA1129FF0, 0x8A3FCC33, 0x9324FD72 + ], + [ + 0x00000000, 0x01C26A37, 0x0384D46E, 0x0246BE59, 0x0709A8DC, 0x06CBC2EB, 0x048D7CB2, 0x054F1685, + 0x0E1351B8, 0x0FD13B8F, 0x0D9785D6, 0x0C55EFE1, 0x091AF964, 0x08D89353, 0x0A9E2D0A, 0x0B5C473D, + 0x1C26A370, 0x1DE4C947, 0x1FA2771E, 0x1E601D29, 0x1B2F0BAC, 0x1AED619B, 0x18ABDFC2, 0x1969B5F5, + 0x1235F2C8, 0x13F798FF, 0x11B126A6, 0x10734C91, 0x153C5A14, 0x14FE3023, 0x16B88E7A, 0x177AE44D, + 0x384D46E0, 0x398F2CD7, 0x3BC9928E, 0x3A0BF8B9, 0x3F44EE3C, 0x3E86840B, 0x3CC03A52, 0x3D025065, + 0x365E1758, 0x379C7D6F, 0x35DAC336, 0x3418A901, 0x3157BF84, 0x3095D5B3, 0x32D36BEA, 0x331101DD, + 0x246BE590, 0x25A98FA7, 0x27EF31FE, 0x262D5BC9, 0x23624D4C, 0x22A0277B, 0x20E69922, 0x2124F315, + 0x2A78B428, 0x2BBADE1F, 0x29FC6046, 0x283E0A71, 0x2D711CF4, 0x2CB376C3, 0x2EF5C89A, 0x2F37A2AD, + 0x709A8DC0, 0x7158E7F7, 0x731E59AE, 0x72DC3399, 0x7793251C, 0x76514F2B, 0x7417F172, 0x75D59B45, + 0x7E89DC78, 0x7F4BB64F, 0x7D0D0816, 0x7CCF6221, 0x798074A4, 0x78421E93, 0x7A04A0CA, 0x7BC6CAFD, + 0x6CBC2EB0, 0x6D7E4487, 0x6F38FADE, 0x6EFA90E9, 0x6BB5866C, 0x6A77EC5B, 0x68315202, 0x69F33835, + 0x62AF7F08, 0x636D153F, 0x612BAB66, 0x60E9C151, 0x65A6D7D4, 0x6464BDE3, 0x662203BA, 0x67E0698D, + 0x48D7CB20, 0x4915A117, 0x4B531F4E, 0x4A917579, 0x4FDE63FC, 0x4E1C09CB, 0x4C5AB792, 0x4D98DDA5, + 0x46C49A98, 0x4706F0AF, 0x45404EF6, 0x448224C1, 0x41CD3244, 0x400F5873, 0x4249E62A, 0x438B8C1D, + 0x54F16850, 0x55330267, 0x5775BC3E, 0x56B7D609, 0x53F8C08C, 0x523AAABB, 0x507C14E2, 0x51BE7ED5, + 0x5AE239E8, 0x5B2053DF, 0x5966ED86, 0x58A487B1, 0x5DEB9134, 0x5C29FB03, 0x5E6F455A, 0x5FAD2F6D, + 0xE1351B80, 0xE0F771B7, 0xE2B1CFEE, 0xE373A5D9, 0xE63CB35C, 0xE7FED96B, 0xE5B86732, 0xE47A0D05, + 0xEF264A38, 0xEEE4200F, 0xECA29E56, 0xED60F461, 0xE82FE2E4, 0xE9ED88D3, 0xEBAB368A, 0xEA695CBD, + 0xFD13B8F0, 0xFCD1D2C7, 0xFE976C9E, 0xFF5506A9, 0xFA1A102C, 0xFBD87A1B, 0xF99EC442, 0xF85CAE75, + 0xF300E948, 0xF2C2837F, 0xF0843D26, 0xF1465711, 0xF4094194, 0xF5CB2BA3, 0xF78D95FA, 0xF64FFFCD, + 0xD9785D60, 0xD8BA3757, 0xDAFC890E, 0xDB3EE339, 0xDE71F5BC, 0xDFB39F8B, 0xDDF521D2, 0xDC374BE5, + 0xD76B0CD8, 0xD6A966EF, 0xD4EFD8B6, 0xD52DB281, 0xD062A404, 0xD1A0CE33, 0xD3E6706A, 0xD2241A5D, + 0xC55EFE10, 0xC49C9427, 0xC6DA2A7E, 0xC7184049, 0xC25756CC, 0xC3953CFB, 0xC1D382A2, 0xC011E895, + 0xCB4DAFA8, 0xCA8FC59F, 0xC8C97BC6, 0xC90B11F1, 0xCC440774, 0xCD866D43, 0xCFC0D31A, 0xCE02B92D, + 0x91AF9640, 0x906DFC77, 0x922B422E, 0x93E92819, 0x96A63E9C, 0x976454AB, 0x9522EAF2, 0x94E080C5, + 0x9FBCC7F8, 0x9E7EADCF, 0x9C381396, 0x9DFA79A1, 0x98B56F24, 0x99770513, 0x9B31BB4A, 0x9AF3D17D, + 0x8D893530, 0x8C4B5F07, 0x8E0DE15E, 0x8FCF8B69, 0x8A809DEC, 0x8B42F7DB, 0x89044982, 0x88C623B5, + 0x839A6488, 0x82580EBF, 0x801EB0E6, 0x81DCDAD1, 0x8493CC54, 0x8551A663, 0x8717183A, 0x86D5720D, + 0xA9E2D0A0, 0xA820BA97, 0xAA6604CE, 0xABA46EF9, 0xAEEB787C, 0xAF29124B, 0xAD6FAC12, 0xACADC625, + 0xA7F18118, 0xA633EB2F, 0xA4755576, 0xA5B73F41, 0xA0F829C4, 0xA13A43F3, 0xA37CFDAA, 0xA2BE979D, + 0xB5C473D0, 0xB40619E7, 0xB640A7BE, 0xB782CD89, 0xB2CDDB0C, 0xB30FB13B, 0xB1490F62, 0xB08B6555, + 0xBBD72268, 0xBA15485F, 0xB853F606, 0xB9919C31, 0xBCDE8AB4, 0xBD1CE083, 0xBF5A5EDA, 0xBE9834ED + ], + [ + 0x00000000, 0xB8BC6765, 0xAA09C88B, 0x12B5AFEE, 0x8F629757, 0x37DEF032, 0x256B5FDC, 0x9DD738B9, + 0xC5B428EF, 0x7D084F8A, 0x6FBDE064, 0xD7018701, 0x4AD6BFB8, 0xF26AD8DD, 0xE0DF7733, 0x58631056, + 0x5019579F, 0xE8A530FA, 0xFA109F14, 0x42ACF871, 0xDF7BC0C8, 0x67C7A7AD, 0x75720843, 0xCDCE6F26, + 0x95AD7F70, 0x2D111815, 0x3FA4B7FB, 0x8718D09E, 0x1ACFE827, 0xA2738F42, 0xB0C620AC, 0x087A47C9, + 0xA032AF3E, 0x188EC85B, 0x0A3B67B5, 0xB28700D0, 0x2F503869, 0x97EC5F0C, 0x8559F0E2, 0x3DE59787, + 0x658687D1, 0xDD3AE0B4, 0xCF8F4F5A, 0x7733283F, 0xEAE41086, 0x525877E3, 0x40EDD80D, 0xF851BF68, + 0xF02BF8A1, 0x48979FC4, 0x5A22302A, 0xE29E574F, 0x7F496FF6, 0xC7F50893, 0xD540A77D, 0x6DFCC018, + 0x359FD04E, 0x8D23B72B, 0x9F9618C5, 0x272A7FA0, 0xBAFD4719, 0x0241207C, 0x10F48F92, 0xA848E8F7, + 0x9B14583D, 0x23A83F58, 0x311D90B6, 0x89A1F7D3, 0x1476CF6A, 0xACCAA80F, 0xBE7F07E1, 0x06C36084, + 0x5EA070D2, 0xE61C17B7, 0xF4A9B859, 0x4C15DF3C, 0xD1C2E785, 0x697E80E0, 0x7BCB2F0E, 0xC377486B, + 0xCB0D0FA2, 0x73B168C7, 0x6104C729, 0xD9B8A04C, 0x446F98F5, 0xFCD3FF90, 0xEE66507E, 0x56DA371B, + 0x0EB9274D, 0xB6054028, 0xA4B0EFC6, 0x1C0C88A3, 0x81DBB01A, 0x3967D77F, 0x2BD27891, 0x936E1FF4, + 0x3B26F703, 0x839A9066, 0x912F3F88, 0x299358ED, 0xB4446054, 0x0CF80731, 0x1E4DA8DF, 0xA6F1CFBA, + 0xFE92DFEC, 0x462EB889, 0x549B1767, 0xEC277002, 0x71F048BB, 0xC94C2FDE, 0xDBF98030, 0x6345E755, + 0x6B3FA09C, 0xD383C7F9, 0xC1366817, 0x798A0F72, 0xE45D37CB, 0x5CE150AE, 0x4E54FF40, 0xF6E89825, + 0xAE8B8873, 0x1637EF16, 0x048240F8, 0xBC3E279D, 0x21E91F24, 0x99557841, 0x8BE0D7AF, 0x335CB0CA, + 0xED59B63B, 0x55E5D15E, 0x47507EB0, 0xFFEC19D5, 0x623B216C, 0xDA874609, 0xC832E9E7, 0x708E8E82, + 0x28ED9ED4, 0x9051F9B1, 0x82E4565F, 0x3A58313A, 0xA78F0983, 0x1F336EE6, 0x0D86C108, 0xB53AA66D, + 0xBD40E1A4, 0x05FC86C1, 0x1749292F, 0xAFF54E4A, 0x322276F3, 0x8A9E1196, 0x982BBE78, 0x2097D91D, + 0x78F4C94B, 0xC048AE2E, 0xD2FD01C0, 0x6A4166A5, 0xF7965E1C, 0x4F2A3979, 0x5D9F9697, 0xE523F1F2, + 0x4D6B1905, 0xF5D77E60, 0xE762D18E, 0x5FDEB6EB, 0xC2098E52, 0x7AB5E937, 0x680046D9, 0xD0BC21BC, + 0x88DF31EA, 0x3063568F, 0x22D6F961, 0x9A6A9E04, 0x07BDA6BD, 0xBF01C1D8, 0xADB46E36, 0x15080953, + 0x1D724E9A, 0xA5CE29FF, 0xB77B8611, 0x0FC7E174, 0x9210D9CD, 0x2AACBEA8, 0x38191146, 0x80A57623, + 0xD8C66675, 0x607A0110, 0x72CFAEFE, 0xCA73C99B, 0x57A4F122, 0xEF189647, 0xFDAD39A9, 0x45115ECC, + 0x764DEE06, 0xCEF18963, 0xDC44268D, 0x64F841E8, 0xF92F7951, 0x41931E34, 0x5326B1DA, 0xEB9AD6BF, + 0xB3F9C6E9, 0x0B45A18C, 0x19F00E62, 0xA14C6907, 0x3C9B51BE, 0x842736DB, 0x96929935, 0x2E2EFE50, + 0x2654B999, 0x9EE8DEFC, 0x8C5D7112, 0x34E11677, 0xA9362ECE, 0x118A49AB, 0x033FE645, 0xBB838120, + 0xE3E09176, 0x5B5CF613, 0x49E959FD, 0xF1553E98, 0x6C820621, 0xD43E6144, 0xC68BCEAA, 0x7E37A9CF, + 0xD67F4138, 0x6EC3265D, 0x7C7689B3, 0xC4CAEED6, 0x591DD66F, 0xE1A1B10A, 0xF3141EE4, 0x4BA87981, + 0x13CB69D7, 0xAB770EB2, 0xB9C2A15C, 0x017EC639, 0x9CA9FE80, 0x241599E5, 0x36A0360B, 0x8E1C516E, + 0x866616A7, 0x3EDA71C2, 0x2C6FDE2C, 0x94D3B949, 0x090481F0, 0xB1B8E695, 0xA30D497B, 0x1BB12E1E, + 0x43D23E48, 0xFB6E592D, 0xE9DBF6C3, 0x516791A6, 0xCCB0A91F, 0x740CCE7A, 0x66B96194, 0xDE0506F1 + ], + [ + 0x00000000, 0x3D6029B0, 0x7AC05360, 0x47A07AD0, 0xF580A6C0, 0xC8E08F70, 0x8F40F5A0, 0xB220DC10, + 0x30704BC1, 0x0D106271, 0x4AB018A1, 0x77D03111, 0xC5F0ED01, 0xF890C4B1, 0xBF30BE61, 0x825097D1, + 0x60E09782, 0x5D80BE32, 0x1A20C4E2, 0x2740ED52, 0x95603142, 0xA80018F2, 0xEFA06222, 0xD2C04B92, + 0x5090DC43, 0x6DF0F5F3, 0x2A508F23, 0x1730A693, 0xA5107A83, 0x98705333, 0xDFD029E3, 0xE2B00053, + 0xC1C12F04, 0xFCA106B4, 0xBB017C64, 0x866155D4, 0x344189C4, 0x0921A074, 0x4E81DAA4, 0x73E1F314, + 0xF1B164C5, 0xCCD14D75, 0x8B7137A5, 0xB6111E15, 0x0431C205, 0x3951EBB5, 0x7EF19165, 0x4391B8D5, + 0xA121B886, 0x9C419136, 0xDBE1EBE6, 0xE681C256, 0x54A11E46, 0x69C137F6, 0x2E614D26, 0x13016496, + 0x9151F347, 0xAC31DAF7, 0xEB91A027, 0xD6F18997, 0x64D15587, 0x59B17C37, 0x1E1106E7, 0x23712F57, + 0x58F35849, 0x659371F9, 0x22330B29, 0x1F532299, 0xAD73FE89, 0x9013D739, 0xD7B3ADE9, 0xEAD38459, + 0x68831388, 0x55E33A38, 0x124340E8, 0x2F236958, 0x9D03B548, 0xA0639CF8, 0xE7C3E628, 0xDAA3CF98, + 0x3813CFCB, 0x0573E67B, 0x42D39CAB, 0x7FB3B51B, 0xCD93690B, 0xF0F340BB, 0xB7533A6B, 0x8A3313DB, + 0x0863840A, 0x3503ADBA, 0x72A3D76A, 0x4FC3FEDA, 0xFDE322CA, 0xC0830B7A, 0x872371AA, 0xBA43581A, + 0x9932774D, 0xA4525EFD, 0xE3F2242D, 0xDE920D9D, 0x6CB2D18D, 0x51D2F83D, 0x167282ED, 0x2B12AB5D, + 0xA9423C8C, 0x9422153C, 0xD3826FEC, 0xEEE2465C, 0x5CC29A4C, 0x61A2B3FC, 0x2602C92C, 0x1B62E09C, + 0xF9D2E0CF, 0xC4B2C97F, 0x8312B3AF, 0xBE729A1F, 0x0C52460F, 0x31326FBF, 0x7692156F, 0x4BF23CDF, + 0xC9A2AB0E, 0xF4C282BE, 0xB362F86E, 0x8E02D1DE, 0x3C220DCE, 0x0142247E, 0x46E25EAE, 0x7B82771E, + 0xB1E6B092, 0x8C869922, 0xCB26E3F2, 0xF646CA42, 0x44661652, 0x79063FE2, 0x3EA64532, 0x03C66C82, + 0x8196FB53, 0xBCF6D2E3, 0xFB56A833, 0xC6368183, 0x74165D93, 0x49767423, 0x0ED60EF3, 0x33B62743, + 0xD1062710, 0xEC660EA0, 0xABC67470, 0x96A65DC0, 0x248681D0, 0x19E6A860, 0x5E46D2B0, 0x6326FB00, + 0xE1766CD1, 0xDC164561, 0x9BB63FB1, 0xA6D61601, 0x14F6CA11, 0x2996E3A1, 0x6E369971, 0x5356B0C1, + 0x70279F96, 0x4D47B626, 0x0AE7CCF6, 0x3787E546, 0x85A73956, 0xB8C710E6, 0xFF676A36, 0xC2074386, + 0x4057D457, 0x7D37FDE7, 0x3A978737, 0x07F7AE87, 0xB5D77297, 0x88B75B27, 0xCF1721F7, 0xF2770847, + 0x10C70814, 0x2DA721A4, 0x6A075B74, 0x576772C4, 0xE547AED4, 0xD8278764, 0x9F87FDB4, 0xA2E7D404, + 0x20B743D5, 0x1DD76A65, 0x5A7710B5, 0x67173905, 0xD537E515, 0xE857CCA5, 0xAFF7B675, 0x92979FC5, + 0xE915E8DB, 0xD475C16B, 0x93D5BBBB, 0xAEB5920B, 0x1C954E1B, 0x21F567AB, 0x66551D7B, 0x5B3534CB, + 0xD965A31A, 0xE4058AAA, 0xA3A5F07A, 0x9EC5D9CA, 0x2CE505DA, 0x11852C6A, 0x562556BA, 0x6B457F0A, + 0x89F57F59, 0xB49556E9, 0xF3352C39, 0xCE550589, 0x7C75D999, 0x4115F029, 0x06B58AF9, 0x3BD5A349, + 0xB9853498, 0x84E51D28, 0xC34567F8, 0xFE254E48, 0x4C059258, 0x7165BBE8, 0x36C5C138, 0x0BA5E888, + 0x28D4C7DF, 0x15B4EE6F, 0x521494BF, 0x6F74BD0F, 0xDD54611F, 0xE03448AF, 0xA794327F, 0x9AF41BCF, + 0x18A48C1E, 0x25C4A5AE, 0x6264DF7E, 0x5F04F6CE, 0xED242ADE, 0xD044036E, 0x97E479BE, 0xAA84500E, + 0x4834505D, 0x755479ED, 0x32F4033D, 0x0F942A8D, 0xBDB4F69D, 0x80D4DF2D, 0xC774A5FD, 0xFA148C4D, + 0x78441B9C, 0x4524322C, 0x028448FC, 0x3FE4614C, 0x8DC4BD5C, 0xB0A494EC, 0xF704EE3C, 0xCA64C78C + ], + [ + 0x00000000, 0xCB5CD3A5, 0x4DC8A10B, 0x869472AE, 0x9B914216, 0x50CD91B3, 0xD659E31D, 0x1D0530B8, + 0xEC53826D, 0x270F51C8, 0xA19B2366, 0x6AC7F0C3, 0x77C2C07B, 0xBC9E13DE, 0x3A0A6170, 0xF156B2D5, + 0x03D6029B, 0xC88AD13E, 0x4E1EA390, 0x85427035, 0x9847408D, 0x531B9328, 0xD58FE186, 0x1ED33223, + 0xEF8580F6, 0x24D95353, 0xA24D21FD, 0x6911F258, 0x7414C2E0, 0xBF481145, 0x39DC63EB, 0xF280B04E, + 0x07AC0536, 0xCCF0D693, 0x4A64A43D, 0x81387798, 0x9C3D4720, 0x57619485, 0xD1F5E62B, 0x1AA9358E, + 0xEBFF875B, 0x20A354FE, 0xA6372650, 0x6D6BF5F5, 0x706EC54D, 0xBB3216E8, 0x3DA66446, 0xF6FAB7E3, + 0x047A07AD, 0xCF26D408, 0x49B2A6A6, 0x82EE7503, 0x9FEB45BB, 0x54B7961E, 0xD223E4B0, 0x197F3715, + 0xE82985C0, 0x23755665, 0xA5E124CB, 0x6EBDF76E, 0x73B8C7D6, 0xB8E41473, 0x3E7066DD, 0xF52CB578, + 0x0F580A6C, 0xC404D9C9, 0x4290AB67, 0x89CC78C2, 0x94C9487A, 0x5F959BDF, 0xD901E971, 0x125D3AD4, + 0xE30B8801, 0x28575BA4, 0xAEC3290A, 0x659FFAAF, 0x789ACA17, 0xB3C619B2, 0x35526B1C, 0xFE0EB8B9, + 0x0C8E08F7, 0xC7D2DB52, 0x4146A9FC, 0x8A1A7A59, 0x971F4AE1, 0x5C439944, 0xDAD7EBEA, 0x118B384F, + 0xE0DD8A9A, 0x2B81593F, 0xAD152B91, 0x6649F834, 0x7B4CC88C, 0xB0101B29, 0x36846987, 0xFDD8BA22, + 0x08F40F5A, 0xC3A8DCFF, 0x453CAE51, 0x8E607DF4, 0x93654D4C, 0x58399EE9, 0xDEADEC47, 0x15F13FE2, + 0xE4A78D37, 0x2FFB5E92, 0xA96F2C3C, 0x6233FF99, 0x7F36CF21, 0xB46A1C84, 0x32FE6E2A, 0xF9A2BD8F, + 0x0B220DC1, 0xC07EDE64, 0x46EAACCA, 0x8DB67F6F, 0x90B34FD7, 0x5BEF9C72, 0xDD7BEEDC, 0x16273D79, + 0xE7718FAC, 0x2C2D5C09, 0xAAB92EA7, 0x61E5FD02, 0x7CE0CDBA, 0xB7BC1E1F, 0x31286CB1, 0xFA74BF14, + 0x1EB014D8, 0xD5ECC77D, 0x5378B5D3, 0x98246676, 0x852156CE, 0x4E7D856B, 0xC8E9F7C5, 0x03B52460, + 0xF2E396B5, 0x39BF4510, 0xBF2B37BE, 0x7477E41B, 0x6972D4A3, 0xA22E0706, 0x24BA75A8, 0xEFE6A60D, + 0x1D661643, 0xD63AC5E6, 0x50AEB748, 0x9BF264ED, 0x86F75455, 0x4DAB87F0, 0xCB3FF55E, 0x006326FB, + 0xF135942E, 0x3A69478B, 0xBCFD3525, 0x77A1E680, 0x6AA4D638, 0xA1F8059D, 0x276C7733, 0xEC30A496, + 0x191C11EE, 0xD240C24B, 0x54D4B0E5, 0x9F886340, 0x828D53F8, 0x49D1805D, 0xCF45F2F3, 0x04192156, + 0xF54F9383, 0x3E134026, 0xB8873288, 0x73DBE12D, 0x6EDED195, 0xA5820230, 0x2316709E, 0xE84AA33B, + 0x1ACA1375, 0xD196C0D0, 0x5702B27E, 0x9C5E61DB, 0x815B5163, 0x4A0782C6, 0xCC93F068, 0x07CF23CD, + 0xF6999118, 0x3DC542BD, 0xBB513013, 0x700DE3B6, 0x6D08D30E, 0xA65400AB, 0x20C07205, 0xEB9CA1A0, + 0x11E81EB4, 0xDAB4CD11, 0x5C20BFBF, 0x977C6C1A, 0x8A795CA2, 0x41258F07, 0xC7B1FDA9, 0x0CED2E0C, + 0xFDBB9CD9, 0x36E74F7C, 0xB0733DD2, 0x7B2FEE77, 0x662ADECF, 0xAD760D6A, 0x2BE27FC4, 0xE0BEAC61, + 0x123E1C2F, 0xD962CF8A, 0x5FF6BD24, 0x94AA6E81, 0x89AF5E39, 0x42F38D9C, 0xC467FF32, 0x0F3B2C97, + 0xFE6D9E42, 0x35314DE7, 0xB3A53F49, 0x78F9ECEC, 0x65FCDC54, 0xAEA00FF1, 0x28347D5F, 0xE368AEFA, + 0x16441B82, 0xDD18C827, 0x5B8CBA89, 0x90D0692C, 0x8DD55994, 0x46898A31, 0xC01DF89F, 0x0B412B3A, + 0xFA1799EF, 0x314B4A4A, 0xB7DF38E4, 0x7C83EB41, 0x6186DBF9, 0xAADA085C, 0x2C4E7AF2, 0xE712A957, + 0x15921919, 0xDECECABC, 0x585AB812, 0x93066BB7, 0x8E035B0F, 0x455F88AA, 0xC3CBFA04, 0x089729A1, + 0xF9C19B74, 0x329D48D1, 0xB4093A7F, 0x7F55E9DA, 0x6250D962, 0xA90C0AC7, 0x2F987869, 0xE4C4ABCC + ], + [ + 0x00000000, 0xA6770BB4, 0x979F1129, 0x31E81A9D, 0xF44F2413, 0x52382FA7, 0x63D0353A, 0xC5A73E8E, + 0x33EF4E67, 0x959845D3, 0xA4705F4E, 0x020754FA, 0xC7A06A74, 0x61D761C0, 0x503F7B5D, 0xF64870E9, + 0x67DE9CCE, 0xC1A9977A, 0xF0418DE7, 0x56368653, 0x9391B8DD, 0x35E6B369, 0x040EA9F4, 0xA279A240, + 0x5431D2A9, 0xF246D91D, 0xC3AEC380, 0x65D9C834, 0xA07EF6BA, 0x0609FD0E, 0x37E1E793, 0x9196EC27, + 0xCFBD399C, 0x69CA3228, 0x582228B5, 0xFE552301, 0x3BF21D8F, 0x9D85163B, 0xAC6D0CA6, 0x0A1A0712, + 0xFC5277FB, 0x5A257C4F, 0x6BCD66D2, 0xCDBA6D66, 0x081D53E8, 0xAE6A585C, 0x9F8242C1, 0x39F54975, + 0xA863A552, 0x0E14AEE6, 0x3FFCB47B, 0x998BBFCF, 0x5C2C8141, 0xFA5B8AF5, 0xCBB39068, 0x6DC49BDC, + 0x9B8CEB35, 0x3DFBE081, 0x0C13FA1C, 0xAA64F1A8, 0x6FC3CF26, 0xC9B4C492, 0xF85CDE0F, 0x5E2BD5BB, + 0x440B7579, 0xE27C7ECD, 0xD3946450, 0x75E36FE4, 0xB044516A, 0x16335ADE, 0x27DB4043, 0x81AC4BF7, + 0x77E43B1E, 0xD19330AA, 0xE07B2A37, 0x460C2183, 0x83AB1F0D, 0x25DC14B9, 0x14340E24, 0xB2430590, + 0x23D5E9B7, 0x85A2E203, 0xB44AF89E, 0x123DF32A, 0xD79ACDA4, 0x71EDC610, 0x4005DC8D, 0xE672D739, + 0x103AA7D0, 0xB64DAC64, 0x87A5B6F9, 0x21D2BD4D, 0xE47583C3, 0x42028877, 0x73EA92EA, 0xD59D995E, + 0x8BB64CE5, 0x2DC14751, 0x1C295DCC, 0xBA5E5678, 0x7FF968F6, 0xD98E6342, 0xE86679DF, 0x4E11726B, + 0xB8590282, 0x1E2E0936, 0x2FC613AB, 0x89B1181F, 0x4C162691, 0xEA612D25, 0xDB8937B8, 0x7DFE3C0C, + 0xEC68D02B, 0x4A1FDB9F, 0x7BF7C102, 0xDD80CAB6, 0x1827F438, 0xBE50FF8C, 0x8FB8E511, 0x29CFEEA5, + 0xDF879E4C, 0x79F095F8, 0x48188F65, 0xEE6F84D1, 0x2BC8BA5F, 0x8DBFB1EB, 0xBC57AB76, 0x1A20A0C2, + 0x8816EAF2, 0x2E61E146, 0x1F89FBDB, 0xB9FEF06F, 0x7C59CEE1, 0xDA2EC555, 0xEBC6DFC8, 0x4DB1D47C, + 0xBBF9A495, 0x1D8EAF21, 0x2C66B5BC, 0x8A11BE08, 0x4FB68086, 0xE9C18B32, 0xD82991AF, 0x7E5E9A1B, + 0xEFC8763C, 0x49BF7D88, 0x78576715, 0xDE206CA1, 0x1B87522F, 0xBDF0599B, 0x8C184306, 0x2A6F48B2, + 0xDC27385B, 0x7A5033EF, 0x4BB82972, 0xEDCF22C6, 0x28681C48, 0x8E1F17FC, 0xBFF70D61, 0x198006D5, + 0x47ABD36E, 0xE1DCD8DA, 0xD034C247, 0x7643C9F3, 0xB3E4F77D, 0x1593FCC9, 0x247BE654, 0x820CEDE0, + 0x74449D09, 0xD23396BD, 0xE3DB8C20, 0x45AC8794, 0x800BB91A, 0x267CB2AE, 0x1794A833, 0xB1E3A387, + 0x20754FA0, 0x86024414, 0xB7EA5E89, 0x119D553D, 0xD43A6BB3, 0x724D6007, 0x43A57A9A, 0xE5D2712E, + 0x139A01C7, 0xB5ED0A73, 0x840510EE, 0x22721B5A, 0xE7D525D4, 0x41A22E60, 0x704A34FD, 0xD63D3F49, + 0xCC1D9F8B, 0x6A6A943F, 0x5B828EA2, 0xFDF58516, 0x3852BB98, 0x9E25B02C, 0xAFCDAAB1, 0x09BAA105, + 0xFFF2D1EC, 0x5985DA58, 0x686DC0C5, 0xCE1ACB71, 0x0BBDF5FF, 0xADCAFE4B, 0x9C22E4D6, 0x3A55EF62, + 0xABC30345, 0x0DB408F1, 0x3C5C126C, 0x9A2B19D8, 0x5F8C2756, 0xF9FB2CE2, 0xC813367F, 0x6E643DCB, + 0x982C4D22, 0x3E5B4696, 0x0FB35C0B, 0xA9C457BF, 0x6C636931, 0xCA146285, 0xFBFC7818, 0x5D8B73AC, + 0x03A0A617, 0xA5D7ADA3, 0x943FB73E, 0x3248BC8A, 0xF7EF8204, 0x519889B0, 0x6070932D, 0xC6079899, + 0x304FE870, 0x9638E3C4, 0xA7D0F959, 0x01A7F2ED, 0xC400CC63, 0x6277C7D7, 0x539FDD4A, 0xF5E8D6FE, + 0x647E3AD9, 0xC209316D, 0xF3E12BF0, 0x55962044, 0x90311ECA, 0x3646157E, 0x07AE0FE3, 0xA1D90457, + 0x579174BE, 0xF1E67F0A, 0xC00E6597, 0x66796E23, 0xA3DE50AD, 0x05A95B19, 0x34414184, 0x92364A30 + ], + [ + 0x00000000, 0xCCAA009E, 0x4225077D, 0x8E8F07E3, 0x844A0EFA, 0x48E00E64, 0xC66F0987, 0x0AC50919, + 0xD3E51BB5, 0x1F4F1B2B, 0x91C01CC8, 0x5D6A1C56, 0x57AF154F, 0x9B0515D1, 0x158A1232, 0xD92012AC, + 0x7CBB312B, 0xB01131B5, 0x3E9E3656, 0xF23436C8, 0xF8F13FD1, 0x345B3F4F, 0xBAD438AC, 0x767E3832, + 0xAF5E2A9E, 0x63F42A00, 0xED7B2DE3, 0x21D12D7D, 0x2B142464, 0xE7BE24FA, 0x69312319, 0xA59B2387, + 0xF9766256, 0x35DC62C8, 0xBB53652B, 0x77F965B5, 0x7D3C6CAC, 0xB1966C32, 0x3F196BD1, 0xF3B36B4F, + 0x2A9379E3, 0xE639797D, 0x68B67E9E, 0xA41C7E00, 0xAED97719, 0x62737787, 0xECFC7064, 0x205670FA, + 0x85CD537D, 0x496753E3, 0xC7E85400, 0x0B42549E, 0x01875D87, 0xCD2D5D19, 0x43A25AFA, 0x8F085A64, + 0x562848C8, 0x9A824856, 0x140D4FB5, 0xD8A74F2B, 0xD2624632, 0x1EC846AC, 0x9047414F, 0x5CED41D1, + 0x299DC2ED, 0xE537C273, 0x6BB8C590, 0xA712C50E, 0xADD7CC17, 0x617DCC89, 0xEFF2CB6A, 0x2358CBF4, + 0xFA78D958, 0x36D2D9C6, 0xB85DDE25, 0x74F7DEBB, 0x7E32D7A2, 0xB298D73C, 0x3C17D0DF, 0xF0BDD041, + 0x5526F3C6, 0x998CF358, 0x1703F4BB, 0xDBA9F425, 0xD16CFD3C, 0x1DC6FDA2, 0x9349FA41, 0x5FE3FADF, + 0x86C3E873, 0x4A69E8ED, 0xC4E6EF0E, 0x084CEF90, 0x0289E689, 0xCE23E617, 0x40ACE1F4, 0x8C06E16A, + 0xD0EBA0BB, 0x1C41A025, 0x92CEA7C6, 0x5E64A758, 0x54A1AE41, 0x980BAEDF, 0x1684A93C, 0xDA2EA9A2, + 0x030EBB0E, 0xCFA4BB90, 0x412BBC73, 0x8D81BCED, 0x8744B5F4, 0x4BEEB56A, 0xC561B289, 0x09CBB217, + 0xAC509190, 0x60FA910E, 0xEE7596ED, 0x22DF9673, 0x281A9F6A, 0xE4B09FF4, 0x6A3F9817, 0xA6959889, + 0x7FB58A25, 0xB31F8ABB, 0x3D908D58, 0xF13A8DC6, 0xFBFF84DF, 0x37558441, 0xB9DA83A2, 0x7570833C, + 0x533B85DA, 0x9F918544, 0x111E82A7, 0xDDB48239, 0xD7718B20, 0x1BDB8BBE, 0x95548C5D, 0x59FE8CC3, + 0x80DE9E6F, 0x4C749EF1, 0xC2FB9912, 0x0E51998C, 0x04949095, 0xC83E900B, 0x46B197E8, 0x8A1B9776, + 0x2F80B4F1, 0xE32AB46F, 0x6DA5B38C, 0xA10FB312, 0xABCABA0B, 0x6760BA95, 0xE9EFBD76, 0x2545BDE8, + 0xFC65AF44, 0x30CFAFDA, 0xBE40A839, 0x72EAA8A7, 0x782FA1BE, 0xB485A120, 0x3A0AA6C3, 0xF6A0A65D, + 0xAA4DE78C, 0x66E7E712, 0xE868E0F1, 0x24C2E06F, 0x2E07E976, 0xE2ADE9E8, 0x6C22EE0B, 0xA088EE95, + 0x79A8FC39, 0xB502FCA7, 0x3B8DFB44, 0xF727FBDA, 0xFDE2F2C3, 0x3148F25D, 0xBFC7F5BE, 0x736DF520, + 0xD6F6D6A7, 0x1A5CD639, 0x94D3D1DA, 0x5879D144, 0x52BCD85D, 0x9E16D8C3, 0x1099DF20, 0xDC33DFBE, + 0x0513CD12, 0xC9B9CD8C, 0x4736CA6F, 0x8B9CCAF1, 0x8159C3E8, 0x4DF3C376, 0xC37CC495, 0x0FD6C40B, + 0x7AA64737, 0xB60C47A9, 0x3883404A, 0xF42940D4, 0xFEEC49CD, 0x32464953, 0xBCC94EB0, 0x70634E2E, + 0xA9435C82, 0x65E95C1C, 0xEB665BFF, 0x27CC5B61, 0x2D095278, 0xE1A352E6, 0x6F2C5505, 0xA386559B, + 0x061D761C, 0xCAB77682, 0x44387161, 0x889271FF, 0x825778E6, 0x4EFD7878, 0xC0727F9B, 0x0CD87F05, + 0xD5F86DA9, 0x19526D37, 0x97DD6AD4, 0x5B776A4A, 0x51B26353, 0x9D1863CD, 0x1397642E, 0xDF3D64B0, + 0x83D02561, 0x4F7A25FF, 0xC1F5221C, 0x0D5F2282, 0x079A2B9B, 0xCB302B05, 0x45BF2CE6, 0x89152C78, + 0x50353ED4, 0x9C9F3E4A, 0x121039A9, 0xDEBA3937, 0xD47F302E, 0x18D530B0, 0x965A3753, 0x5AF037CD, + 0xFF6B144A, 0x33C114D4, 0xBD4E1337, 0x71E413A9, 0x7B211AB0, 0xB78B1A2E, 0x39041DCD, 0xF5AE1D53, + 0x2C8E0FFF, 0xE0240F61, 0x6EAB0882, 0xA201081C, 0xA8C40105, 0x646E019B, 0xEAE10678, 0x264B06E6 + ] + ]; readonly uint _finalSeed; readonly IntPtr _nativeContext; diff --git a/Aaru.Checksums/CRC64/clmul.cs b/Aaru.Checksums/CRC64/clmul.cs index 88fe505c1..018861e48 100644 --- a/Aaru.Checksums/CRC64/clmul.cs +++ b/Aaru.Checksums/CRC64/clmul.cs @@ -31,10 +31,10 @@ namespace Aaru.Checksums.CRC64; static class Clmul { static readonly byte[] _shuffleMasks = - { + [ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x8f, 0x8e, 0x8d, 0x8c, 0x8b, 0x8a, 0x89, 0x88, 0x87, 0x86, 0x85, 0x84, 0x83, 0x82, 0x81, 0x80 - }; + ]; [MethodImpl(MethodImplOptions.AggressiveInlining)] static void ShiftRight128(Vector128 initial, uint n, out Vector128 outLeft, diff --git a/Aaru.Checksums/CRC64Context.cs b/Aaru.Checksums/CRC64Context.cs index 228440566..ce0737785 100644 --- a/Aaru.Checksums/CRC64Context.cs +++ b/Aaru.Checksums/CRC64Context.cs @@ -56,9 +56,8 @@ public sealed class Crc64Context : IChecksum const ulong CRC64_ECMA_SEED = 0xFFFFFFFFFFFFFFFF; static readonly ulong[][] _ecmaCrc64Table = - { - new ulong[] - { + [ + [ 0x0000000000000000, 0xB32E4CBE03A75F6F, 0xF4843657A840A05B, 0x47AA7AE9ABE7FF34, 0x7BD0C384FF8F5E33, 0xC8FE8F3AFC28015C, 0x8F54F5D357CFFE68, 0x3C7AB96D5468A107, 0xF7A18709FF1EBC66, 0x448FCBB7FCB9E309, 0x0325B15E575E1C3D, 0xB00BFDE054F94352, 0x8C71448D0091E255, 0x3F5F08330336BD3A, 0x78F572DAA8D1420E, @@ -111,9 +110,8 @@ public sealed class Crc64Context : IChecksum 0xE388102D33392364, 0xA4226AC498DEDC50, 0x170C267A9B79833F, 0xDCD7181E300F9E5E, 0x6FF954A033A8C131, 0x28532E49984F3E05, 0x9B7D62F79BE8616A, 0xA707DB9ACF80C06D, 0x14299724CC279F02, 0x5383EDCD67C06036, 0xE0ADA17364673F59 - }, - new ulong[] - { + ], + [ 0x0000000000000000, 0x54E979925CD0F10D, 0xA9D2F324B9A1E21A, 0xFD3B8AB6E5711317, 0xC17D4962DC4DDAB1, 0x959430F0809D2BBC, 0x68AFBA4665EC38AB, 0x3C46C3D4393CC9A6, 0x10223DEE1795ABE7, 0x44CB447C4B455AEA, 0xB9F0CECAAE3449FD, 0xED19B758F2E4B8F0, 0xD15F748CCBD87156, 0x85B60D1E9708805B, 0x788D87A87279934C, @@ -166,9 +164,8 @@ public sealed class Crc64Context : IChecksum 0xE4B2222E9B192C23, 0x1989A8987E683F34, 0x4D60D10A22B8CE39, 0x61042F300C11AC78, 0x35ED56A250C15D75, 0xC8D6DC14B5B04E62, 0x9C3FA586E960BF6F, 0xA0796652D05C76C9, 0xF4901FC08C8C87C4, 0x09AB957669FD94D3, 0x5D42ECE4352D65DE - }, - new ulong[] - { + ], + [ 0x0000000000000000, 0x3F0BE14A916A6DCB, 0x7E17C29522D4DB96, 0x411C23DFB3BEB65D, 0xFC2F852A45A9B72C, 0xC3246460D4C3DAE7, 0x823847BF677D6CBA, 0xBD33A6F5F6170171, 0x6A87A57F245D70DD, 0x558C4435B5371D16, 0x149067EA0689AB4B, 0x2B9B86A097E3C680, 0x96A8205561F4C7F1, 0xA9A3C11FF09EAA3A, 0xE8BFE2C043201C67, @@ -221,9 +218,8 @@ public sealed class Crc64Context : IChecksum 0xBC798ABB271A2A8A, 0xFD65A96494A49CD7, 0xC26E482E05CEF11C, 0x15DA4BA4D78480B0, 0x2AD1AAEE46EEED7B, 0x6BCD8931F5505B26, 0x54C6687B643A36ED, 0xE9F5CE8E922D379C, 0xD6FE2FC403475A57, 0x97E20C1BB0F9EC0A, 0xA8E9ED51219381C1 - }, - new ulong[] - { + ], + [ 0x0000000000000000, 0x1DEE8A5E222CA1DC, 0x3BDD14BC445943B8, 0x26339EE26675E264, 0x77BA297888B28770, 0x6A54A326AA9E26AC, 0x4C673DC4CCEBC4C8, 0x5189B79AEEC76514, 0xEF7452F111650EE0, 0xF29AD8AF3349AF3C, 0xD4A9464D553C4D58, 0xC947CC137710EC84, 0x98CE7B8999D78990, 0x8520F1D7BBFB284C, 0xA3136F35DD8ECA28, @@ -276,8 +272,8 @@ public sealed class Crc64Context : IChecksum 0xCAF59F413BFE0955, 0xECC601A35D8BEB31, 0xF1288BFD7FA74AED, 0x4FD56E9680052119, 0x523BE4C8A22980C5, 0x74087A2AC45C62A1, 0x69E6F074E670C37D, 0x386F47EE08B7A669, 0x2581CDB02A9B07B5, 0x03B253524CEEE5D1, 0x1E5CD90C6EC2440D - } - }; + ] + ]; readonly ulong _finalSeed; readonly IntPtr _nativeContext; diff --git a/Aaru.Checksums/MD5Context.cs b/Aaru.Checksums/MD5Context.cs index 3104d7f78..3061b6dd0 100644 --- a/Aaru.Checksums/MD5Context.cs +++ b/Aaru.Checksums/MD5Context.cs @@ -73,7 +73,7 @@ public sealed class Md5Context : IChecksum /// Returns a byte array of the hash value. public byte[] Final() { - _provider.TransformFinalBlock(Array.Empty(), 0, 0); + _provider.TransformFinalBlock([], 0, 0); return _provider.Hash; } @@ -82,7 +82,7 @@ public sealed class Md5Context : IChecksum /// Returns a hexadecimal representation of the hash value. public string End() { - _provider.TransformFinalBlock(Array.Empty(), 0, 0); + _provider.TransformFinalBlock([], 0, 0); var md5Output = new StringBuilder(); if(_provider.Hash is null) return null; diff --git a/Aaru.Checksums/ReedSolomon.cs b/Aaru.Checksums/ReedSolomon.cs index 8e49d5812..8b4d811bf 100644 --- a/Aaru.Checksums/ReedSolomon.cs +++ b/Aaru.Checksums/ReedSolomon.cs @@ -92,66 +92,21 @@ public class ReedSolomon { _pp = m switch { - 2 => new[] - { - 1, 1, 1 - }, - 3 => new[] - { - 1, 1, 0, 1 - }, - 4 => new[] - { - 1, 1, 0, 0, 1 - }, - 5 => new[] - { - 1, 0, 1, 0, 0, 1 - }, - 6 => new[] - { - 1, 1, 0, 0, 0, 0, 1 - }, - 7 => new[] - { - 1, 0, 0, 1, 0, 0, 0, 1 - }, - 8 => new[] - { - 1, 0, 1, 1, 1, 0, 0, 0, 1 - }, - 9 => new[] - { - 1, 0, 0, 0, 1, 0, 0, 0, 0, 1 - }, - 10 => new[] - { - 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1 - }, - 11 => new[] - { - 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 - }, - 12 => new[] - { - 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1 - }, - 13 => new[] - { - 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 - }, - 14 => new[] - { - 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1 - }, - 15 => new[] - { - 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 - }, - 16 => new[] - { - 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1 - }, + 2 => [1, 1, 1], + 3 => [1, 1, 0, 1], + 4 => [1, 1, 0, 0, 1], + 5 => [1, 0, 1, 0, 0, 1], + 6 => [1, 1, 0, 0, 0, 0, 1], + 7 => [1, 0, 0, 1, 0, 0, 0, 1], + 8 => [1, 0, 1, 1, 1, 0, 0, 0, 1], + 9 => [1, 0, 0, 0, 1, 0, 0, 0, 0, 1], + 10 => [1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1], + 11 => [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1], + 12 => [1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1], + 13 => [1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1], + 14 => [1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1], + 15 => [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], + 16 => [1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1], _ => throw new ArgumentOutOfRangeException(nameof(m), Localization.m_must_be_between_2_and_16_inclusive) }; @@ -344,9 +299,8 @@ public class ReedSolomon for(i = _kk - 1; i >= 0; i--) { if(_mm != 8) - { - if(data[i] > _nn) return -1; /* Illegal symbol */ - } + if(data[i] > _nn) + return -1; /* Illegal symbol */ int feedback = _indexOf[data[i] ^ bb[_nn - _kk - 1]]; @@ -417,9 +371,8 @@ public class ReedSolomon for(i = _nn - 1; i >= 0; i--) { if(_mm != 8) - { - if(data[i] > _nn) return -1; /* Illegal symbol */ - } + if(data[i] > _nn) + return -1; /* Illegal symbol */ recd[i] = _indexOf[data[i]]; } @@ -434,9 +387,8 @@ public class ReedSolomon tmp = 0; for(j = 0; j < _nn; j++) - { - if(recd[j] != _a0) /* recd[j] in index form */ tmp ^= _alphaTo[Modnn(recd[j] + (B0 + i - 1) * j)]; - } + if(recd[j] != _a0) /* recd[j] in index form */ + tmp ^= _alphaTo[Modnn(recd[j] + (B0 + i - 1) * j)]; synError |= tmp; /* set flag if non-zero syndrome => * error */ @@ -527,9 +479,8 @@ public class ReedSolomon var discrR = 0; for(i = 0; i < r; i++) - { - if(lambda[i] != 0 && s[r - i] != _a0) discrR ^= _alphaTo[Modnn(_indexOf[lambda[i]] + s[r - i])]; - } + if(lambda[i] != 0 && s[r - i] != _a0) + discrR ^= _alphaTo[Modnn(_indexOf[lambda[i]] + s[r - i])]; discrR = _indexOf[discrR]; /* Index form */ @@ -635,9 +586,8 @@ public class ReedSolomon j = degLambda < i ? degLambda : i; for(; j >= 0; j--) - { - if(s[i + 1 - j] != _a0 && lambda[j] != _a0) tmp ^= _alphaTo[Modnn(s[i + 1 - j] + lambda[j])]; - } + if(s[i + 1 - j] != _a0 && lambda[j] != _a0) + tmp ^= _alphaTo[Modnn(s[i + 1 - j] + lambda[j])]; if(tmp != 0) degOmega = i; @@ -655,18 +605,16 @@ public class ReedSolomon var num1 = 0; for(i = degOmega; i >= 0; i--) - { - if(omega[i] != _a0) num1 ^= _alphaTo[Modnn(omega[i] + i * root[j])]; - } + if(omega[i] != _a0) + num1 ^= _alphaTo[Modnn(omega[i] + i * root[j])]; int num2 = _alphaTo[Modnn(root[j] * (B0 - 1) + _nn)]; var den = 0; /* lambda[i+1] for i even is the formal derivative lambda_pr of lambda[i] */ for(i = Min(degLambda, _nn - _kk - 1) & ~1; i >= 0; i -= 2) - { - if(lambda[i + 1] != _a0) den ^= _alphaTo[Modnn(lambda[i + 1] + i * root[j])]; - } + if(lambda[i + 1] != _a0) + den ^= _alphaTo[Modnn(lambda[i + 1] + i * root[j])]; if(den == 0) { diff --git a/Aaru.Checksums/SHA1Context.cs b/Aaru.Checksums/SHA1Context.cs index 8c2854167..e58096b61 100644 --- a/Aaru.Checksums/SHA1Context.cs +++ b/Aaru.Checksums/SHA1Context.cs @@ -77,7 +77,7 @@ public sealed class Sha1Context : IChecksum /// Returns a byte array of the hash value. public byte[] Final() { - _provider.TransformFinalBlock(Array.Empty(), 0, 0); + _provider.TransformFinalBlock([], 0, 0); return _provider.Hash; } @@ -86,7 +86,7 @@ public sealed class Sha1Context : IChecksum /// Returns a hexadecimal representation of the hash value. public string End() { - _provider.TransformFinalBlock(Array.Empty(), 0, 0); + _provider.TransformFinalBlock([], 0, 0); var sha1Output = new StringBuilder(); if(_provider.Hash is null) return null; diff --git a/Aaru.Checksums/SHA256Context.cs b/Aaru.Checksums/SHA256Context.cs index 123a97c69..ca66320d5 100644 --- a/Aaru.Checksums/SHA256Context.cs +++ b/Aaru.Checksums/SHA256Context.cs @@ -77,7 +77,7 @@ public sealed class Sha256Context : IChecksum /// Returns a byte array of the hash value. public byte[] Final() { - _provider.TransformFinalBlock(Array.Empty(), 0, 0); + _provider.TransformFinalBlock([], 0, 0); return _provider.Hash; } @@ -86,7 +86,7 @@ public sealed class Sha256Context : IChecksum /// Returns a hexadecimal representation of the hash value. public string End() { - _provider.TransformFinalBlock(Array.Empty(), 0, 0); + _provider.TransformFinalBlock([], 0, 0); var sha256Output = new StringBuilder(); if(_provider.Hash is null) return null; diff --git a/Aaru.Checksums/SHA384Context.cs b/Aaru.Checksums/SHA384Context.cs index 2a5456e3d..9d52ae6a2 100644 --- a/Aaru.Checksums/SHA384Context.cs +++ b/Aaru.Checksums/SHA384Context.cs @@ -78,7 +78,7 @@ public sealed class Sha384Context : IChecksum /// Returns a byte array of the hash value. public byte[] Final() { - _provider.TransformFinalBlock(Array.Empty(), 0, 0); + _provider.TransformFinalBlock([], 0, 0); return _provider.Hash; } @@ -87,7 +87,7 @@ public sealed class Sha384Context : IChecksum /// Returns a hexadecimal representation of the hash value. public string End() { - _provider.TransformFinalBlock(Array.Empty(), 0, 0); + _provider.TransformFinalBlock([], 0, 0); var sha384Output = new StringBuilder(); if(_provider.Hash is null) return null; diff --git a/Aaru.Checksums/SHA512Context.cs b/Aaru.Checksums/SHA512Context.cs index bddc12f7e..e0e7ab337 100644 --- a/Aaru.Checksums/SHA512Context.cs +++ b/Aaru.Checksums/SHA512Context.cs @@ -78,7 +78,7 @@ public sealed class Sha512Context : IChecksum /// Returns a byte array of the hash value. public byte[] Final() { - _provider.TransformFinalBlock(Array.Empty(), 0, 0); + _provider.TransformFinalBlock([], 0, 0); return _provider.Hash; } @@ -87,7 +87,7 @@ public sealed class Sha512Context : IChecksum /// Returns a hexadecimal representation of the hash value. public string End() { - _provider.TransformFinalBlock(Array.Empty(), 0, 0); + _provider.TransformFinalBlock([], 0, 0); var sha512Output = new StringBuilder(); if(_provider.Hash is null) return null; diff --git a/Aaru.CommonTypes/AaruMetadata/AaruMetadata.cs b/Aaru.CommonTypes/AaruMetadata/AaruMetadata.cs index 66b1d8954..01fb8cb2c 100644 --- a/Aaru.CommonTypes/AaruMetadata/AaruMetadata.cs +++ b/Aaru.CommonTypes/AaruMetadata/AaruMetadata.cs @@ -94,53 +94,53 @@ public class Metadata var metadata = new Metadata { - Developers = cicm.Developer is null ? null : new List(cicm.Developer), - Publishers = cicm.Publisher is null ? null : new List(cicm.Publisher), - Authors = cicm.Author is null ? null : new List(cicm.Author), - Performers = cicm.Performer is null ? null : new List(cicm.Performer), + Developers = cicm.Developer is null ? null : [..cicm.Developer], + Publishers = cicm.Publisher is null ? null : [..cicm.Publisher], + Authors = cicm.Author is null ? null : [..cicm.Author], + Performers = cicm.Performer is null ? null : [..cicm.Performer], Name = cicm.Name, Version = cicm.Version, Release = cicm.ReleaseTypeSpecified ? (ReleaseType)cicm.ReleaseType : null, ReleaseDate = cicm.ReleaseDateSpecified ? cicm.ReleaseDate : null, PartNumber = cicm.PartNumber, SerialNumber = cicm.SerialNumber, - Keywords = cicm.Keywords is null ? null : new List(cicm.Keywords), - Categories = cicm.Categories is null ? null : new List(cicm.Categories), - Subcategories = cicm.Subcategories is null ? null : new List(cicm.Subcategories), - Systems = cicm.Systems is null ? null : new List(cicm.Systems) + Keywords = cicm.Keywords is null ? null : [..cicm.Keywords], + Categories = cicm.Categories is null ? null : [..cicm.Categories], + Subcategories = cicm.Subcategories is null ? null : [..cicm.Subcategories], + Systems = cicm.Systems is null ? null : [..cicm.Systems] }; if(cicm.Barcodes is not null) { - metadata.Barcodes = new List(); + metadata.Barcodes = []; foreach(Schemas.BarcodeType code in cicm.Barcodes) metadata.Barcodes.Add(code); } if(cicm.Magazine is not null) { - metadata.Magazines = new List(); + metadata.Magazines = []; foreach(MagazineType magazine in cicm.Magazine) metadata.Magazines.Add(magazine); } if(cicm.Book is not null) { - metadata.Books = new List(); + metadata.Books = []; foreach(BookType book in cicm.Book) metadata.Books.Add(book); } if(cicm.Languages is not null) { - metadata.Languages = new List(); + metadata.Languages = []; foreach(LanguagesTypeLanguage lng in cicm.Languages) metadata.Languages.Add((Language)lng); } if(cicm.Architectures is not null) { - metadata.Architectures = new List(); + metadata.Architectures = []; foreach(ArchitecturesTypeArchitecture arch in cicm.Architectures) metadata.Architectures.Add((Architecture)arch); @@ -148,7 +148,7 @@ public class Metadata if(cicm.RequiredOperatingSystems is not null) { - metadata.RequiredOperatingSystems = new List(); + metadata.RequiredOperatingSystems = []; foreach(RequiredOperatingSystemType os in cicm.RequiredOperatingSystems) metadata.RequiredOperatingSystems.Add(os); @@ -156,49 +156,49 @@ public class Metadata if(cicm.UserManual is not null) { - metadata.UserManuals = new List(); + metadata.UserManuals = []; foreach(UserManualType manual in cicm.UserManual) metadata.UserManuals.Add(manual); } if(cicm.OpticalDisc is not null) { - metadata.OpticalDiscs = new List(); + metadata.OpticalDiscs = []; foreach(OpticalDiscType disc in cicm.OpticalDisc) metadata.OpticalDiscs.Add(disc); } if(cicm.Advertisement is not null) { - metadata.Advertisements = new List(); + metadata.Advertisements = []; foreach(AdvertisementType adv in cicm.Advertisement) metadata.Advertisements.Add(adv); } if(cicm.LinearMedia is not null) { - metadata.LinearMedias = new List(); + metadata.LinearMedias = []; foreach(LinearMediaType media in cicm.LinearMedia) metadata.LinearMedias.Add(media); } if(cicm.PCICard is not null) { - metadata.PciCards = new List(); + metadata.PciCards = []; foreach(PCIType pci in cicm.PCICard) metadata.PciCards.Add(pci); } if(cicm.BlockMedia is not null) { - metadata.BlockMedias = new List(); + metadata.BlockMedias = []; foreach(BlockMediaType media in cicm.BlockMedia) metadata.BlockMedias.Add(media); } if(cicm.AudioMedia is null) return metadata; - metadata.AudioMedias = new List(); + metadata.AudioMedias = []; foreach(AudioMediaType media in cicm.AudioMedia) metadata.AudioMedias.Add(media); diff --git a/Aaru.CommonTypes/AaruMetadata/Advertisement.cs b/Aaru.CommonTypes/AaruMetadata/Advertisement.cs index 40ec42d6e..1bc5a41f1 100644 --- a/Aaru.CommonTypes/AaruMetadata/Advertisement.cs +++ b/Aaru.CommonTypes/AaruMetadata/Advertisement.cs @@ -79,21 +79,21 @@ public class Advertisement if(cicm.Checksums is not null) { - adv.Checksums = new List(); + adv.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) adv.Checksums.Add(chk); } if(cicm.AudioTrack is not null) { - adv.AudioTracks = new List(); + adv.AudioTracks = []; foreach(AudioTracksType trk in cicm.AudioTrack) adv.AudioTracks.Add(trk); } if(cicm.VideoTrack is not null) { - adv.VideoTracks = new List(); + adv.VideoTracks = []; foreach(VideoTracksType trk in cicm.VideoTrack) adv.VideoTracks.Add(trk); } @@ -101,7 +101,7 @@ public class Advertisement if(cicm.SubtitleTrack is null) return adv; { - adv.SubtitleTracks = new List(); + adv.SubtitleTracks = []; foreach(SubtitleTracksType trk in cicm.SubtitleTrack) adv.SubtitleTracks.Add(trk); } diff --git a/Aaru.CommonTypes/AaruMetadata/AudioMedia.cs b/Aaru.CommonTypes/AaruMetadata/AudioMedia.cs index 173802263..aaa8cc711 100644 --- a/Aaru.CommonTypes/AaruMetadata/AudioMedia.cs +++ b/Aaru.CommonTypes/AaruMetadata/AudioMedia.cs @@ -84,21 +84,21 @@ public class AudioMedia if(cicm.Checksums is not null) { - media.Checksums = new List(); + media.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) media.Checksums.Add(chk); } if(cicm.Block is not null) { - media.Blocks = new List(); + media.Blocks = []; foreach(AudioBlockType blk in cicm.Block) media.Blocks.Add(blk); } if(cicm.DumpHardwareArray is null) return media; - media.DumpHardware = new List(); + media.DumpHardware = []; foreach(DumpHardwareType hw in cicm.DumpHardwareArray) media.DumpHardware.Add(hw); @@ -129,7 +129,7 @@ public class AudioBlock if(cicm.Checksums is null) return blk; - blk.Checksums = new List(); + blk.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) blk.Checksums.Add(chk); diff --git a/Aaru.CommonTypes/AaruMetadata/AudioVideo.cs b/Aaru.CommonTypes/AaruMetadata/AudioVideo.cs index d212e7049..fb1576b6f 100644 --- a/Aaru.CommonTypes/AaruMetadata/AudioVideo.cs +++ b/Aaru.CommonTypes/AaruMetadata/AudioVideo.cs @@ -74,7 +74,7 @@ public class AudioTrack if(cicm.Languages is null) return trk; - trk.Languages = new List(); + trk.Languages = []; foreach(LanguagesTypeLanguage lng in cicm.Languages) trk.Languages.Add((Language)lng); @@ -111,7 +111,7 @@ public class VideoTrack if(cicm.Languages is null) return trk; - trk.Languages = new List(); + trk.Languages = []; foreach(LanguagesTypeLanguage lng in cicm.Languages) trk.Languages.Add((Language)lng); @@ -138,7 +138,7 @@ public class SubtitleTrack if(cicm.Languages is null) return sub; - sub.Languages = new List(); + sub.Languages = []; foreach(LanguagesTypeLanguage lng in cicm.Languages) sub.Languages.Add((Language)lng); @@ -171,7 +171,7 @@ public class Recording if(cicm.Software is null) return recording; - recording.Software = new List(); + recording.Software = []; foreach(SoftwareType sw in cicm.Software) recording.Software.Add(sw); diff --git a/Aaru.CommonTypes/AaruMetadata/BlockMedia.cs b/Aaru.CommonTypes/AaruMetadata/BlockMedia.cs index 01197b394..e6ec10a76 100644 --- a/Aaru.CommonTypes/AaruMetadata/BlockMedia.cs +++ b/Aaru.CommonTypes/AaruMetadata/BlockMedia.cs @@ -124,28 +124,28 @@ public class BlockMedia if(cicm.Checksums is not null) { - media.Checksums = new List(); + media.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) media.Checksums.Add(chk); } if(cicm.ContentChecksums is not null) { - media.ContentChecksums = new List(); + media.ContentChecksums = []; foreach(Schemas.ChecksumType chk in cicm.ContentChecksums) media.ContentChecksums.Add(chk); } if(cicm.VariableBlockSize is not null) { - media.VariableBlockSize = new List(); + media.VariableBlockSize = []; foreach(BlockSizeType blkSize in cicm.VariableBlockSize) media.VariableBlockSize.Add(blkSize); } if(cicm.TapeInformation is not null) { - media.TapeInformation = new List(); + media.TapeInformation = []; foreach(TapePartitionType tapeInformation in cicm.TapeInformation) media.TapeInformation.Add(tapeInformation); @@ -153,14 +153,14 @@ public class BlockMedia if(cicm.FileSystemInformation is not null) { - media.FileSystemInformation = new List(); + media.FileSystemInformation = []; foreach(PartitionType fsInfo in cicm.FileSystemInformation) media.FileSystemInformation.Add(fsInfo); } if(cicm.DumpHardwareArray is null) return media; - media.DumpHardware = new List(); + media.DumpHardware = []; foreach(DumpHardwareType hw in cicm.DumpHardwareArray) media.DumpHardware.Add(hw); @@ -201,7 +201,7 @@ public class BlockTrack if(cicm.Checksums is null) return trk; - trk.Checksums = new List(); + trk.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) trk.Checksums.Add(chk); diff --git a/Aaru.CommonTypes/AaruMetadata/Book.cs b/Aaru.CommonTypes/AaruMetadata/Book.cs index 60aa37227..61bdd452a 100644 --- a/Aaru.CommonTypes/AaruMetadata/Book.cs +++ b/Aaru.CommonTypes/AaruMetadata/Book.cs @@ -77,14 +77,14 @@ public class Book if(cicm.Barcodes is not null) { - book.Barcodes = new List(); + book.Barcodes = []; foreach(Schemas.BarcodeType code in cicm.Barcodes) book.Barcodes.Add(code); } if(cicm.Language is null) return book; - book.Languages = new List(); + book.Languages = []; foreach(LanguagesTypeLanguage lng in cicm.Language) book.Languages.Add((Language)lng); diff --git a/Aaru.CommonTypes/AaruMetadata/Contents.cs b/Aaru.CommonTypes/AaruMetadata/Contents.cs index 6625ea63c..ec36f530d 100644 --- a/Aaru.CommonTypes/AaruMetadata/Contents.cs +++ b/Aaru.CommonTypes/AaruMetadata/Contents.cs @@ -63,14 +63,14 @@ public class FilesystemContents if(cicm.File is not null) { - fs.Files = new List(); + fs.Files = []; foreach(ContentsFileType file in cicm.File) fs.Files.Add(file); } if(cicm.Directory is null) return fs; - fs.Directories = new List(); + fs.Directories = []; foreach(DirectoryType dir in cicm.Directory) fs.Directories.Add(dir); @@ -122,14 +122,14 @@ public class ContentsFile if(cicm.Checksums is not null) { - file.Checksums = new List(); + file.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) file.Checksums.Add(chk); } if(cicm.ExtendedAttributes is null) return file; - file.ExtendedAttributes = new List(); + file.ExtendedAttributes = []; foreach(ExtendedAttributeType xa in cicm.ExtendedAttributes) file.ExtendedAttributes.Add(xa); @@ -156,7 +156,7 @@ public class ExtendedAttribute if(cicm.Checksums is null) return xa; - xa.Checksums = new List(); + xa.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) xa.Checksums.Add(chk); @@ -206,14 +206,14 @@ public class Directory if(cicm.Directory is not null) { - dir.Directories = new List(); + dir.Directories = []; foreach(DirectoryType d in cicm.Directory) dir.Directories.Add(d); } if(cicm.File is null) return dir; - dir.Files = new List(); + dir.Files = []; foreach(ContentsFileType file in cicm.File) dir.Files.Add(file); diff --git a/Aaru.CommonTypes/AaruMetadata/Dump.cs b/Aaru.CommonTypes/AaruMetadata/Dump.cs index 0b8a58dba..449050fe7 100644 --- a/Aaru.CommonTypes/AaruMetadata/Dump.cs +++ b/Aaru.CommonTypes/AaruMetadata/Dump.cs @@ -81,7 +81,7 @@ public class Dump if(cicm.Checksums is null) return dump; - dump.Checksums = new List(); + dump.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) dump.Checksums.Add(chk); @@ -110,7 +110,7 @@ public class Border if(cicm.Checksums is null) return border; - border.Checksums = new List(); + border.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) border.Checksums.Add(chk); diff --git a/Aaru.CommonTypes/AaruMetadata/DumpHardware.cs b/Aaru.CommonTypes/AaruMetadata/DumpHardware.cs index 574fc735f..628956220 100644 --- a/Aaru.CommonTypes/AaruMetadata/DumpHardware.cs +++ b/Aaru.CommonTypes/AaruMetadata/DumpHardware.cs @@ -72,7 +72,7 @@ public class DumpHardware if(cicm.Extents is null) return hw; - hw.Extents = new List(); + hw.Extents = []; foreach(ExtentType ext in cicm.Extents) hw.Extents.Add(ext); diff --git a/Aaru.CommonTypes/AaruMetadata/Layers.cs b/Aaru.CommonTypes/AaruMetadata/Layers.cs index 001142270..ef0e4fe76 100644 --- a/Aaru.CommonTypes/AaruMetadata/Layers.cs +++ b/Aaru.CommonTypes/AaruMetadata/Layers.cs @@ -64,7 +64,7 @@ public class Layers if(cicm.Sectors is null) return layers; - layers.Sectors = new List(); + layers.Sectors = []; foreach(SectorsType sec in cicm.Sectors) layers.Sectors.Add(sec); diff --git a/Aaru.CommonTypes/AaruMetadata/LinearMedia.cs b/Aaru.CommonTypes/AaruMetadata/LinearMedia.cs index 727825486..68cacc6bc 100644 --- a/Aaru.CommonTypes/AaruMetadata/LinearMedia.cs +++ b/Aaru.CommonTypes/AaruMetadata/LinearMedia.cs @@ -94,21 +94,21 @@ public class LinearMedia if(cicm.ImageChecksums is not null) { - linearMedia.ImageChecksums = new List(); + linearMedia.ImageChecksums = []; foreach(Schemas.ChecksumType chk in cicm.ImageChecksums) linearMedia.ImageChecksums.Add(chk); } if(cicm.Checksums is not null) { - linearMedia.Checksums = new List(); + linearMedia.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) linearMedia.Checksums.Add(chk); } if(cicm.DumpHardwareArray is null) return linearMedia; - linearMedia.DumpHardware = new List(); + linearMedia.DumpHardware = []; foreach(DumpHardwareType hw in cicm.DumpHardwareArray) linearMedia.DumpHardware.Add(hw); diff --git a/Aaru.CommonTypes/AaruMetadata/Magazine.cs b/Aaru.CommonTypes/AaruMetadata/Magazine.cs index b88438324..dc7c99bbd 100644 --- a/Aaru.CommonTypes/AaruMetadata/Magazine.cs +++ b/Aaru.CommonTypes/AaruMetadata/Magazine.cs @@ -76,7 +76,7 @@ public class Magazine if(cicm.Barcodes is not null) { - magazine.Barcodes = new List(); + magazine.Barcodes = []; foreach(Schemas.BarcodeType code in cicm.Barcodes) magazine.Barcodes.Add(code); } diff --git a/Aaru.CommonTypes/AaruMetadata/OpticalDisc.cs b/Aaru.CommonTypes/AaruMetadata/OpticalDisc.cs index 9bbf19d4a..6afca5f5d 100644 --- a/Aaru.CommonTypes/AaruMetadata/OpticalDisc.cs +++ b/Aaru.CommonTypes/AaruMetadata/OpticalDisc.cs @@ -142,77 +142,77 @@ public class OpticalDisc if(cicm.Checksums is not null) { - disc.Checksums = new List(); + disc.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) disc.Checksums.Add(chk); } if(cicm.RingCode is not null) { - disc.RingCode = new List(); + disc.RingCode = []; foreach(LayeredTextType lt in cicm.RingCode) disc.RingCode.Add(lt); } if(cicm.MasteringSID is not null) { - disc.MasteringSid = new List(); + disc.MasteringSid = []; foreach(LayeredTextType lt in cicm.MasteringSID) disc.MasteringSid.Add(lt); } if(cicm.Toolstamp is not null) { - disc.Toolstamp = new List(); + disc.Toolstamp = []; foreach(LayeredTextType lt in cicm.Toolstamp) disc.Toolstamp.Add(lt); } if(cicm.MouldSID is not null) { - disc.MouldSid = new List(); + disc.MouldSid = []; foreach(LayeredTextType lt in cicm.MouldSID) disc.MouldSid.Add(lt); } if(cicm.MouldText is not null) { - disc.MouldText = new List(); + disc.MouldText = []; foreach(LayeredTextType lt in cicm.MouldText) disc.MouldText.Add(lt); } if(cicm.FirstTrackPregrap is not null) { - disc.FirstTrackPregrap = new List(); + disc.FirstTrackPregrap = []; foreach(BorderType lt in cicm.FirstTrackPregrap) disc.FirstTrackPregrap.Add(lt); } if(cicm.LeadIn is not null) { - disc.LeadIn = new List(); + disc.LeadIn = []; foreach(BorderType lt in cicm.LeadIn) disc.LeadIn.Add(lt); } if(cicm.LeadOut is not null) { - disc.LeadOut = new List(); + disc.LeadOut = []; foreach(BorderType lt in cicm.LeadOut) disc.LeadOut.Add(lt); } if(cicm.Track is not null) { - disc.Track = new List(); + disc.Track = []; foreach(Schemas.TrackType lt in cicm.Track) disc.Track.Add(lt); } if(cicm.DumpHardwareArray is null) return disc; - disc.DumpHardware = new List(); + disc.DumpHardware = []; foreach(DumpHardwareType hw in cicm.DumpHardwareArray) disc.DumpHardware.Add(hw); @@ -263,21 +263,21 @@ public class Track if(cicm.Indexes is not null) { - trk.Indexes = new List(); + trk.Indexes = []; foreach(TrackIndexType idx in cicm.Indexes) trk.Indexes.Add(idx); } if(cicm.Checksums is not null) { - trk.Checksums = new List(); + trk.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) trk.Checksums.Add(chk); } if(cicm.FileSystemInformation is null) return trk; - trk.FileSystemInformation = new List(); + trk.FileSystemInformation = []; foreach(PartitionType fs in cicm.FileSystemInformation) trk.FileSystemInformation.Add(fs); @@ -368,7 +368,7 @@ public class SubChannel if(cicm.Checksums is null) return subchannel; - subchannel.Checksums = new List(); + subchannel.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) subchannel.Checksums.Add(chk); diff --git a/Aaru.CommonTypes/AaruMetadata/PCMCIA.cs b/Aaru.CommonTypes/AaruMetadata/PCMCIA.cs index de7b26f7e..9dbdd7d18 100644 --- a/Aaru.CommonTypes/AaruMetadata/PCMCIA.cs +++ b/Aaru.CommonTypes/AaruMetadata/PCMCIA.cs @@ -75,7 +75,6 @@ public class Pcmcia AdditionalInformation = cicm.AdditionalInformation is null ? null - : new List(cicm - .AdditionalInformation) + : [..cicm.AdditionalInformation] }; } \ No newline at end of file diff --git a/Aaru.CommonTypes/AaruMetadata/Partition.cs b/Aaru.CommonTypes/AaruMetadata/Partition.cs index 97481ee6d..b88c6c213 100644 --- a/Aaru.CommonTypes/AaruMetadata/Partition.cs +++ b/Aaru.CommonTypes/AaruMetadata/Partition.cs @@ -72,7 +72,7 @@ public class Partition if(cicm.FileSystems is null) return part; - part.FileSystems = new List(); + part.FileSystems = []; foreach(FileSystemType fs in cicm.FileSystems) part.FileSystems.Add(fs); diff --git a/Aaru.CommonTypes/AaruMetadata/RequiredOperatingSystem.cs b/Aaru.CommonTypes/AaruMetadata/RequiredOperatingSystem.cs index 2046758ba..444b949aa 100644 --- a/Aaru.CommonTypes/AaruMetadata/RequiredOperatingSystem.cs +++ b/Aaru.CommonTypes/AaruMetadata/RequiredOperatingSystem.cs @@ -56,6 +56,6 @@ public class RequiredOperatingSystem : new RequiredOperatingSystem { Name = cicm.Name, - Versions = cicm.Version is null ? null : new List(cicm.Version) + Versions = cicm.Version is null ? null : [..cicm.Version] }; } \ No newline at end of file diff --git a/Aaru.CommonTypes/AaruMetadata/SCSI.cs b/Aaru.CommonTypes/AaruMetadata/SCSI.cs index 53e38801c..4a645704d 100644 --- a/Aaru.CommonTypes/AaruMetadata/SCSI.cs +++ b/Aaru.CommonTypes/AaruMetadata/SCSI.cs @@ -68,7 +68,7 @@ public class SCSI if(cicm.EVPD is null) return cicm; - scsi.Evpds = new List(); + scsi.Evpds = []; foreach(EVPDType evpd in cicm.EVPD) scsi.Evpds.Add(evpd); @@ -97,7 +97,7 @@ public class Evpd if(cicm.Checksums is null) return evpd; - evpd.Checksums = new List(); + evpd.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) evpd.Checksums.Add(chk); diff --git a/Aaru.CommonTypes/AaruMetadata/Scanning.cs b/Aaru.CommonTypes/AaruMetadata/Scanning.cs index 846eb4f84..1c848dfbd 100644 --- a/Aaru.CommonTypes/AaruMetadata/Scanning.cs +++ b/Aaru.CommonTypes/AaruMetadata/Scanning.cs @@ -66,28 +66,28 @@ public class Scan if(cicm.Checksums is not null) { - scan.Checksums = new List(); + scan.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) scan.Checksums.Add(chk); } if(cicm.Scanner is not null) { - scan.Scanner = new List(); + scan.Scanner = []; foreach(ScannerType scanner in cicm.Scanner) scan.Scanner.Add(scanner); } if(cicm.ScanProcessing is not null) { - scan.ScanProcessing = new List(); + scan.ScanProcessing = []; foreach(ScanProcessingType processing in cicm.ScanProcessing) scan.ScanProcessing.Add(processing); } if(cicm.OCR is null) return scan; - scan.OCR = new List(); + scan.OCR = []; foreach(OCRType ocr in cicm.OCR) scan.OCR.Add(ocr); @@ -114,7 +114,7 @@ public class Cover if(cicm.Checksums is null) return cover; - cover.Checksums = new List(); + cover.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) cover.Checksums.Add(chk); @@ -303,7 +303,7 @@ public class OCR if(cicm.Language is null) return ocr; - ocr.Language = new List(); + ocr.Language = []; foreach(Language lng in cicm.Language) ocr.Language.Add(lng); diff --git a/Aaru.CommonTypes/AaruMetadata/Tape.cs b/Aaru.CommonTypes/AaruMetadata/Tape.cs index f7a7495ce..bb8778a13 100644 --- a/Aaru.CommonTypes/AaruMetadata/Tape.cs +++ b/Aaru.CommonTypes/AaruMetadata/Tape.cs @@ -71,14 +71,14 @@ public class TapePartition if(cicm.Checksums is not null) { - partition.Checksums = new List(); + partition.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) partition.Checksums.Add(chk); } if(cicm.File is null) return partition; - partition.Files = new List(); + partition.Files = []; foreach(TapeFileType file in cicm.File) partition.Files.Add(file); @@ -113,7 +113,7 @@ public class TapeFile if(cicm.Checksums is null) return file; - file.Checksums = new List(); + file.Checksums = []; foreach(Schemas.ChecksumType chk in cicm.Checksums) file.Checksums.Add(chk); diff --git a/Aaru.CommonTypes/AaruMetadata/UserManual.cs b/Aaru.CommonTypes/AaruMetadata/UserManual.cs index e3d4477ee..52d588710 100644 --- a/Aaru.CommonTypes/AaruMetadata/UserManual.cs +++ b/Aaru.CommonTypes/AaruMetadata/UserManual.cs @@ -66,7 +66,7 @@ public class UserManual if(cicm.Language is null) return manual; - manual.Language = new List(); + manual.Language = []; foreach(LanguagesTypeLanguage lng in cicm.Language) manual.Language.Add((Language)lng); diff --git a/Aaru.CommonTypes/Extents/ExtentsByte.cs b/Aaru.CommonTypes/Extents/ExtentsByte.cs index 0fd594b23..e706e6c31 100644 --- a/Aaru.CommonTypes/Extents/ExtentsByte.cs +++ b/Aaru.CommonTypes/Extents/ExtentsByte.cs @@ -52,13 +52,13 @@ public sealed class ExtentsByte List> _backend; /// Initialize an empty list of extents - public ExtentsByte() => _backend = new List>(); + public ExtentsByte() => _backend = []; /// Initializes extents with an specific list /// List of extents as tuples "start, end" public ExtentsByte(IEnumerable> list) { - _backend = new List>(); + _backend = []; // This ensure no overlapping extents are added on creation foreach(Tuple t in list) Add(t.Item1, t.Item2); diff --git a/Aaru.CommonTypes/Extents/ExtentsConverter.cs b/Aaru.CommonTypes/Extents/ExtentsConverter.cs index 3e72498d9..8726780b2 100644 --- a/Aaru.CommonTypes/Extents/ExtentsConverter.cs +++ b/Aaru.CommonTypes/Extents/ExtentsConverter.cs @@ -54,7 +54,7 @@ public static class ExtentsConverter if(extents == null) return null; Tuple[] tuples = extents.ToArray(); - List list = new(); + List list = []; for(ulong i = 0; i < (ulong)tuples.LongLength; i++) { diff --git a/Aaru.CommonTypes/Extents/ExtentsInt.cs b/Aaru.CommonTypes/Extents/ExtentsInt.cs index 947575514..644008b93 100644 --- a/Aaru.CommonTypes/Extents/ExtentsInt.cs +++ b/Aaru.CommonTypes/Extents/ExtentsInt.cs @@ -52,13 +52,13 @@ public sealed class ExtentsInt List> _backend; /// Initialize an empty list of extents - public ExtentsInt() => _backend = new List>(); + public ExtentsInt() => _backend = []; /// Initializes extents with an specific list /// List of extents as tuples "start, end" public ExtentsInt(IEnumerable> list) { - _backend = new List>(); + _backend = []; // This ensure no overlapping extents are added on creation foreach(Tuple t in list) Add(t.Item1, t.Item2); diff --git a/Aaru.CommonTypes/Extents/ExtentsLong.cs b/Aaru.CommonTypes/Extents/ExtentsLong.cs index 087e9d20d..5da734f46 100644 --- a/Aaru.CommonTypes/Extents/ExtentsLong.cs +++ b/Aaru.CommonTypes/Extents/ExtentsLong.cs @@ -51,13 +51,13 @@ public sealed class ExtentsLong List> _backend; /// Initialize an empty list of extents - public ExtentsLong() => _backend = new List>(); + public ExtentsLong() => _backend = []; /// Initializes extents with an specific list /// List of extents as tuples "start, end" public ExtentsLong(IEnumerable> list) { - _backend = new List>(); + _backend = []; // This ensure no overlapping extents are added on creation foreach(Tuple t in list) Add(t.Item1, t.Item2); diff --git a/Aaru.CommonTypes/Extents/ExtentsSByte.cs b/Aaru.CommonTypes/Extents/ExtentsSByte.cs index 2aa1a064f..5e24dc70c 100644 --- a/Aaru.CommonTypes/Extents/ExtentsSByte.cs +++ b/Aaru.CommonTypes/Extents/ExtentsSByte.cs @@ -52,13 +52,13 @@ public sealed class ExtentsSByte List> _backend; /// Initialize an empty list of extents - public ExtentsSByte() => _backend = new List>(); + public ExtentsSByte() => _backend = []; /// Initializes extents with an specific list /// List of extents as tuples "start, end" public ExtentsSByte(IEnumerable> list) { - _backend = new List>(); + _backend = []; // This ensure no overlapping extents are added on creation foreach(Tuple t in list) Add(t.Item1, t.Item2); diff --git a/Aaru.CommonTypes/Extents/ExtentsShort.cs b/Aaru.CommonTypes/Extents/ExtentsShort.cs index 9e27ffd36..9bcaff285 100644 --- a/Aaru.CommonTypes/Extents/ExtentsShort.cs +++ b/Aaru.CommonTypes/Extents/ExtentsShort.cs @@ -52,13 +52,13 @@ public sealed class ExtentsShort List> _backend; /// Initialize an empty list of extents - public ExtentsShort() => _backend = new List>(); + public ExtentsShort() => _backend = []; /// Initializes extents with an specific list /// List of extents as tuples "start, end" public ExtentsShort(IEnumerable> list) { - _backend = new List>(); + _backend = []; // This ensure no overlapping extents are added on creation foreach(Tuple t in list) Add(t.Item1, t.Item2); diff --git a/Aaru.CommonTypes/Extents/ExtentsUInt.cs b/Aaru.CommonTypes/Extents/ExtentsUInt.cs index 169798f9d..d9c94a9ba 100644 --- a/Aaru.CommonTypes/Extents/ExtentsUInt.cs +++ b/Aaru.CommonTypes/Extents/ExtentsUInt.cs @@ -52,13 +52,13 @@ public sealed class ExtentsUInt List> _backend; /// Initialize an empty list of extents - public ExtentsUInt() => _backend = new List>(); + public ExtentsUInt() => _backend = []; /// Initializes extents with an specific list /// List of extents as tuples "start, end" public ExtentsUInt(IEnumerable> list) { - _backend = new List>(); + _backend = []; // This ensure no overlapping extents are added on creation foreach(Tuple t in list) Add(t.Item1, t.Item2); diff --git a/Aaru.CommonTypes/Extents/ExtentsULong.cs b/Aaru.CommonTypes/Extents/ExtentsULong.cs index b2471d07e..a6ef385dd 100644 --- a/Aaru.CommonTypes/Extents/ExtentsULong.cs +++ b/Aaru.CommonTypes/Extents/ExtentsULong.cs @@ -52,13 +52,13 @@ public sealed class ExtentsULong List> _backend; /// Initialize an empty list of extents - public ExtentsULong() => _backend = new List>(); + public ExtentsULong() => _backend = []; /// Initializes extents with an specific list /// List of extents as tuples "start, end" public ExtentsULong(IEnumerable> list) { - _backend = new List>(); + _backend = []; // This ensure no overlapping extents are added on creation foreach(Tuple t in list) Add(t.Item1, t.Item2); diff --git a/Aaru.CommonTypes/Extents/ExtentsUShort.cs b/Aaru.CommonTypes/Extents/ExtentsUShort.cs index a901340ee..20b979013 100644 --- a/Aaru.CommonTypes/Extents/ExtentsUShort.cs +++ b/Aaru.CommonTypes/Extents/ExtentsUShort.cs @@ -52,13 +52,13 @@ public sealed class ExtentsUShort List> _backend; /// Initialize an empty list of extents - public ExtentsUShort() => _backend = new List>(); + public ExtentsUShort() => _backend = []; /// Initializes extents with an specific list /// List of extents as tuples "start, end" public ExtentsUShort(IEnumerable> list) { - _backend = new List>(); + _backend = []; // This ensure no overlapping extents are added on creation foreach(Tuple t in list) Add(t.Item1, t.Item2); diff --git a/Aaru.CommonTypes/Geometry.cs b/Aaru.CommonTypes/Geometry.cs index d2cbbabcb..c9f75b344 100644 --- a/Aaru.CommonTypes/Geometry.cs +++ b/Aaru.CommonTypes/Geometry.cs @@ -46,7 +46,7 @@ public static class Geometry /// List of known disk geometries public static readonly (ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding encoding, bool variableSectorsPerTrack, MediaType type)[] KnownGeometries = - { + [ (32, 1, 8, 319, MediaEncoding.FM, false, MediaType.IBM23FD), (35, 1, 9, 256, MediaEncoding.FM, false, MediaType.ECMA_66), (35, 1, 13, 256, MediaEncoding.AppleGCR, false, MediaType.Apple32SS), @@ -118,7 +118,7 @@ public static class Geometry (963, 8, 32, 512, MediaEncoding.MFM, false, MediaType.LS120), (1021, 64, 32, 512, MediaEncoding.MFM, false, MediaType.Jaz), (1024, 2, 32, 512, MediaEncoding.MFM, false, MediaType.FD32MB) - }; + ]; /// Gets the media type for a given geometry /// Geometry diff --git a/Aaru.CommonTypes/PluginRegister.cs b/Aaru.CommonTypes/PluginRegister.cs index 3e78ac79c..af03e8665 100644 --- a/Aaru.CommonTypes/PluginRegister.cs +++ b/Aaru.CommonTypes/PluginRegister.cs @@ -266,8 +266,7 @@ public class PluginRegister { if(!filter.Identify(path)) continue; - var foundFilter = - (IFilter)filter.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(Array.Empty()); + var foundFilter = (IFilter)filter.GetType().GetConstructor(Type.EmptyTypes)?.Invoke([]); if(foundFilter?.Open(path) == ErrorNumber.NoError) return foundFilter; } diff --git a/Aaru.Compression/TeleDiskLzh.cs b/Aaru.Compression/TeleDiskLzh.cs index d2346d05b..47ef32b86 100644 --- a/Aaru.Compression/TeleDiskLzh.cs +++ b/Aaru.Compression/TeleDiskLzh.cs @@ -80,7 +80,7 @@ public class TeleDiskLzh /* decoder table */ readonly byte[] _dCode = - { + [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, @@ -96,10 +96,10 @@ public class TeleDiskLzh 0x24, 0x24, 0x25, 0x25, 0x26, 0x26, 0x27, 0x27, 0x28, 0x28, 0x29, 0x29, 0x2A, 0x2A, 0x2B, 0x2B, 0x2C, 0x2C, 0x2D, 0x2D, 0x2E, 0x2E, 0x2F, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F - }; + ]; readonly byte[] _dLen = - { + [ 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, @@ -115,7 +115,7 @@ public class TeleDiskLzh 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 - }; + ]; readonly ushort[] _freq = new ushort[T + 1]; /* cumulative freq table */ readonly Stream _inStream; diff --git a/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/AudioDecoder.cs b/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/AudioDecoder.cs index 44b123071..2962a29d9 100644 --- a/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/AudioDecoder.cs +++ b/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/AudioDecoder.cs @@ -20,748 +20,804 @@ */ using System; -using System.Collections.Generic; -using System.Text; using System.IO; -namespace CUETools.Codecs.Flake +namespace CUETools.Codecs.Flake; + +public class AudioDecoder : IAudioSource { - public class AudioDecoder: IAudioSource - { - int[] samplesBuffer; - int[] residualBuffer; - - byte[] _framesBuffer; - int _framesBufferLength = 0, _framesBufferOffset = 0; - long first_frame_offset; - - SeekPoint[] seek_table; - - Crc8 crc8; - FlacFrame frame; - BitReader framereader; - AudioPCMConfig pcm; - - uint min_block_size = 0; - uint max_block_size = 0; - uint min_frame_size = 0; - uint max_frame_size = 0; - - int _samplesInBuffer, _samplesBufferOffset; - long _sampleCount = 0, _sampleOffset = 0; - - bool do_crc = true; - - string _path; - Stream _IO; - - public bool DoCRC - { - get - { - return do_crc; - } - set - { - do_crc = value; - } - } - - public int[] Samples - { - get - { - return samplesBuffer; - } - } - - public AudioDecoder(DecoderSettings settings, string path, Stream IO = null) - { - m_settings = settings; - - _path = path; - _IO = IO != null ? IO : new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 0x10000); - - crc8 = new Crc8(); - - _framesBuffer = new byte[0x20000]; - decode_metadata(); - - frame = new FlacFrame(PCM.ChannelCount); - framereader = new BitReader(); - - //max_frame_size = 16 + ((Flake.MAX_BLOCKSIZE * PCM.BitsPerSample * PCM.ChannelCount + 1) + 7) >> 3); - if (((int)max_frame_size * PCM.BitsPerSample * PCM.ChannelCount * 2 >> 3) > _framesBuffer.Length) - { - byte[] temp = _framesBuffer; - _framesBuffer = new byte[((int)max_frame_size * PCM.BitsPerSample * PCM.ChannelCount * 2 >> 3)]; - if (_framesBufferLength > 0) - Array.Copy(temp, _framesBufferOffset, _framesBuffer, 0, _framesBufferLength); - _framesBufferOffset = 0; - } - _samplesInBuffer = 0; - - if (PCM.BitsPerSample != 16 && PCM.BitsPerSample != 24) - throw new Exception("invalid flac file"); - - samplesBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * PCM.ChannelCount]; - residualBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * PCM.ChannelCount]; - } - - public AudioDecoder(AudioPCMConfig _pcm) - { - pcm = _pcm; - crc8 = new Crc8(); - - samplesBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * PCM.ChannelCount]; - residualBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * PCM.ChannelCount]; - frame = new FlacFrame(PCM.ChannelCount); - framereader = new BitReader(); - } - - private DecoderSettings m_settings; - public IAudioDecoderSettings Settings => m_settings; - - public void Close() - { - _IO.Close(); - } - - public TimeSpan Duration => Length < 0 ? TimeSpan.Zero : TimeSpan.FromSeconds((double)Length / PCM.SampleRate); - - public long Length - { - get - { - return _sampleCount; - } - } - - public long Remaining - { - get - { - return Length - Position; - } - } - - public long Position - { - get - { - return _sampleOffset - _samplesInBuffer; - } - set - { - if (value > _sampleCount) - throw new Exception("seeking past end of stream"); - if (value < Position || value > _sampleOffset) - { - if (seek_table != null && _IO.CanSeek) - { - int best_st = -1; - for (int st = 0; st < seek_table.Length; st++) - { - if (seek_table[st].number <= value && - (best_st == -1 || seek_table[st].number > seek_table[best_st].number)) - best_st = st; - } - if (best_st != -1) - { - _framesBufferLength = 0; - _samplesInBuffer = 0; - _samplesBufferOffset = 0; - _IO.Position = (long)seek_table[best_st].offset + first_frame_offset; - _sampleOffset = seek_table[best_st].number; - } - } - if (value < Position) - throw new Exception("cannot seek backwards without seek table"); - } - while (value > _sampleOffset) - { - _samplesInBuffer = 0; - _samplesBufferOffset = 0; - - fill_frames_buffer(); - if (_framesBufferLength == 0) - throw new Exception("seek failed"); - - int bytesDecoded = DecodeFrame(_framesBuffer, _framesBufferOffset, _framesBufferLength); - _framesBufferLength -= bytesDecoded; - _framesBufferOffset += bytesDecoded; - - _sampleOffset += _samplesInBuffer; - }; - int diff = _samplesInBuffer - (int)(_sampleOffset - value); - _samplesInBuffer -= diff; - _samplesBufferOffset += diff; - } - } - - public AudioPCMConfig PCM - { - get - { - return pcm; - } - } - - public string Path - { - get - { - return _path; - } - } - - unsafe void interlace(AudioBuffer buff, int offset, int count) - { - if (PCM.ChannelCount == 2) - { - fixed (int* src = &samplesBuffer[_samplesBufferOffset]) - buff.Interlace(offset, src, src + FlakeConstants.MAX_BLOCKSIZE, count); - } - else - { - for (int ch = 0; ch < PCM.ChannelCount; ch++) - fixed (int* res = &buff.Samples[offset, ch], src = &samplesBuffer[_samplesBufferOffset + ch * FlakeConstants.MAX_BLOCKSIZE]) - { - int* psrc = src; - for (int i = 0; i < count; i++) - res[i * PCM.ChannelCount] = *(psrc++); - } - } - } - - public int Read(AudioBuffer buff, int maxLength) - { - buff.Prepare(this, maxLength); - - int offset = 0; - int sampleCount = buff.Length; - - while (_samplesInBuffer < sampleCount) - { - if (_samplesInBuffer > 0) - { - interlace(buff, offset, _samplesInBuffer); - sampleCount -= _samplesInBuffer; - offset += _samplesInBuffer; - _samplesInBuffer = 0; - _samplesBufferOffset = 0; - } - - fill_frames_buffer(); - - if (_framesBufferLength == 0) - return buff.Length = offset; - - int bytesDecoded = DecodeFrame(_framesBuffer, _framesBufferOffset, _framesBufferLength); - _framesBufferLength -= bytesDecoded; - _framesBufferOffset += bytesDecoded; - - _samplesInBuffer -= _samplesBufferOffset; // can be set by Seek, otherwise zero - _sampleOffset += _samplesInBuffer; - } - - interlace(buff, offset, sampleCount); - _samplesInBuffer -= sampleCount; - _samplesBufferOffset += sampleCount; - if (_samplesInBuffer == 0) - _samplesBufferOffset = 0; - return buff.Length = offset + sampleCount; - } - - unsafe void fill_frames_buffer() - { - if (_framesBufferLength == 0) - _framesBufferOffset = 0; - else if (_framesBufferLength < _framesBuffer.Length / 2 && _framesBufferOffset >= _framesBuffer.Length / 2) - { - fixed (byte* buff = _framesBuffer) - AudioSamples.MemCpy(buff, buff + _framesBufferOffset, _framesBufferLength); - _framesBufferOffset = 0; - } - while (_framesBufferLength < _framesBuffer.Length / 2) - { - int read = _IO.Read(_framesBuffer, _framesBufferOffset + _framesBufferLength, _framesBuffer.Length - _framesBufferOffset - _framesBufferLength); - _framesBufferLength += read; - if (read == 0) - break; - } - } - - unsafe void decode_frame_header(BitReader bitreader, FlacFrame frame) - { - int header_start = bitreader.Position; - - if (bitreader.readbits(15) != 0x7FFC) - throw new Exception("invalid frame"); - uint vbs = bitreader.readbit(); - frame.bs_code0 = (int) bitreader.readbits(4); - uint sr_code0 = bitreader.readbits(4); - frame.ch_mode = (ChannelMode)bitreader.readbits(4); - uint bps_code = bitreader.readbits(3); - if (FlakeConstants.flac_bitdepths[bps_code] != PCM.BitsPerSample) - throw new Exception("unsupported bps coding"); - uint t1 = bitreader.readbit(); // == 0????? - if (t1 != 0) - throw new Exception("unsupported frame coding"); - frame.frame_number = (int)bitreader.read_utf8(); - - // custom block size - if (frame.bs_code0 == 6) - { - frame.bs_code1 = (int)bitreader.readbits(8); - frame.blocksize = frame.bs_code1 + 1; - } - else if (frame.bs_code0 == 7) - { - frame.bs_code1 = (int)bitreader.readbits(16); - frame.blocksize = frame.bs_code1 + 1; - } - else - frame.blocksize = FlakeConstants.flac_blocksizes[frame.bs_code0]; - - // custom sample rate - if (sr_code0 < 1 || sr_code0 > 11) - { - // sr_code0 == 12 -> sr == bitreader.readbits(8) * 1000; - // sr_code0 == 13 -> sr == bitreader.readbits(16); - // sr_code0 == 14 -> sr == bitreader.readbits(16) * 10; - throw new Exception("invalid sample rate mode"); - } - - int frame_channels = (int)frame.ch_mode + 1; - if (frame_channels > 11) - throw new Exception("invalid channel mode"); - if (frame_channels == 2 || frame_channels > 8) // Mid/Left/Right Side Stereo - frame_channels = 2; - else - frame.ch_mode = ChannelMode.NotStereo; - if (frame_channels != PCM.ChannelCount) - throw new Exception("invalid channel mode"); - - // CRC-8 of frame header - byte crc = do_crc ? crc8.ComputeChecksum(bitreader.Buffer, header_start, bitreader.Position - header_start) : (byte)0; - frame.crc8 = (byte)bitreader.readbits(8); - if (do_crc && frame.crc8 != crc) - throw new Exception("header crc mismatch"); - } - - unsafe void decode_subframe_constant(BitReader bitreader, FlacFrame frame, int ch) - { - int obits = frame.subframes[ch].obits; - frame.subframes[ch].best.residual[0] = bitreader.readbits_signed(obits); - } - - unsafe void decode_subframe_verbatim(BitReader bitreader, FlacFrame frame, int ch) - { - int obits = frame.subframes[ch].obits; - for (int i = 0; i < frame.blocksize; i++) - frame.subframes[ch].best.residual[i] = bitreader.readbits_signed(obits); - } - - unsafe void decode_residual(BitReader bitreader, FlacFrame frame, int ch) - { - // rice-encoded block - // coding method - frame.subframes[ch].best.rc.coding_method = (int)bitreader.readbits(2); // ????? == 0 - if (frame.subframes[ch].best.rc.coding_method != 0 && frame.subframes[ch].best.rc.coding_method != 1) - throw new Exception("unsupported residual coding"); - // partition order - frame.subframes[ch].best.rc.porder = (int)bitreader.readbits(4); - if (frame.subframes[ch].best.rc.porder > 8) - throw new Exception("invalid partition order"); - int psize = frame.blocksize >> frame.subframes[ch].best.rc.porder; - int res_cnt = psize - frame.subframes[ch].best.order; - - int rice_len = 4 + frame.subframes[ch].best.rc.coding_method; - // residual - int j = frame.subframes[ch].best.order; - int* r = frame.subframes[ch].best.residual + j; - for (int p = 0; p < (1 << frame.subframes[ch].best.rc.porder); p++) - { - if (p == 1) res_cnt = psize; - int n = Math.Min(res_cnt, frame.blocksize - j); - - int k = frame.subframes[ch].best.rc.rparams[p] = (int)bitreader.readbits(rice_len); - if (k == (1 << rice_len) - 1) - { - k = frame.subframes[ch].best.rc.esc_bps[p] = (int)bitreader.readbits(5); - for (int i = n; i > 0; i--) - *(r++) = bitreader.readbits_signed((int)k); - } - else - { - bitreader.read_rice_block(n, (int)k, r); - r += n; - } - j += n; - } - } - - unsafe void decode_subframe_fixed(BitReader bitreader, FlacFrame frame, int ch) - { - // warm-up samples - int obits = frame.subframes[ch].obits; - for (int i = 0; i < frame.subframes[ch].best.order; i++) - frame.subframes[ch].best.residual[i] = bitreader.readbits_signed(obits); - - // residual - decode_residual(bitreader, frame, ch); - } - - unsafe void decode_subframe_lpc(BitReader bitreader, FlacFrame frame, int ch) - { - // warm-up samples - int obits = frame.subframes[ch].obits; - for (int i = 0; i < frame.subframes[ch].best.order; i++) - frame.subframes[ch].best.residual[i] = bitreader.readbits_signed(obits); - - // LPC coefficients - frame.subframes[ch].best.cbits = (int)bitreader.readbits(4) + 1; // lpc_precision - if (frame.subframes[ch].best.cbits >= 16) - throw new Exception("cbits >= 16"); - frame.subframes[ch].best.shift = bitreader.readbits_signed(5); - if (frame.subframes[ch].best.shift < 0) - throw new Exception("negative shift"); - for (int i = 0; i < frame.subframes[ch].best.order; i++) - frame.subframes[ch].best.coefs[i] = bitreader.readbits_signed(frame.subframes[ch].best.cbits); - - // residual - decode_residual(bitreader, frame, ch); - } - - unsafe void decode_subframes(BitReader bitreader, FlacFrame frame) - { - fixed (int *r = residualBuffer, s = samplesBuffer) - for (int ch = 0; ch < PCM.ChannelCount; ch++) - { - // subframe header - uint t1 = bitreader.readbit(); // ?????? == 0 - if (t1 != 0) - throw new Exception("unsupported subframe coding (ch == " + ch.ToString() + ")"); - int type_code = (int)bitreader.readbits(6); - frame.subframes[ch].wbits = (int)bitreader.readbit(); - if (frame.subframes[ch].wbits != 0) - frame.subframes[ch].wbits += (int)bitreader.read_unary(); - - frame.subframes[ch].obits = PCM.BitsPerSample - frame.subframes[ch].wbits; - switch (frame.ch_mode) - { - case ChannelMode.MidSide: frame.subframes[ch].obits += ch; break; - case ChannelMode.LeftSide: frame.subframes[ch].obits += ch; break; - case ChannelMode.RightSide: frame.subframes[ch].obits += 1 - ch; break; - } - - frame.subframes[ch].best.type = (SubframeType)type_code; - frame.subframes[ch].best.order = 0; - - if ((type_code & (uint)SubframeType.LPC) != 0) - { - frame.subframes[ch].best.order = (type_code - (int)SubframeType.LPC) + 1; - frame.subframes[ch].best.type = SubframeType.LPC; - } - else if ((type_code & (uint)SubframeType.Fixed) != 0) - { - frame.subframes[ch].best.order = (type_code - (int)SubframeType.Fixed); - frame.subframes[ch].best.type = SubframeType.Fixed; - } - - frame.subframes[ch].best.residual = r + ch * FlakeConstants.MAX_BLOCKSIZE; - frame.subframes[ch].samples = s + ch * FlakeConstants.MAX_BLOCKSIZE; - - // subframe - switch (frame.subframes[ch].best.type) - { - case SubframeType.Constant: - decode_subframe_constant(bitreader, frame, ch); - break; - case SubframeType.Verbatim: - decode_subframe_verbatim(bitreader, frame, ch); - break; - case SubframeType.Fixed: - decode_subframe_fixed(bitreader, frame, ch); - break; - case SubframeType.LPC: - decode_subframe_lpc(bitreader, frame, ch); - break; - default: - throw new Exception("invalid subframe type"); - } - } - } - - unsafe void restore_samples_fixed(FlacFrame frame, int ch) - { - FlacSubframeInfo sub = frame.subframes[ch]; - - AudioSamples.MemCpy(sub.samples, sub.best.residual, sub.best.order); - int* data = sub.samples + sub.best.order; - int* residual = sub.best.residual + sub.best.order; - int data_len = frame.blocksize - sub.best.order; - int s0, s1, s2; - switch (sub.best.order) - { - case 0: - AudioSamples.MemCpy(data, residual, data_len); - break; - case 1: - s1 = data[-1]; - for (int i = data_len; i > 0; i--) - { - s1 += *(residual++); - *(data++) = s1; - } - //data[i] = residual[i] + data[i - 1]; - break; - case 2: - s2 = data[-2]; - s1 = data[-1]; - for (int i = data_len; i > 0; i--) - { - s0 = *(residual++) + (s1 << 1) - s2; - *(data++) = s0; - s2 = s1; - s1 = s0; - } - //data[i] = residual[i] + data[i - 1] * 2 - data[i - 2]; - break; - case 3: - for (int i = 0; i < data_len; i++) - data[i] = residual[i] + (((data[i - 1] - data[i - 2]) << 1) + (data[i - 1] - data[i - 2])) + data[i - 3]; - break; - case 4: - for (int i = 0; i < data_len; i++) - data[i] = residual[i] + ((data[i - 1] + data[i - 3]) << 2) - ((data[i - 2] << 2) + (data[i - 2] << 1)) - data[i - 4]; - break; - } - } - - unsafe void restore_samples_lpc(FlacFrame frame, int ch) - { - FlacSubframeInfo sub = frame.subframes[ch]; - ulong csum = 0; - fixed (int* coefs = sub.best.coefs) - { - for (int i = sub.best.order; i > 0; i--) - csum += (ulong)Math.Abs(coefs[i - 1]); - if ((csum << sub.obits) >= 1UL << 32) - lpc.decode_residual_long(sub.best.residual, sub.samples, frame.blocksize, sub.best.order, coefs, sub.best.shift); - else - lpc.decode_residual(sub.best.residual, sub.samples, frame.blocksize, sub.best.order, coefs, sub.best.shift); - } - } - - unsafe void restore_samples(FlacFrame frame) - { - for (int ch = 0; ch < PCM.ChannelCount; ch++) - { - switch (frame.subframes[ch].best.type) - { - case SubframeType.Constant: - AudioSamples.MemSet(frame.subframes[ch].samples, frame.subframes[ch].best.residual[0], frame.blocksize); - break; - case SubframeType.Verbatim: - AudioSamples.MemCpy(frame.subframes[ch].samples, frame.subframes[ch].best.residual, frame.blocksize); - break; - case SubframeType.Fixed: - restore_samples_fixed(frame, ch); - break; - case SubframeType.LPC: - restore_samples_lpc(frame, ch); - break; - } - if (frame.subframes[ch].wbits != 0) - { - int* s = frame.subframes[ch].samples; - int x = (int) frame.subframes[ch].wbits; - for (int i = frame.blocksize; i > 0; i--) - *(s++) <<= x; - } - } - if (frame.ch_mode != ChannelMode.NotStereo) - { - int* l = frame.subframes[0].samples; - int* r = frame.subframes[1].samples; - switch (frame.ch_mode) - { - case ChannelMode.LeftRight: - break; - case ChannelMode.MidSide: - for (int i = frame.blocksize; i > 0; i--) - { - int mid = *l; - int side = *r; - mid <<= 1; - mid |= (side & 1); /* i.e. if 'side' is odd... */ - *(l++) = (mid + side) >> 1; - *(r++) = (mid - side) >> 1; - } - break; - case ChannelMode.LeftSide: - for (int i = frame.blocksize; i > 0; i--) - { - int _l = *(l++), _r = *r; - *(r++) = _l - _r; - } - break; - case ChannelMode.RightSide: - for (int i = frame.blocksize; i > 0; i--) - *(l++) += *(r++); - break; - } - } - } - - public unsafe int DecodeFrame(byte[] buffer, int pos, int len) - { - fixed (byte* buf = buffer) - { - framereader.Reset(buf, pos, len); - decode_frame_header(framereader, frame); - decode_subframes(framereader, frame); - framereader.flush(); - ushort crc_1 = framereader.get_crc16(); - ushort crc_2 = framereader.read_ushort(); - if (do_crc && crc_1 != crc_2) - throw new Exception("frame crc mismatch"); - restore_samples(frame); - _samplesInBuffer = frame.blocksize; - return framereader.Position - pos; - } - } - - - bool skip_bytes(int bytes) - { - for (int j = 0; j < bytes; j++) - if (0 == _IO.Read(_framesBuffer, 0, 1)) - return false; - return true; - } - - unsafe void decode_metadata() - { - byte x; - int i, id; - //bool first = true; - byte[] FLAC__STREAM_SYNC_STRING = new byte[] { (byte)'f', (byte)'L', (byte)'a', (byte)'C' }; - byte[] ID3V2_TAG_ = new byte[] { (byte)'I', (byte)'D', (byte)'3' }; - - for (i = id = 0; i < 4; ) - { - if (_IO.Read(_framesBuffer, 0, 1) == 0) - throw new Exception("FLAC stream not found"); - x = _framesBuffer[0]; - if (x == FLAC__STREAM_SYNC_STRING[i]) - { - //first = true; - i++; - id = 0; - continue; - } - if (id < 3 && x == ID3V2_TAG_[id]) - { - id++; - i = 0; - if (id == 3) - { - if (!skip_bytes(3)) - throw new Exception("FLAC stream not found"); - int skip = 0; - for (int j = 0; j < 4; j++) - { - if (0 == _IO.Read(_framesBuffer, 0, 1)) - throw new Exception("FLAC stream not found"); - skip <<= 7; - skip |= ((int)_framesBuffer[0] & 0x7f); - } - if (!skip_bytes(skip)) - throw new Exception("FLAC stream not found"); - } - continue; - } - id = 0; - if (x == 0xff) /* MAGIC NUMBER for the first 8 frame sync bits */ - { - do - { - if (_IO.Read(_framesBuffer, 0, 1) == 0) - throw new Exception("FLAC stream not found"); - x = _framesBuffer[0]; - } while (x == 0xff); - if (x >> 2 == 0x3e) /* MAGIC NUMBER for the last 6 sync bits */ - { - //_IO.Position -= 2; - // state = frame - throw new Exception("headerless file unsupported"); - } - } - throw new Exception("FLAC stream not found"); - } - - do - { - fill_frames_buffer(); - fixed (byte* buf = _framesBuffer) - { - BitReader bitreader = new BitReader(buf, _framesBufferOffset, _framesBufferLength - _framesBufferOffset); - bool is_last = bitreader.readbit() != 0; - MetadataType type = (MetadataType)bitreader.readbits(7); - int len = (int)bitreader.readbits(24); - - if (type == MetadataType.StreamInfo) - { - const int FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN = 16; /* bits */ - const int FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN = 16; /* bits */ - const int FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN = 24; /* bits */ - const int FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN = 24; /* bits */ - const int FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN = 20; /* bits */ - const int FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN = 3; /* bits */ - const int FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN = 5; /* bits */ - const int FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN = 36; /* bits */ - const int FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN = 128; /* bits */ - - min_block_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN); - max_block_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN); - min_frame_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN); - max_frame_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN); - int sample_rate = (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN); - int channels = 1 + (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN); - int bits_per_sample = 1 + (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN); - pcm = new AudioPCMConfig(bits_per_sample, channels, sample_rate); - _sampleCount = (long)bitreader.readbits64(FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN); - bitreader.skipbits(FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN); - } - else if (type == MetadataType.Seektable) - { - int num_entries = len / 18; - seek_table = new SeekPoint[num_entries]; - for (int e = 0; e < num_entries; e++) - { - seek_table[e].number = bitreader.read_long(); - seek_table[e].offset = bitreader.read_long(); - seek_table[e].framesize = (int)bitreader.read_ushort(); - } - } - if (_framesBufferLength < 4 + len) - { - _IO.Position += 4 + len - _framesBufferLength; - _framesBufferLength = 0; - } - else - { - _framesBufferLength -= 4 + len; - _framesBufferOffset += 4 + len; - } - if (is_last) - break; - } - } while (true); - first_frame_offset = _IO.Position - _framesBufferLength; - } - } -} + readonly byte[] _framesBuffer; + readonly Stream _IO; + + readonly Crc8 crc8; + readonly FlacFrame frame; + readonly BitReader framereader; + + readonly DecoderSettings m_settings; + readonly int[] residualBuffer; + int _framesBufferLength, _framesBufferOffset; + + long _sampleOffset; + + int _samplesInBuffer, _samplesBufferOffset; + + long first_frame_offset; + uint max_block_size; + uint max_frame_size; + + uint min_block_size; + uint min_frame_size; + + SeekPoint[] seek_table; + + public AudioDecoder(DecoderSettings settings, string path, Stream IO = null) + { + m_settings = settings; + + Path = path; + _IO = IO != null ? IO : new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 0x10000); + + crc8 = new Crc8(); + + _framesBuffer = new byte[0x20000]; + decode_metadata(); + + frame = new FlacFrame(PCM.ChannelCount); + framereader = new BitReader(); + + //max_frame_size = 16 + ((Flake.MAX_BLOCKSIZE * PCM.BitsPerSample * PCM.ChannelCount + 1) + 7) >> 3); + if((int)max_frame_size * PCM.BitsPerSample * PCM.ChannelCount * 2 >> 3 > _framesBuffer.Length) + { + byte[] temp = _framesBuffer; + _framesBuffer = new byte[(int)max_frame_size * PCM.BitsPerSample * PCM.ChannelCount * 2 >> 3]; + if(_framesBufferLength > 0) Array.Copy(temp, _framesBufferOffset, _framesBuffer, 0, _framesBufferLength); + _framesBufferOffset = 0; + } + + _samplesInBuffer = 0; + + if(PCM.BitsPerSample != 16 && PCM.BitsPerSample != 24) throw new Exception("invalid flac file"); + + Samples = new int[FlakeConstants.MAX_BLOCKSIZE * PCM.ChannelCount]; + residualBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * PCM.ChannelCount]; + } + + public AudioDecoder(AudioPCMConfig _pcm) + { + PCM = _pcm; + crc8 = new Crc8(); + + Samples = new int[FlakeConstants.MAX_BLOCKSIZE * PCM.ChannelCount]; + residualBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * PCM.ChannelCount]; + frame = new FlacFrame(PCM.ChannelCount); + framereader = new BitReader(); + } + + public bool DoCRC { get; set; } = true; + + public int[] Samples { get; } + +#region IAudioSource Members + + public IAudioDecoderSettings Settings => m_settings; + + public void Close() + { + _IO.Close(); + } + + public TimeSpan Duration => Length < 0 ? TimeSpan.Zero : TimeSpan.FromSeconds((double)Length / PCM.SampleRate); + + public long Length { get; private set; } + + public long Remaining => Length - Position; + + public long Position + { + get => _sampleOffset - _samplesInBuffer; + set + { + if(value > Length) throw new Exception("seeking past end of stream"); + + if(value < Position || value > _sampleOffset) + { + if(seek_table != null && _IO.CanSeek) + { + int best_st = -1; + + for(var st = 0; st < seek_table.Length; st++) + { + if(seek_table[st].number <= value && + (best_st == -1 || seek_table[st].number > seek_table[best_st].number)) + best_st = st; + } + + if(best_st != -1) + { + _framesBufferLength = 0; + _samplesInBuffer = 0; + _samplesBufferOffset = 0; + _IO.Position = seek_table[best_st].offset + first_frame_offset; + _sampleOffset = seek_table[best_st].number; + } + } + + if(value < Position) throw new Exception("cannot seek backwards without seek table"); + } + + while(value > _sampleOffset) + { + _samplesInBuffer = 0; + _samplesBufferOffset = 0; + + fill_frames_buffer(); + + if(_framesBufferLength == 0) throw new Exception("seek failed"); + + int bytesDecoded = DecodeFrame(_framesBuffer, _framesBufferOffset, _framesBufferLength); + _framesBufferLength -= bytesDecoded; + _framesBufferOffset += bytesDecoded; + + _sampleOffset += _samplesInBuffer; + } + + ; + int diff = _samplesInBuffer - (int)(_sampleOffset - value); + _samplesInBuffer -= diff; + _samplesBufferOffset += diff; + } + } + + public AudioPCMConfig PCM { get; private set; } + + public string Path { get; } + + public int Read(AudioBuffer buff, int maxLength) + { + buff.Prepare(this, maxLength); + + var offset = 0; + int sampleCount = buff.Length; + + while(_samplesInBuffer < sampleCount) + { + if(_samplesInBuffer > 0) + { + interlace(buff, offset, _samplesInBuffer); + sampleCount -= _samplesInBuffer; + offset += _samplesInBuffer; + _samplesInBuffer = 0; + _samplesBufferOffset = 0; + } + + fill_frames_buffer(); + + if(_framesBufferLength == 0) return buff.Length = offset; + + int bytesDecoded = DecodeFrame(_framesBuffer, _framesBufferOffset, _framesBufferLength); + _framesBufferLength -= bytesDecoded; + _framesBufferOffset += bytesDecoded; + + _samplesInBuffer -= _samplesBufferOffset; // can be set by Seek, otherwise zero + _sampleOffset += _samplesInBuffer; + } + + interlace(buff, offset, sampleCount); + _samplesInBuffer -= sampleCount; + _samplesBufferOffset += sampleCount; + if(_samplesInBuffer == 0) _samplesBufferOffset = 0; + + return buff.Length = offset + sampleCount; + } + +#endregion + + unsafe void interlace(AudioBuffer buff, int offset, int count) + { + if(PCM.ChannelCount == 2) + { + fixed(int* src = &Samples[_samplesBufferOffset]) + { + buff.Interlace(offset, src, src + FlakeConstants.MAX_BLOCKSIZE, count); + } + } + else + { + for(var ch = 0; ch < PCM.ChannelCount; ch++) + { + fixed(int* res = &buff.Samples[offset, ch], src = + &Samples[_samplesBufferOffset + ch * FlakeConstants.MAX_BLOCKSIZE]) + { + int* psrc = src; + for(var i = 0; i < count; i++) res[i * PCM.ChannelCount] = *psrc++; + } + } + } + } + + unsafe void fill_frames_buffer() + { + if(_framesBufferLength == 0) + _framesBufferOffset = 0; + else if(_framesBufferLength < _framesBuffer.Length / 2 && _framesBufferOffset >= _framesBuffer.Length / 2) + { + fixed(byte* buff = _framesBuffer) + { + AudioSamples.MemCpy(buff, buff + _framesBufferOffset, _framesBufferLength); + } + + _framesBufferOffset = 0; + } + + while(_framesBufferLength < _framesBuffer.Length / 2) + { + int read = _IO.Read(_framesBuffer, + _framesBufferOffset + _framesBufferLength, + _framesBuffer.Length - _framesBufferOffset - _framesBufferLength); + + _framesBufferLength += read; + + if(read == 0) break; + } + } + + unsafe void decode_frame_header(BitReader bitreader, FlacFrame frame) + { + int header_start = bitreader.Position; + + if(bitreader.readbits(15) != 0x7FFC) throw new Exception("invalid frame"); + uint vbs = bitreader.readbit(); + frame.bs_code0 = (int)bitreader.readbits(4); + uint sr_code0 = bitreader.readbits(4); + frame.ch_mode = (ChannelMode)bitreader.readbits(4); + uint bps_code = bitreader.readbits(3); + + if(FlakeConstants.flac_bitdepths[bps_code] != PCM.BitsPerSample) throw new Exception("unsupported bps coding"); + uint t1 = bitreader.readbit(); // == 0????? + + if(t1 != 0) throw new Exception("unsupported frame coding"); + frame.frame_number = (int)bitreader.read_utf8(); + + // custom block size + if(frame.bs_code0 == 6) + { + frame.bs_code1 = (int)bitreader.readbits(8); + frame.blocksize = frame.bs_code1 + 1; + } + else if(frame.bs_code0 == 7) + { + frame.bs_code1 = (int)bitreader.readbits(16); + frame.blocksize = frame.bs_code1 + 1; + } + else + frame.blocksize = FlakeConstants.flac_blocksizes[frame.bs_code0]; + + // custom sample rate + if(sr_code0 < 1 || sr_code0 > 11) + { + // sr_code0 == 12 -> sr == bitreader.readbits(8) * 1000; + // sr_code0 == 13 -> sr == bitreader.readbits(16); + // sr_code0 == 14 -> sr == bitreader.readbits(16) * 10; + throw new Exception("invalid sample rate mode"); + } + + int frame_channels = (int)frame.ch_mode + 1; + + if(frame_channels > 11) throw new Exception("invalid channel mode"); + + if(frame_channels == 2 || frame_channels > 8) // Mid/Left/Right Side Stereo + frame_channels = 2; + else + frame.ch_mode = ChannelMode.NotStereo; + + if(frame_channels != PCM.ChannelCount) throw new Exception("invalid channel mode"); + + // CRC-8 of frame header + byte crc = DoCRC + ? crc8.ComputeChecksum(bitreader.Buffer, header_start, bitreader.Position - header_start) + : (byte)0; + + frame.crc8 = (byte)bitreader.readbits(8); + + if(DoCRC && frame.crc8 != crc) throw new Exception("header crc mismatch"); + } + + unsafe void decode_subframe_constant(BitReader bitreader, FlacFrame frame, int ch) + { + int obits = frame.subframes[ch].obits; + frame.subframes[ch].best.residual[0] = bitreader.readbits_signed(obits); + } + + unsafe void decode_subframe_verbatim(BitReader bitreader, FlacFrame frame, int ch) + { + int obits = frame.subframes[ch].obits; + + for(var i = 0; i < frame.blocksize; i++) + frame.subframes[ch].best.residual[i] = bitreader.readbits_signed(obits); + } + + unsafe void decode_residual(BitReader bitreader, FlacFrame frame, int ch) + { + // rice-encoded block + // coding method + frame.subframes[ch].best.rc.coding_method = (int)bitreader.readbits(2); // ????? == 0 + + if(frame.subframes[ch].best.rc.coding_method != 0 && frame.subframes[ch].best.rc.coding_method != 1) + throw new Exception("unsupported residual coding"); + + // partition order + frame.subframes[ch].best.rc.porder = (int)bitreader.readbits(4); + + if(frame.subframes[ch].best.rc.porder > 8) throw new Exception("invalid partition order"); + int psize = frame.blocksize >> frame.subframes[ch].best.rc.porder; + int res_cnt = psize - frame.subframes[ch].best.order; + + int rice_len = 4 + frame.subframes[ch].best.rc.coding_method; + + // residual + int j = frame.subframes[ch].best.order; + int* r = frame.subframes[ch].best.residual + j; + + for(var p = 0; p < 1 << frame.subframes[ch].best.rc.porder; p++) + { + if(p == 1) res_cnt = psize; + int n = Math.Min(res_cnt, frame.blocksize - j); + + int k = frame.subframes[ch].best.rc.rparams[p] = (int)bitreader.readbits(rice_len); + + if(k == (1 << rice_len) - 1) + { + k = frame.subframes[ch].best.rc.esc_bps[p] = (int)bitreader.readbits(5); + for(int i = n; i > 0; i--) *r++ = bitreader.readbits_signed(k); + } + else + { + bitreader.read_rice_block(n, k, r); + r += n; + } + + j += n; + } + } + + unsafe void decode_subframe_fixed(BitReader bitreader, FlacFrame frame, int ch) + { + // warm-up samples + int obits = frame.subframes[ch].obits; + + for(var i = 0; i < frame.subframes[ch].best.order; i++) + frame.subframes[ch].best.residual[i] = bitreader.readbits_signed(obits); + + // residual + decode_residual(bitreader, frame, ch); + } + + unsafe void decode_subframe_lpc(BitReader bitreader, FlacFrame frame, int ch) + { + // warm-up samples + int obits = frame.subframes[ch].obits; + + for(var i = 0; i < frame.subframes[ch].best.order; i++) + frame.subframes[ch].best.residual[i] = bitreader.readbits_signed(obits); + + // LPC coefficients + frame.subframes[ch].best.cbits = (int)bitreader.readbits(4) + 1; // lpc_precision + + if(frame.subframes[ch].best.cbits >= 16) throw new Exception("cbits >= 16"); + frame.subframes[ch].best.shift = bitreader.readbits_signed(5); + + if(frame.subframes[ch].best.shift < 0) throw new Exception("negative shift"); + + for(var i = 0; i < frame.subframes[ch].best.order; i++) + frame.subframes[ch].best.coefs[i] = bitreader.readbits_signed(frame.subframes[ch].best.cbits); + + // residual + decode_residual(bitreader, frame, ch); + } + + unsafe void decode_subframes(BitReader bitreader, FlacFrame frame) + { + fixed(int* r = residualBuffer, s = Samples) + { + for(var ch = 0; ch < PCM.ChannelCount; ch++) + { + // subframe header + uint t1 = bitreader.readbit(); // ?????? == 0 + + if(t1 != 0) throw new Exception("unsupported subframe coding (ch == " + ch + ")"); + var type_code = (int)bitreader.readbits(6); + frame.subframes[ch].wbits = (int)bitreader.readbit(); + if(frame.subframes[ch].wbits != 0) frame.subframes[ch].wbits += (int)bitreader.read_unary(); + + frame.subframes[ch].obits = PCM.BitsPerSample - frame.subframes[ch].wbits; + + switch(frame.ch_mode) + { + case ChannelMode.MidSide: + frame.subframes[ch].obits += ch; + + break; + case ChannelMode.LeftSide: + frame.subframes[ch].obits += ch; + + break; + case ChannelMode.RightSide: + frame.subframes[ch].obits += 1 - ch; + + break; + } + + frame.subframes[ch].best.type = (SubframeType)type_code; + frame.subframes[ch].best.order = 0; + + if((type_code & (uint)SubframeType.LPC) != 0) + { + frame.subframes[ch].best.order = type_code - (int)SubframeType.LPC + 1; + frame.subframes[ch].best.type = SubframeType.LPC; + } + else if((type_code & (uint)SubframeType.Fixed) != 0) + { + frame.subframes[ch].best.order = type_code - (int)SubframeType.Fixed; + frame.subframes[ch].best.type = SubframeType.Fixed; + } + + frame.subframes[ch].best.residual = r + ch * FlakeConstants.MAX_BLOCKSIZE; + frame.subframes[ch].samples = s + ch * FlakeConstants.MAX_BLOCKSIZE; + + // subframe + switch(frame.subframes[ch].best.type) + { + case SubframeType.Constant: + decode_subframe_constant(bitreader, frame, ch); + + break; + case SubframeType.Verbatim: + decode_subframe_verbatim(bitreader, frame, ch); + + break; + case SubframeType.Fixed: + decode_subframe_fixed(bitreader, frame, ch); + + break; + case SubframeType.LPC: + decode_subframe_lpc(bitreader, frame, ch); + + break; + default: + throw new Exception("invalid subframe type"); + } + } + } + } + + unsafe void restore_samples_fixed(FlacFrame frame, int ch) + { + FlacSubframeInfo sub = frame.subframes[ch]; + + AudioSamples.MemCpy(sub.samples, sub.best.residual, sub.best.order); + int* data = sub.samples + sub.best.order; + int* residual = sub.best.residual + sub.best.order; + int data_len = frame.blocksize - sub.best.order; + int s0, s1, s2; + + switch(sub.best.order) + { + case 0: + AudioSamples.MemCpy(data, residual, data_len); + + break; + case 1: + s1 = data[-1]; + + for(int i = data_len; i > 0; i--) + { + s1 += *residual++; + *data++ = s1; + } + + //data[i] = residual[i] + data[i - 1]; + break; + case 2: + s2 = data[-2]; + s1 = data[-1]; + + for(int i = data_len; i > 0; i--) + { + s0 = *residual++ + (s1 << 1) - s2; + *data++ = s0; + s2 = s1; + s1 = s0; + } + + //data[i] = residual[i] + data[i - 1] * 2 - data[i - 2]; + break; + case 3: + for(var i = 0; i < data_len; i++) + { + data[i] = residual[i] + + (data[i - 1] - data[i - 2] << 1) + + (data[i - 1] - data[i - 2]) + + data[i - 3]; + } + + break; + case 4: + for(var i = 0; i < data_len; i++) + { + data[i] = residual[i] + + (data[i - 1] + data[i - 3] << 2) - + ((data[i - 2] << 2) + (data[i - 2] << 1)) - + data[i - 4]; + } + + break; + } + } + + unsafe void restore_samples_lpc(FlacFrame frame, int ch) + { + FlacSubframeInfo sub = frame.subframes[ch]; + ulong csum = 0; + + fixed(int* coefs = sub.best.coefs) + { + for(int i = sub.best.order; i > 0; i--) csum += (ulong)Math.Abs(coefs[i - 1]); + + if(csum << sub.obits >= 1UL << 32) + { + lpc.decode_residual_long(sub.best.residual, + sub.samples, + frame.blocksize, + sub.best.order, + coefs, + sub.best.shift); + } + else + { + lpc.decode_residual(sub.best.residual, + sub.samples, + frame.blocksize, + sub.best.order, + coefs, + sub.best.shift); + } + } + } + + unsafe void restore_samples(FlacFrame frame) + { + for(var ch = 0; ch < PCM.ChannelCount; ch++) + { + switch(frame.subframes[ch].best.type) + { + case SubframeType.Constant: + AudioSamples.MemSet(frame.subframes[ch].samples, + frame.subframes[ch].best.residual[0], + frame.blocksize); + + break; + case SubframeType.Verbatim: + AudioSamples.MemCpy(frame.subframes[ch].samples, + frame.subframes[ch].best.residual, + frame.blocksize); + + break; + case SubframeType.Fixed: + restore_samples_fixed(frame, ch); + + break; + case SubframeType.LPC: + restore_samples_lpc(frame, ch); + + break; + } + + if(frame.subframes[ch].wbits != 0) + { + int* s = frame.subframes[ch].samples; + int x = frame.subframes[ch].wbits; + for(int i = frame.blocksize; i > 0; i--) *s++ <<= x; + } + } + + if(frame.ch_mode != ChannelMode.NotStereo) + { + int* l = frame.subframes[0].samples; + int* r = frame.subframes[1].samples; + + switch(frame.ch_mode) + { + case ChannelMode.LeftRight: + break; + case ChannelMode.MidSide: + for(int i = frame.blocksize; i > 0; i--) + { + int mid = *l; + int side = *r; + mid <<= 1; + mid |= side & 1; /* i.e. if 'side' is odd... */ + *l++ = mid + side >> 1; + *r++ = mid - side >> 1; + } + + break; + case ChannelMode.LeftSide: + for(int i = frame.blocksize; i > 0; i--) + { + int _l = *l++, _r = *r; + *r++ = _l - _r; + } + + break; + case ChannelMode.RightSide: + for(int i = frame.blocksize; i > 0; i--) *l++ += *r++; + + break; + } + } + } + + public unsafe int DecodeFrame(byte[] buffer, int pos, int len) + { + fixed(byte* buf = buffer) + { + framereader.Reset(buf, pos, len); + decode_frame_header(framereader, frame); + decode_subframes(framereader, frame); + framereader.flush(); + ushort crc_1 = framereader.get_crc16(); + ushort crc_2 = framereader.read_ushort(); + + if(DoCRC && crc_1 != crc_2) throw new Exception("frame crc mismatch"); + restore_samples(frame); + _samplesInBuffer = frame.blocksize; + + return framereader.Position - pos; + } + } + + + bool skip_bytes(int bytes) + { + for(var j = 0; j < bytes; j++) + if(0 == _IO.Read(_framesBuffer, 0, 1)) + return false; + + return true; + } + + unsafe void decode_metadata() + { + byte x; + int i, id; + + //bool first = true; + byte[] FLAC__STREAM_SYNC_STRING = [(byte)'f', (byte)'L', (byte)'a', (byte)'C']; + byte[] ID3V2_TAG_ = [(byte)'I', (byte)'D', (byte)'3']; + + for(i = id = 0; i < 4;) + { + if(_IO.Read(_framesBuffer, 0, 1) == 0) throw new Exception("FLAC stream not found"); + x = _framesBuffer[0]; + + if(x == FLAC__STREAM_SYNC_STRING[i]) + { + //first = true; + i++; + id = 0; + + continue; + } + + if(id < 3 && x == ID3V2_TAG_[id]) + { + id++; + i = 0; + + if(id == 3) + { + if(!skip_bytes(3)) throw new Exception("FLAC stream not found"); + var skip = 0; + + for(var j = 0; j < 4; j++) + { + if(0 == _IO.Read(_framesBuffer, 0, 1)) throw new Exception("FLAC stream not found"); + skip <<= 7; + skip |= _framesBuffer[0] & 0x7f; + } + + if(!skip_bytes(skip)) throw new Exception("FLAC stream not found"); + } + + continue; + } + + id = 0; + + if(x == 0xff) /* MAGIC NUMBER for the first 8 frame sync bits */ + { + do + { + if(_IO.Read(_framesBuffer, 0, 1) == 0) throw new Exception("FLAC stream not found"); + x = _framesBuffer[0]; + } while(x == 0xff); + + if(x >> 2 == 0x3e) /* MAGIC NUMBER for the last 6 sync bits */ + { + //_IO.Position -= 2; + // state = frame + throw new Exception("headerless file unsupported"); + } + } + + throw new Exception("FLAC stream not found"); + } + + do + { + fill_frames_buffer(); + + fixed(byte* buf = _framesBuffer) + { + var bitreader = new BitReader(buf, _framesBufferOffset, _framesBufferLength - _framesBufferOffset); + bool is_last = bitreader.readbit() != 0; + var type = (MetadataType)bitreader.readbits(7); + var len = (int)bitreader.readbits(24); + + if(type == MetadataType.StreamInfo) + { + const int FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN = 16; /* bits */ + const int FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN = 16; /* bits */ + const int FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN = 24; /* bits */ + const int FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN = 24; /* bits */ + const int FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN = 20; /* bits */ + const int FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN = 3; /* bits */ + const int FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN = 5; /* bits */ + const int FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN = 36; /* bits */ + const int FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN = 128; /* bits */ + + min_block_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN); + max_block_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN); + min_frame_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN); + max_frame_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN); + var sample_rate = (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN); + int channels = 1 + (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN); + + int bits_per_sample = + 1 + (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN); + + PCM = new AudioPCMConfig(bits_per_sample, channels, sample_rate); + Length = (long)bitreader.readbits64(FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN); + bitreader.skipbits(FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN); + } + else if(type == MetadataType.Seektable) + { + int num_entries = len / 18; + seek_table = new SeekPoint[num_entries]; + + for(var e = 0; e < num_entries; e++) + { + seek_table[e].number = bitreader.read_long(); + seek_table[e].offset = bitreader.read_long(); + seek_table[e].framesize = bitreader.read_ushort(); + } + } + + if(_framesBufferLength < 4 + len) + { + _IO.Position += 4 + len - _framesBufferLength; + _framesBufferLength = 0; + } + else + { + _framesBufferLength -= 4 + len; + _framesBufferOffset += 4 + len; + } + + if(is_last) break; + } + } while(true); + + first_frame_offset = _IO.Position - _framesBufferLength; + } +} \ No newline at end of file diff --git a/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/AudioEncoder.cs b/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/AudioEncoder.cs index 54f42e062..e631a0963 100644 --- a/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/AudioEncoder.cs +++ b/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/AudioEncoder.cs @@ -23,131 +23,120 @@ #define VARIANT1 using System; -using System.ComponentModel; -using System.Text; using System.IO; -using System.Collections.Generic; using System.Security.Cryptography; +using System.Text; +using CUETools.Codecs.Flake.Properties; #if INTEROP using System.Runtime.InteropServices; #endif -using CUETools.Codecs; -using Newtonsoft.Json; -namespace CUETools.Codecs.Flake +namespace CUETools.Codecs.Flake; + +public class AudioEncoder : IAudioDest { - public class AudioEncoder : IAudioDest - { - Stream _IO = null; - string _path; - long _position; + Stream _IO; - // number of audio channels - // set by user prior to calling flake_encode_init - // valid values are 1 to 8 - int channels, ch_code; + // number of audio channels + // set by user prior to calling flake_encode_init + // valid values are 1 to 8 + readonly int channels; + int ch_code; - // audio sample rate in Hz - // set by user prior to calling flake_encode_init - int sr_code0, sr_code1; + // audio sample rate in Hz + // set by user prior to calling flake_encode_init + int sr_code0, sr_code1; - // sample size in bits - // set by user prior to calling flake_encode_init - // only 16-bit is currently supported - int bps_code; + // sample size in bits + // set by user prior to calling flake_encode_init + // only 16-bit is currently supported + int bps_code; - // total stream samples - // set by user prior to calling flake_encode_init - // if 0, stream length is unknown - int sample_count = -1; + // total stream samples + // set by user prior to calling flake_encode_init + // if 0, stream length is unknown + int sample_count = -1; - FlakeEncodeParams eparams; + FlakeEncodeParams eparams; - // maximum frame size in bytes - // set by flake_encode_init - // this can be used to allocate memory for output - int max_frame_size; + // maximum frame size in bytes + // set by flake_encode_init + // this can be used to allocate memory for output + int max_frame_size; - byte[] frame_buffer = null; + byte[] frame_buffer; - int frame_count = 0; + int frame_count; - long first_frame_offset = 0; + long first_frame_offset; #if INTEROP TimeSpan _userProcessorTime; #endif - // header bytes - // allocated by flake_encode_init and freed by flake_encode_close - byte[] header; + // header bytes + // allocated by flake_encode_init and freed by flake_encode_close + byte[] header; - int[] samplesBuffer; - int[] verifyBuffer; - int[] residualBuffer; - float[] windowBuffer; - double[] windowScale; - LpcWindowSection[, ,] windowSections; - - WindowFunction[] windowType; - int samplesInBuffer = 0; + readonly int[] samplesBuffer; + int[] verifyBuffer; + readonly int[] residualBuffer; + readonly float[] windowBuffer; + readonly double[] windowScale; + readonly LpcWindowSection[,,] windowSections; - int m_blockSize = 0; - int _totalSize = 0; - int _windowsize = 0, _windowcount = 0; + readonly WindowFunction[] windowType; + int samplesInBuffer; - Crc8 crc8; - MD5 md5; + int m_blockSize; + int _windowsize, _windowcount; - FlacFrame frame; - AudioDecoder verify; + readonly Crc8 crc8; + MD5 md5; - SeekPoint[] seek_table; - int seek_table_offset = -1; + FlacFrame frame; + AudioDecoder verify; - bool inited = false; + SeekPoint[] seek_table; + int seek_table_offset = -1; - public AudioEncoder(EncoderSettings settings, string path, Stream IO = null) - { - m_settings = settings.Clone() as EncoderSettings; - m_settings.Validate(); + bool inited; - //if (Settings.PCM.BitsPerSample != 16) - // throw new Exception("Bits per sample must be 16."); - //if (Settings.PCM.ChannelCount != 2) - // throw new Exception("ChannelCount must be 2."); + public AudioEncoder(EncoderSettings settings, string path, Stream IO = null) + { + m_settings = settings.Clone() as EncoderSettings; + m_settings.Validate(); - channels = Settings.PCM.ChannelCount; + //if (Settings.PCM.BitsPerSample != 16) + // throw new Exception("Bits per sample must be 16."); + //if (Settings.PCM.ChannelCount != 2) + // throw new Exception("ChannelCount must be 2."); - // flake_validate_params + channels = Settings.PCM.ChannelCount; - _path = path; - _IO = IO; + // flake_validate_params - samplesBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * (channels == 2 ? 4 : channels)]; - residualBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * (channels == 2 ? 10 : channels + 1)]; - windowBuffer = new float[FlakeConstants.MAX_BLOCKSIZE * 2 * lpc.MAX_LPC_WINDOWS]; - windowScale = new double[lpc.MAX_LPC_WINDOWS]; - windowType = new WindowFunction[lpc.MAX_LPC_WINDOWS]; - windowSections = new LpcWindowSection[12, lpc.MAX_LPC_WINDOWS, lpc.MAX_LPC_SECTIONS]; + Path = path; + _IO = IO; - eparams.flake_set_defaults(m_settings); + samplesBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * (channels == 2 ? 4 : channels)]; + residualBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * (channels == 2 ? 10 : channels + 1)]; + windowBuffer = new float[FlakeConstants.MAX_BLOCKSIZE * 2 * lpc.MAX_LPC_WINDOWS]; + windowScale = new double[lpc.MAX_LPC_WINDOWS]; + windowType = new WindowFunction[lpc.MAX_LPC_WINDOWS]; + windowSections = new LpcWindowSection[12, lpc.MAX_LPC_WINDOWS, lpc.MAX_LPC_SECTIONS]; - crc8 = new Crc8(); - frame = new FlacFrame(channels * 2); - } + eparams.flake_set_defaults(m_settings); - public int TotalSize - { - get - { - return _totalSize; - } - } + crc8 = new Crc8(); + frame = new FlacFrame(channels * 2); + } - EncoderSettings m_settings; + public int TotalSize { get; private set; } - public IAudioEncoderSettings Settings => m_settings; + readonly EncoderSettings m_settings; + + public IAudioEncoderSettings Settings => m_settings; #if INTEROP [DllImport("kernel32.dll")] @@ -156,309 +145,350 @@ namespace CUETools.Codecs.Flake static extern IntPtr GetCurrentThread(); #endif - void DoClose() - { - if (inited) - { - while (samplesInBuffer > 0) - { - m_blockSize = samplesInBuffer; - output_frame(); - } - - if (_IO.CanSeek) - { - if (sample_count <= 0 && _position != 0) - { - BitWriter bitwriter = new BitWriter(header, 0, 4); - bitwriter.writebits(32, (int)_position); - bitwriter.flush(); - _IO.Position = 22; - _IO.Write(header, 0, 4); - } - - if (md5 != null) - { - md5.TransformFinalBlock(frame_buffer, 0, 0); - _IO.Position = 26; - _IO.Write(md5.Hash, 0, md5.Hash.Length); - } - - if (seek_table != null) - { - _IO.Position = seek_table_offset; - int len = write_seekpoints(header, 0, 0); - _IO.Write(header, 4, len - 4); - } - } - _IO.Close(); - inited = false; + void DoClose() + { + if(inited) + { + while(samplesInBuffer > 0) + { + m_blockSize = samplesInBuffer; + output_frame(); } + if(_IO.CanSeek) + { + if(sample_count <= 0 && Position != 0) + { + var bitwriter = new BitWriter(header, 0, 4); + bitwriter.writebits(32, (int)Position); + bitwriter.flush(); + _IO.Position = 22; + _IO.Write(header, 0, 4); + } + + if(md5 != null) + { + md5.TransformFinalBlock(frame_buffer, 0, 0); + _IO.Position = 26; + _IO.Write(md5.Hash, 0, md5.Hash.Length); + } + + if(seek_table != null) + { + _IO.Position = seek_table_offset; + int len = write_seekpoints(header, 0, 0); + _IO.Write(header, 4, len - 4); + } + } + + _IO.Close(); + inited = false; + } + #if INTEROP long fake, KernelStart, UserStart; GetThreadTimes(GetCurrentThread(), out fake, out fake, out KernelStart, out UserStart); _userProcessorTime = new TimeSpan(UserStart); #endif - } + } - public void Close() - { - DoClose(); - if (sample_count > 0 && _position != sample_count) - throw new Exception(Properties.Resources.ExceptionSampleCount); - } + public void Close() + { + DoClose(); - public void Delete() - { - if (inited) - { - _IO.Close(); - inited = false; - } + if(sample_count > 0 && Position != sample_count) throw new Exception(Resources.ExceptionSampleCount); + } - if (_path != "") - File.Delete(_path); - } - - public long Position - { - get - { - return _position; - } - } - - public long FinalSampleCount - { - set { sample_count = (int)value; } - } - - public OrderMethod OrderMethod - { - get { return eparams.order_method; } - set { eparams.order_method = value; } - } - - public int DevelopmentMode + public void Delete() + { + if(inited) { - get { return eparams.development_mode; } - set { eparams.development_mode = value; } + _IO.Close(); + inited = false; } - public bool DoSeekTable - { - get { return eparams.do_seektable; } - set { eparams.do_seektable = value; } - } + if(Path != "") File.Delete(Path); + } - public int VBRMode - { - get { return eparams.variable_block_size; } - set { eparams.variable_block_size = value; } - } + public long Position { get; private set; } - public TimeSpan UserProcessorTime - { - get - { -#if INTEROP - return _userProcessorTime; + public long FinalSampleCount + { + set => sample_count = (int)value; + } + + public OrderMethod OrderMethod + { + get => eparams.order_method; + set => eparams.order_method = value; + } + + public int DevelopmentMode + { + get => eparams.development_mode; + set => eparams.development_mode = value; + } + + public bool DoSeekTable + { + get => eparams.do_seektable; + set => eparams.do_seektable = value; + } + + public int VBRMode + { + get => eparams.variable_block_size; + set => eparams.variable_block_size = value; + } + + public TimeSpan UserProcessorTime + { + get + { +#if INTEROP + return _userProcessorTime; #else - return new TimeSpan(0); + return new TimeSpan(0); #endif - } - } + } + } - unsafe int get_wasted_bits(int* signal, int samples) - { - int i, shift; - int x = 0; + unsafe int get_wasted_bits(int* signal, int samples) + { + int i, shift; + var x = 0; - for (i = 0; i < samples && 0 == (x & 1); i++) - x |= signal[i]; + for(i = 0; i < samples && 0 == (x & 1); i++) x |= signal[i]; - if (x == 0) - { - shift = 0; - } - else - { - for (shift = 0; 0 == (x & 1); shift++) - x >>= 1; - } + if(x == 0) + shift = 0; + else + for(shift = 0; 0 == (x & 1); shift++) + x >>= 1; - if (shift > 0) - { - for (i = 0; i < samples; i++) - signal[i] >>= shift; - } + if(shift > 0) + for(i = 0; i < samples; i++) + signal[i] >>= shift; - return shift; - } + return shift; + } - /// - /// Copy channel-interleaved input samples into separate subframes - /// - /// - /// - /// - unsafe void copy_samples(int[,] samples, int pos, int block) - { - fixed (int* fsamples = samplesBuffer, src = &samples[pos, 0]) - { - if (channels == 2) - { - if (m_settings.StereoMethod == StereoMethod.Independent) - AudioSamples.Deinterlace(fsamples + samplesInBuffer, fsamples + FlakeConstants.MAX_BLOCKSIZE + samplesInBuffer, src, block); - else - { - int* left = fsamples + samplesInBuffer; - int* right = left + FlakeConstants.MAX_BLOCKSIZE; - int* leftM = right + FlakeConstants.MAX_BLOCKSIZE; - int* rightM = leftM + FlakeConstants.MAX_BLOCKSIZE; - for (int i = 0; i < block; i++) - { - int l = src[2 * i]; - int r = src[2 * i + 1]; - left[i] = l; - right[i] = r; - leftM[i] = (l + r) >> 1; - rightM[i] = l - r; - } - } - } - else - for (int ch = 0; ch < channels; ch++) - { - int* psamples = fsamples + ch * FlakeConstants.MAX_BLOCKSIZE + samplesInBuffer; - for (int i = 0; i < block; i++) - psamples[i] = src[i * channels + ch]; - } - } - samplesInBuffer += block; - } - - //unsafe static void channel_decorrelation(int* leftS, int* rightS, int *leftM, int *rightM, int blocksize) - //{ - // for (int i = 0; i < blocksize; i++) - // { - // leftM[i] = (leftS[i] + rightS[i]) >> 1; - // rightM[i] = leftS[i] - rightS[i]; - // } - //} - - unsafe void encode_residual_verbatim(int* res, int* smp, uint n) - { - AudioSamples.MemCpy(res, smp, (int) n); - } - - unsafe static ulong encode_residual_fixed_partition(int* res, int* smp, int* end, int order, int* last_errors) + /// + /// Copy channel-interleaved input samples into separate subframes + /// + /// + /// + /// + unsafe void copy_samples(int[,] samples, int pos, int block) + { + fixed(int* fsamples = samplesBuffer, src = &samples[pos, 0]) { - ulong sum = 0UL; - switch (order) + if(channels == 2) { - case 0: + if(m_settings.StereoMethod == StereoMethod.Independent) + { + AudioSamples.Deinterlace(fsamples + samplesInBuffer, + fsamples + FlakeConstants.MAX_BLOCKSIZE + samplesInBuffer, + src, + block); + } + else + { + int* left = fsamples + samplesInBuffer; + int* right = left + FlakeConstants.MAX_BLOCKSIZE; + int* leftM = right + FlakeConstants.MAX_BLOCKSIZE; + int* rightM = leftM + FlakeConstants.MAX_BLOCKSIZE; + + for(var i = 0; i < block; i++) { - while (smp < end) - { - int error = *(res++) = *(smp++); - sum += (uint)((error << 1) ^ (error >> 31)); - } - break; + int l = src[2 * i]; + int r = src[2 * i + 1]; + left[i] = l; + right[i] = r; + leftM[i] = l + r >> 1; + rightM[i] = l - r; } - case 1: - { - int last_error_0 = last_errors[0]; - while (smp < end) - { - int error, save; - error = *(smp++); save = error; - error -= last_error_0; *(res++) = error; last_error_0 = save; - sum += (uint)((error << 1) ^ (error >> 31)); - } - last_errors[0] = last_error_0; - break; - } - case 2: - { - int last_error_0 = last_errors[0], last_error_1 = last_errors[1]; - while (smp < end) - { - int error, save; - error = *(smp++); save = error; - error -= last_error_0; last_error_0 = save; save = error; - error -= last_error_1; *(res++) = error; last_error_1 = save; - sum += (uint)((error << 1) ^ (error >> 31)); - } - last_errors[0] = last_error_0; last_errors[1] = last_error_1; ; - break; - } - case 3: - { - int last_error_0 = last_errors[0], last_error_1 = last_errors[1], last_error_2 = last_errors[2]; - while (smp < end) - { - int error, save; - error = *(smp++); save = error; - error -= last_error_0; last_error_0 = save; save = error; - error -= last_error_1; last_error_1 = save; save = error; - error -= last_error_2; *(res++) = error; last_error_2 = save; - sum += (uint)((error << 1) ^ (error >> 31)); - } - last_errors[0] = last_error_0; last_errors[1] = last_error_1; last_errors[2] = last_error_2; - break; - } - case 4: - { - int last_error_0 = last_errors[0], last_error_1 = last_errors[1], last_error_2 = last_errors[2], last_error_3 = last_errors[3]; - while (smp < end) - { - int error, save; - error = *(smp++); save = error; - error -= last_error_0; last_error_0 = save; save = error; - error -= last_error_1; last_error_1 = save; save = error; - error -= last_error_2; last_error_2 = save; save = error; - error -= last_error_3; *(res++) = error; last_error_3 = save; - sum += (uint)((error << 1) ^ (error >> 31)); - } - last_errors[0] = last_error_0; last_errors[1] = last_error_1; last_errors[2] = last_error_2; last_errors[3] = last_error_3; - break; - } - default: - throw new ArgumentOutOfRangeException(); + } + } + else + { + for(var ch = 0; ch < channels; ch++) + { + int* psamples = fsamples + ch * FlakeConstants.MAX_BLOCKSIZE + samplesInBuffer; + for(var i = 0; i < block; i++) psamples[i] = src[i * channels + ch]; + } } - return sum; } - unsafe static void encode_residual_fixed(int* res, int* smp, int n, int order, ulong* sums, int pmax) - { - int* last_errors = stackalloc int[4]; - int* end = smp + n; - int* seg_end = smp + (n >> pmax); + samplesInBuffer += block; + } - if (order > 4) + //unsafe static void channel_decorrelation(int* leftS, int* rightS, int *leftM, int *rightM, int blocksize) + //{ + // for (int i = 0; i < blocksize; i++) + // { + // leftM[i] = (leftS[i] + rightS[i]) >> 1; + // rightM[i] = leftS[i] - rightS[i]; + // } + //} + + unsafe void encode_residual_verbatim(int* res, int* smp, uint n) + { + AudioSamples.MemCpy(res, smp, (int)n); + } + + static unsafe ulong encode_residual_fixed_partition(int* res, int* smp, int* end, int order, int* last_errors) + { + var sum = 0UL; + + switch(order) + { + case 0: + { + while(smp < end) + { + int error = *res++ = *smp++; + sum += (uint)(error << 1 ^ error >> 31); + } + + break; + } + case 1: + { + int last_error_0 = last_errors[0]; + + while(smp < end) + { + int error, save; + error = *smp++; + save = error; + error -= last_error_0; + *res++ = error; + last_error_0 = save; + sum += (uint)(error << 1 ^ error >> 31); + } + + last_errors[0] = last_error_0; + + break; + } + case 2: + { + int last_error_0 = last_errors[0], last_error_1 = last_errors[1]; + + while(smp < end) + { + int error, save; + error = *smp++; + save = error; + error -= last_error_0; + last_error_0 = save; + save = error; + error -= last_error_1; + *res++ = error; + last_error_1 = save; + sum += (uint)(error << 1 ^ error >> 31); + } + + last_errors[0] = last_error_0; + last_errors[1] = last_error_1; + ; + + break; + } + case 3: + { + int last_error_0 = last_errors[0], last_error_1 = last_errors[1], last_error_2 = last_errors[2]; + + while(smp < end) + { + int error, save; + error = *smp++; + save = error; + error -= last_error_0; + last_error_0 = save; + save = error; + error -= last_error_1; + last_error_1 = save; + save = error; + error -= last_error_2; + *res++ = error; + last_error_2 = save; + sum += (uint)(error << 1 ^ error >> 31); + } + + last_errors[0] = last_error_0; + last_errors[1] = last_error_1; + last_errors[2] = last_error_2; + + break; + } + case 4: + { + int last_error_0 = last_errors[0], + last_error_1 = last_errors[1], + last_error_2 = last_errors[2], + last_error_3 = last_errors[3]; + + while(smp < end) + { + int error, save; + error = *smp++; + save = error; + error -= last_error_0; + last_error_0 = save; + save = error; + error -= last_error_1; + last_error_1 = save; + save = error; + error -= last_error_2; + last_error_2 = save; + save = error; + error -= last_error_3; + *res++ = error; + last_error_3 = save; + sum += (uint)(error << 1 ^ error >> 31); + } + + last_errors[0] = last_error_0; + last_errors[1] = last_error_1; + last_errors[2] = last_error_2; + last_errors[3] = last_error_3; + + break; + } + default: throw new ArgumentOutOfRangeException(); - - for (int i = 0; i < order; i++) - { - int* next_errors = stackalloc int[4]; - next_errors[0] = *(res++) = *(smp++); - for (int j = 0; j < i; j++) - next_errors[j + 1] = next_errors[j] - last_errors[j]; - for (int j = 0; j <= i; j++) - last_errors[j] = next_errors[j]; - } - - while (smp < end) - { - *(sums++) = encode_residual_fixed_partition(res, smp, seg_end, order, last_errors); - res += seg_end - smp; - smp = seg_end; - seg_end += n >> pmax; - } } + return sum; + } + + static unsafe void encode_residual_fixed(int* res, int* smp, int n, int order, ulong* sums, int pmax) + { + int* last_errors = stackalloc int[4]; + int* end = smp + n; + int* seg_end = smp + (n >> pmax); + + if(order > 4) throw new ArgumentOutOfRangeException(); + + for(var i = 0; i < order; i++) + { + int* next_errors = stackalloc int[4]; + next_errors[0] = *res++ = *smp++; + for(var j = 0; j < i; j++) next_errors[j + 1] = next_errors[j] - last_errors[j]; + for(var j = 0; j <= i; j++) last_errors[j] = next_errors[j]; + } + + while(smp < end) + { + *sums++ = encode_residual_fixed_partition(res, smp, seg_end, order, last_errors); + res += seg_end - smp; + smp = seg_end; + seg_end += n >> pmax; + } + } + #if XXX unsafe static int encode_residual_fixed_estimate_best_order(int* res, int* smp, int n, int order) { @@ -610,417 +640,514 @@ namespace CUETools.Codecs.Flake throw new ArgumentOutOfRangeException(); } #endif - static unsafe uint calc_optimal_rice_params(int porder, int* parm, ulong* sums, uint n, uint pred_order, ref int method) - { - uint part = (1U << porder); - uint cnt = (n >> porder) - pred_order; - int maxK = method > 0 ? 30 : FlakeConstants.MAX_RICE_PARAM; - int k = cnt > 0 ? Math.Min(maxK, BitReader.log2i(sums[0] / cnt)) : 0; - int realMaxK0 = k; - ulong all_bits = cnt * ((uint)k + 1U) + (sums[0] >> k); - parm[0] = k; - cnt = (n >> porder); - int logcnt = BitReader.log2i(cnt); - if (cnt == 1 << logcnt) - { - for (uint i = 1; i < part; i++) - { - ulong s = sums[i]; - ulong u = s >> logcnt; - k = u >> maxK != 0 ? maxK : BitReader.log2i((uint)u); - realMaxK0 = Math.Max(realMaxK0, k); - all_bits += ((uint)k << logcnt) + (s >> k); - parm[i] = k; - } - } - else - { - for (uint i = 1; i < part; i++) - { - ulong s = sums[i]; - ulong u = s / cnt; - k = u >> maxK != 0 ? maxK : BitReader.log2i((uint)u); - realMaxK0 = Math.Max(realMaxK0, k); - all_bits += cnt * (uint)k + (s >> k); - parm[i] = k; - } - } - all_bits += cnt * (part - 1U); - method = realMaxK0 > FlakeConstants.MAX_RICE_PARAM ? 1 : 0; - return (uint)all_bits + ((4U + (uint)method) * part); - } + static unsafe uint calc_optimal_rice_params(int porder, int* parm, ulong* sums, uint n, uint pred_order, + ref int method) + { + uint part = 1U << porder; + uint cnt = (n >> porder) - pred_order; + int maxK = method > 0 ? 30 : FlakeConstants.MAX_RICE_PARAM; + int k = cnt > 0 ? Math.Min(maxK, BitReader.log2i(sums[0] / cnt)) : 0; + int realMaxK0 = k; + ulong all_bits = cnt * ((uint)k + 1U) + (sums[0] >> k); + parm[0] = k; + cnt = n >> porder; + int logcnt = BitReader.log2i(cnt); - static unsafe void calc_lower_sums(int pmin, int pmax, ulong* sums) - { - for (int i = pmax - 1; i >= pmin; i--) - { - for (int j = 0; j < (1 << i); j++) - { - sums[i * FlakeConstants.MAX_PARTITIONS + j] = - sums[(i + 1) * FlakeConstants.MAX_PARTITIONS + 2 * j] + - sums[(i + 1) * FlakeConstants.MAX_PARTITIONS + 2 * j + 1]; - } - } - } - - static unsafe uint calc_rice_params_sums(RiceContext rc, int pmin, int pmax, ulong* sums, uint n, uint pred_order, int bps) + if(cnt == 1 << logcnt) { - int* parm = stackalloc int[(pmax + 1) * FlakeConstants.MAX_PARTITIONS]; - //uint* bits = stackalloc uint[FlakeConstants.MAX_PARTITION_ORDER]; - - //assert(pmin >= 0 && pmin <= FlakeConstants.MAX_PARTITION_ORDER); - //assert(pmax >= 0 && pmax <= FlakeConstants.MAX_PARTITION_ORDER); - //assert(pmin <= pmax); - - // sums for lower levels - calc_lower_sums(pmin, pmax, sums); - - uint opt_bits = AudioSamples.UINT32_MAX; - int opt_porder = pmin; - int opt_method = 0; - for (int i = pmin; i <= pmax; i++) + for(uint i = 1; i < part; i++) { - int method = bps > 16 ? 1 : 0; - uint bits = calc_optimal_rice_params(i, parm + i * FlakeConstants.MAX_PARTITIONS, sums + i * FlakeConstants.MAX_PARTITIONS, n, pred_order, ref method); - if (bits <= opt_bits) - { - opt_bits = bits; - opt_porder = i; - opt_method = method; - } + ulong s = sums[i]; + ulong u = s >> logcnt; + k = u >> maxK != 0 ? maxK : BitReader.log2i((uint)u); + realMaxK0 = Math.Max(realMaxK0, k); + all_bits += ((uint)k << logcnt) + (s >> k); + parm[i] = k; + } + } + else + { + for(uint i = 1; i < part; i++) + { + ulong s = sums[i]; + ulong u = s / cnt; + k = u >> maxK != 0 ? maxK : BitReader.log2i((uint)u); + realMaxK0 = Math.Max(realMaxK0, k); + all_bits += cnt * (uint)k + (s >> k); + parm[i] = k; } - - rc.porder = opt_porder; - rc.coding_method = opt_method; - fixed (int* rparms = rc.rparams) - AudioSamples.MemCpy(rparms, parm + opt_porder * FlakeConstants.MAX_PARTITIONS, (1 << opt_porder)); - - return opt_bits; } - static int get_max_p_order(int max_porder, int n, int order) - { - int porder = Math.Min(max_porder, BitReader.log2i(n ^ (n - 1))); - if (order > 0) - porder = Math.Min(porder, BitReader.log2i(n / order)); - return porder; - } + all_bits += cnt * (part - 1U); + method = realMaxK0 > FlakeConstants.MAX_RICE_PARAM ? 1 : 0; + + return (uint)all_bits + (4U + (uint)method) * part; + } + + static unsafe void calc_lower_sums(int pmin, int pmax, ulong* sums) + { + for(int i = pmax - 1; i >= pmin; i--) + { + for(var j = 0; j < 1 << i; j++) + { + sums[i * FlakeConstants.MAX_PARTITIONS + j] = + sums[(i + 1) * FlakeConstants.MAX_PARTITIONS + 2 * j] + + sums[(i + 1) * FlakeConstants.MAX_PARTITIONS + 2 * j + 1]; + } + } + } + + static unsafe uint calc_rice_params_sums(RiceContext rc, int pmin, int pmax, ulong* sums, uint n, uint pred_order, + int bps) + { + int* parm = stackalloc int[(pmax + 1) * FlakeConstants.MAX_PARTITIONS]; + + //uint* bits = stackalloc uint[FlakeConstants.MAX_PARTITION_ORDER]; + + //assert(pmin >= 0 && pmin <= FlakeConstants.MAX_PARTITION_ORDER); + //assert(pmax >= 0 && pmax <= FlakeConstants.MAX_PARTITION_ORDER); + //assert(pmin <= pmax); + + // sums for lower levels + calc_lower_sums(pmin, pmax, sums); + + uint opt_bits = AudioSamples.UINT32_MAX; + int opt_porder = pmin; + var opt_method = 0; + + for(int i = pmin; i <= pmax; i++) + { + int method = bps > 16 ? 1 : 0; + + uint bits = calc_optimal_rice_params(i, + parm + i * FlakeConstants.MAX_PARTITIONS, + sums + i * FlakeConstants.MAX_PARTITIONS, + n, + pred_order, + ref method); + + if(bits <= opt_bits) + { + opt_bits = bits; + opt_porder = i; + opt_method = method; + } + } + + rc.porder = opt_porder; + rc.coding_method = opt_method; + + fixed(int* rparms = rc.rparams) + { + AudioSamples.MemCpy(rparms, parm + opt_porder * FlakeConstants.MAX_PARTITIONS, 1 << opt_porder); + } + + return opt_bits; + } + + static int get_max_p_order(int max_porder, int n, int order) + { + int porder = Math.Min(max_porder, BitReader.log2i(n ^ n - 1)); + if(order > 0) porder = Math.Min(porder, BitReader.log2i(n / order)); + + return porder; + } // private static int[,] best_x = new int[14,8193]; - private static int[][] good_x = new int[][] { -new int[] {}, // 0 -new int[] { // 1 -0x03,0x01,0x00,0x02 -}, -new int[] {// 2 -0x01,0x07,0x06,0x02, 0x03,0x04,0x00,0x05 -}, -new int[] { // 3 -0x0b,0x0f,0x0e,0x0d, 0x03,0x01,0x05,0x02 -}, -new int[] { //4 -0x17,0x09,0x03,0x0a, 0x06,0x1d,0x1f,0x05, 0x1c,0x0d,0x07,0x0c, -}, -new int[] { // 5 -0x2b,0x3d,0x37,0x07, 0x11,0x15,0x36,0x3f, -}, -new int[] { // 6 -0x6b,0x15,0x7e,0x31, 0x07,0x1a,0x29,0x26, 0x5d,0x23,0x6f,0x19, 0x56,0x75 -}, -new int[] { // 7 -0xdb,0xef,0xb5,0x47, 0xee,0x63,0x0b,0xfd, 0x31,0xbe,0xed,0x33, 0xff,0xfb,0xd6,0xbb -}, -new int[] { // 8 -0x1bb,0x1c7,0x069,0x087, 0x1fd,0x16e,0x095,0x1de, 0x066,0x071,0x055,0x09a, -}, -new int[] { // 9 -0x36b,0x3bd,0x097,0x0c3, 0x0e3,0x0b1,0x107,0x2de, 0x3ef,0x2fb,0x3d5,0x139 -}, -new int[] { // 10 + static readonly int[][] good_x = + { + [], // 0 + [ // 1 + 0x03, 0x01, 0x00, 0x02 + ], + [ // 2 + 0x01, 0x07, 0x06, 0x02, 0x03, 0x04, 0x00, 0x05 + ], + [ // 3 + 0x0b, 0x0f, 0x0e, 0x0d, 0x03, 0x01, 0x05, 0x02 + ], + [ //4 + 0x17, 0x09, 0x03, 0x0a, 0x06, 0x1d, 0x1f, 0x05, 0x1c, 0x0d, 0x07, 0x0c + ], + [ // 5 + 0x2b, 0x3d, 0x37, 0x07, 0x11, 0x15, 0x36, 0x3f + ], + [ // 6 + 0x6b, 0x15, 0x7e, 0x31, 0x07, 0x1a, 0x29, 0x26, 0x5d, 0x23, 0x6f, 0x19, 0x56, 0x75 + ], + [ // 7 + 0xdb, 0xef, 0xb5, 0x47, 0xee, 0x63, 0x0b, 0xfd, 0x31, 0xbe, 0xed, 0x33, 0xff, 0xfb, 0xd6, 0xbb + ], + [ // 8 + 0x1bb, 0x1c7, 0x069, 0x087, 0x1fd, 0x16e, 0x095, 0x1de, 0x066, 0x071, 0x055, 0x09a + ], + [ // 9 + 0x36b, 0x3bd, 0x097, 0x0c3, 0x0e3, 0x0b1, 0x107, 0x2de, 0x3ef, 0x2fb, 0x3d5, 0x139 + ], + [ // 10 //0x0e3,0x199,0x383,0x307, 0x1e3,0x01f,0x269,0x0f1, 0x266,0x03f,0x2cd,0x1c3, 0x19a,0x387,0x339,0x259, -0x6eb,0x187,0x77d,0x271, 0x195,0x259,0x5ae,0x169, -}, -new int[] { // 11 -0xddb,0xf77,0xb6d,0x587, 0x2c3,0x03b,0xef5,0x1e3, 0xdbe, -}, -new int[] { // 12 -0x1aeb,0x0587,0x0a71,0x1dbd, 0x0559,0x0aa5,0x0a2e,0x0d43, 0x05aa,0x00f3,0x0696,0x03c6, -}, -new int[] { // 13 -0x35d7,0x2f6f,0x0aa3,0x1569, 0x150f,0x3d79,0x0dc3,0x309f/*?*/, -}, -new int[] { // 14 -0x75d7,0x5f7b,0x6a8f,0x29a3, -}, -new int[] { // 15 -0xddd7,0xaaaf,0x55c3,0xf77b, -}, -new int[] { // 16 -0x1baeb,0x1efaf,0x1d5bf,0x1cff3, -}, -new int[] { // 17 -0x36dd7,0x3bb7b,0x3df6f,0x2d547, -}, -new int[] { // 18 -0x75dd7,0x6f77b,0x7aaaf,0x5ddd3, -}, -new int[] { // 19 -0xdddd7,0xf777b,0xd5547,0xb6ddb, -}, -new int[] { // 20 -0x1baeeb,0x1efbaf,0x1aaabf,0x17bbeb, -}, -new int[] { // 21 -0x376dd7,0x3ddf7b,0x2d550f,0x0aaaa3, -}, -new int[] { // 22 -0x6eddd7,0x77777b,0x5dcd4f,0x5d76f9, -}, -new int[] { // 23 -0xdeddd7,0xb5b6eb,0x55552b,0x2aaac3, -}, -new int[] { // 24 -0x1dddbb7,0x1b76eeb,0x17bbf5f,0x1eeaa9f, -}, -new int[] { // 25 -}, -new int[] { // 26 -}, -new int[] { // 27 -}, -new int[] { // 28 -}, -new int[] { // 29 -}, -new int[] { // 30 -}, - }; + 0x6eb, 0x187, 0x77d, 0x271, 0x195, 0x259, 0x5ae, 0x169 + ], + [ // 11 + 0xddb, 0xf77, 0xb6d, 0x587, 0x2c3, 0x03b, 0xef5, 0x1e3, 0xdbe + ], + [ // 12 + 0x1aeb, 0x0587, 0x0a71, 0x1dbd, 0x0559, 0x0aa5, 0x0a2e, 0x0d43, 0x05aa, 0x00f3, 0x0696, 0x03c6 + ], + [ // 13 + 0x35d7, 0x2f6f, 0x0aa3, 0x1569, 0x150f, 0x3d79, 0x0dc3, 0x309f /*?*/ + ], + [ // 14 + 0x75d7, 0x5f7b, 0x6a8f, 0x29a3 + ], + [ // 15 + 0xddd7, 0xaaaf, 0x55c3, 0xf77b + ], + [ // 16 + 0x1baeb, 0x1efaf, 0x1d5bf, 0x1cff3 + ], + [ // 17 + 0x36dd7, 0x3bb7b, 0x3df6f, 0x2d547 + ], + [ // 18 + 0x75dd7, 0x6f77b, 0x7aaaf, 0x5ddd3 + ], + [ // 19 + 0xdddd7, 0xf777b, 0xd5547, 0xb6ddb + ], + [ // 20 + 0x1baeeb, 0x1efbaf, 0x1aaabf, 0x17bbeb + ], + [ // 21 + 0x376dd7, 0x3ddf7b, 0x2d550f, 0x0aaaa3 + ], + [ // 22 + 0x6eddd7, 0x77777b, 0x5dcd4f, 0x5d76f9 + ], + [ // 23 + 0xdeddd7, 0xb5b6eb, 0x55552b, 0x2aaac3 + ], + [ // 24 + 0x1dddbb7, 0x1b76eeb, 0x17bbf5f, 0x1eeaa9f + ], + [ // 25 + ], + [ // 26 + ], + [ // 27 + ], + [ // 28 + ], + [ // 29 + ], + [ // 30 + ] + }; - unsafe void postprocess_coefs(FlacFrame frame, FlacSubframe sf, int ch) + unsafe void postprocess_coefs(FlacFrame frame, FlacSubframe sf, int ch) + { + if(eparams.development_mode < 0) return; + if(sf.type != SubframeType.LPC || sf.order > 30) return; + int orig_window = sf.window; + int orig_order = sf.order; + int orig_shift = sf.shift; + int orig_cbits = sf.cbits; + uint orig_size = sf.size; + int* orig_coefs = stackalloc int[orig_order]; + for(var i = 0; i < orig_order; i++) orig_coefs[i] = sf.coefs[i]; + int orig_xx = -1; + var orig_seq = 0; + int maxxx = Math.Min(good_x[orig_order].Length, eparams.development_mode); + int pmax = get_max_p_order(m_settings.MaxPartitionOrder, frame.blocksize, orig_order); + int pmin = Math.Min(m_settings.MinPartitionOrder, pmax); + ulong* sums = stackalloc ulong[(pmax + 1) * FlakeConstants.MAX_PARTITIONS]; + + while(true) { - if (eparams.development_mode < 0) - return; - if (sf.type != SubframeType.LPC || sf.order > 30) - return; - int orig_window = sf.window; - int orig_order = sf.order; - int orig_shift = sf.shift; - int orig_cbits = sf.cbits; - uint orig_size = sf.size; - var orig_coefs = stackalloc int[orig_order]; - for (int i = 0; i < orig_order; i++) orig_coefs[i] = sf.coefs[i]; - int orig_xx = -1; - int orig_seq = 0; - int maxxx = Math.Min(good_x[orig_order].Length, eparams.development_mode); - var pmax = get_max_p_order(m_settings.MaxPartitionOrder, frame.blocksize, orig_order); - var pmin = Math.Min(m_settings.MinPartitionOrder, pmax); - ulong* sums = stackalloc ulong[(pmax + 1) * FlakeConstants.MAX_PARTITIONS]; + int* best_coefs = stackalloc int[orig_order]; + int best_shift = orig_shift; + int best_cbits = orig_cbits; + uint best_size = orig_size; + int best_xx = -1; - while (true) + for(int xx = -1; xx < maxxx; xx++) { - var best_coefs = stackalloc int[orig_order]; - int best_shift = orig_shift; - int best_cbits = orig_cbits; - uint best_size = orig_size; - int best_xx = -1; - for (int xx = -1; xx < maxxx; xx++) + int x = xx; + + if(xx < 0) { - int x = xx; - if (xx < 0) - { - if (orig_xx < 0 || maxxx < 1/*3*/)// || (orig_xx >> orig_order) != 0) - continue; - x = orig_xx; - orig_seq++; - } - else - { - orig_seq = 0; - if (orig_order < good_x.Length && good_x[orig_order] != null) - x = good_x[orig_order][xx]; - } + if(orig_xx < 0 || maxxx < 1 /*3*/) // || (orig_xx >> orig_order) != 0) + continue; - frame.current.type = SubframeType.LPC; - frame.current.order = orig_order; - frame.current.window = orig_window; - frame.current.shift = orig_shift; - frame.current.cbits = orig_cbits; - - if (((x >> orig_order) & 1) != 0) - { - frame.current.shift--; - frame.current.cbits--; - if (frame.current.shift < 0 || frame.current.cbits < 2) - continue; - } - - ulong csum = 0; - int qmax = (1 << (frame.current.cbits - 1)) - 1; - for (int i = 0; i < frame.current.order; i++) - { - int shift = (x >> orig_order) & 1; - int increment = (x == 1 << orig_order) ? 0 : (((x >> i) & 1) << 1) - 1; - frame.current.coefs[i] = (orig_coefs[i] + (increment << orig_seq)) >> shift; - if (frame.current.coefs[i] < -(qmax + 1)) frame.current.coefs[i] = -(qmax + 1); - if (frame.current.coefs[i] > qmax) frame.current.coefs[i] = qmax; - csum += (ulong)Math.Abs(frame.current.coefs[i]); - } - - fixed (int* coefs = frame.current.coefs) - { - if ((csum << frame.subframes[ch].obits) >= 1UL << 32) - lpc.encode_residual_long(frame.current.residual, frame.subframes[ch].samples, frame.blocksize, frame.current.order, coefs, frame.current.shift, sums + pmax * FlakeConstants.MAX_PARTITIONS, pmax); - else - lpc.encode_residual(frame.current.residual, frame.subframes[ch].samples, frame.blocksize, frame.current.order, coefs, frame.current.shift, sums + pmax * FlakeConstants.MAX_PARTITIONS, pmax); - } - - var cur_size = calc_rice_params_sums(frame.current.rc, pmin, pmax, sums, (uint)frame.blocksize, (uint)frame.current.order, Settings.PCM.BitsPerSample); - frame.current.size = (uint)(frame.current.order * frame.subframes[ch].obits + 4 + 5 + frame.current.order * frame.current.cbits + 6 + (int)cur_size); - - if (frame.current.size < best_size) - { - //var dif = best_size - frame.current.size; - for (int i = 0; i < frame.current.order; i++) best_coefs[i] = frame.current.coefs[i]; - best_shift = frame.current.shift; - best_cbits = frame.current.cbits; - best_size = frame.current.size; - best_xx = x; - frame.ChooseBestSubframe(ch); - //if (dif > orig_order * 5) - // break; - } - - if (xx < 0 && best_size < orig_size) - break; - } - - if (best_size < orig_size) - { - //if (best_xx >= 0) best_x[order, best_xx]++; - //if (orig_size != 0x7FFFFFFF) - // System.Console.Write(string.Format(" {0}[{1:x}]", orig_size - best_size, best_xx)); - for (int i = 0; i < orig_order; i++) orig_coefs[i] = best_coefs[i]; - orig_shift = best_shift; - orig_cbits = best_cbits; - orig_size = best_size; - orig_xx = best_xx; + x = orig_xx; + orig_seq++; } else { - break; + orig_seq = 0; + if(orig_order < good_x.Length && good_x[orig_order] != null) x = good_x[orig_order][xx]; } + + frame.current.type = SubframeType.LPC; + frame.current.order = orig_order; + frame.current.window = orig_window; + frame.current.shift = orig_shift; + frame.current.cbits = orig_cbits; + + if((x >> orig_order & 1) != 0) + { + frame.current.shift--; + frame.current.cbits--; + + if(frame.current.shift < 0 || frame.current.cbits < 2) continue; + } + + ulong csum = 0; + int qmax = (1 << frame.current.cbits - 1) - 1; + + for(var i = 0; i < frame.current.order; i++) + { + int shift = x >> orig_order & 1; + int increment = x == 1 << orig_order ? 0 : ((x >> i & 1) << 1) - 1; + frame.current.coefs[i] = orig_coefs[i] + (increment << orig_seq) >> shift; + if(frame.current.coefs[i] < -(qmax + 1)) frame.current.coefs[i] = -(qmax + 1); + if(frame.current.coefs[i] > qmax) frame.current.coefs[i] = qmax; + csum += (ulong)Math.Abs(frame.current.coefs[i]); + } + + fixed(int* coefs = frame.current.coefs) + { + if(csum << frame.subframes[ch].obits >= 1UL << 32) + { + lpc.encode_residual_long(frame.current.residual, + frame.subframes[ch].samples, + frame.blocksize, + frame.current.order, + coefs, + frame.current.shift, + sums + pmax * FlakeConstants.MAX_PARTITIONS, + pmax); + } + else + { + lpc.encode_residual(frame.current.residual, + frame.subframes[ch].samples, + frame.blocksize, + frame.current.order, + coefs, + frame.current.shift, + sums + pmax * FlakeConstants.MAX_PARTITIONS, + pmax); + } + } + + uint cur_size = calc_rice_params_sums(frame.current.rc, + pmin, + pmax, + sums, + (uint)frame.blocksize, + (uint)frame.current.order, + Settings.PCM.BitsPerSample); + + frame.current.size = (uint)(frame.current.order * frame.subframes[ch].obits + + 4 + + 5 + + frame.current.order * frame.current.cbits + + 6 + + (int)cur_size); + + if(frame.current.size < best_size) + { + //var dif = best_size - frame.current.size; + for(var i = 0; i < frame.current.order; i++) best_coefs[i] = frame.current.coefs[i]; + best_shift = frame.current.shift; + best_cbits = frame.current.cbits; + best_size = frame.current.size; + best_xx = x; + frame.ChooseBestSubframe(ch); + + //if (dif > orig_order * 5) + // break; + } + + if(xx < 0 && best_size < orig_size) break; } - //if (orig_size != 0x7FFFFFFF) - // System.Console.WriteLine(); - - //if (frame_count % 0x400 == 0) - //{ - // for (int o = 0; o < best_x.GetLength(0); o++) - // { - // //for (int x = 0; x <= (1 << o); x++) - // // if (best_x[o, x] != 0) - // // System.Console.WriteLine(string.Format("{0:x2}\t{1:x4}\t{2}", o, x, best_x[o, x])); - // var s = new List>(); - // for (int x = 0; x < (1 << o); x++) - // if (best_x[o, x] != 0) - // s.Add(new KeyValuePair(x, best_x[o, x])); - // s.Sort((x, y) => y.Value.CompareTo(x.Value)); - // foreach (var x in s) - // System.Console.WriteLine(string.Format("{0:x2}\t{1:x4}\t{2}", o, x.Key, x.Value)); - // int i = 0; - // foreach (var x in s) - // { - // System.Console.Write(string.Format(o <= 8 ? "0x{0:x2}," : "0x{0:x3},", x.Key)); - // if ((++i) % 16 == 0) - // System.Console.WriteLine(); - // } - // System.Console.WriteLine(); - // } - //} + if(best_size < orig_size) + { + //if (best_xx >= 0) best_x[order, best_xx]++; + //if (orig_size != 0x7FFFFFFF) + // System.Console.Write(string.Format(" {0}[{1:x}]", orig_size - best_size, best_xx)); + for(var i = 0; i < orig_order; i++) orig_coefs[i] = best_coefs[i]; + orig_shift = best_shift; + orig_cbits = best_cbits; + orig_size = best_size; + orig_xx = best_xx; + } + else + break; } - public static void SetCoefs(int order, int[] coefs) - { - good_x[order] = new int[coefs.Length]; - for (int i = 0; i < coefs.Length; i++) - good_x[order][i] = coefs[i]; - } + //if (orig_size != 0x7FFFFFFF) + // System.Console.WriteLine(); - unsafe void encode_residual_lpc_sub(FlacFrame frame, float* lpcs, int iWindow, int order, int ch) - { - // select LPC precision based on block size - uint lpc_precision; - if (frame.blocksize <= 192) lpc_precision = 7U; - else if (frame.blocksize <= 384) lpc_precision = 8U; - else if (frame.blocksize <= 576) lpc_precision = 9U; - else if (frame.blocksize <= 1152) lpc_precision = 10U; - else if (frame.blocksize <= 2304) lpc_precision = 11U; - else if (frame.blocksize <= 4608) lpc_precision = 12U; - else if (frame.blocksize <= 8192) lpc_precision = 13U; - else if (frame.blocksize <= 16384) lpc_precision = 14U; - else lpc_precision = 15; + //if (frame_count % 0x400 == 0) + //{ + // for (int o = 0; o < best_x.GetLength(0); o++) + // { + // //for (int x = 0; x <= (1 << o); x++) + // // if (best_x[o, x] != 0) + // // System.Console.WriteLine(string.Format("{0:x2}\t{1:x4}\t{2}", o, x, best_x[o, x])); + // var s = new List>(); + // for (int x = 0; x < (1 << o); x++) + // if (best_x[o, x] != 0) + // s.Add(new KeyValuePair(x, best_x[o, x])); + // s.Sort((x, y) => y.Value.CompareTo(x.Value)); + // foreach (var x in s) + // System.Console.WriteLine(string.Format("{0:x2}\t{1:x4}\t{2}", o, x.Key, x.Value)); + // int i = 0; + // foreach (var x in s) + // { + // System.Console.Write(string.Format(o <= 8 ? "0x{0:x2}," : "0x{0:x3},", x.Key)); + // if ((++i) % 16 == 0) + // System.Console.WriteLine(); + // } + // System.Console.WriteLine(); + // } + //} + } - for (int i_precision = m_settings.MinPrecisionSearch; i_precision <= m_settings.MaxPrecisionSearch && lpc_precision + i_precision < 16; i_precision++) - // check if we already calculated with this order, window and precision - if ((frame.subframes[ch].lpc_ctx[iWindow].done_lpcs[i_precision] & (1U << (order - 1))) == 0) + public static void SetCoefs(int order, int[] coefs) + { + good_x[order] = new int[coefs.Length]; + for(var i = 0; i < coefs.Length; i++) good_x[order][i] = coefs[i]; + } + + unsafe void encode_residual_lpc_sub(FlacFrame frame, float* lpcs, int iWindow, int order, int ch) + { + // select LPC precision based on block size + uint lpc_precision; + + if(frame.blocksize <= 192) + lpc_precision = 7U; + else if(frame.blocksize <= 384) + lpc_precision = 8U; + else if(frame.blocksize <= 576) + lpc_precision = 9U; + else if(frame.blocksize <= 1152) + lpc_precision = 10U; + else if(frame.blocksize <= 2304) + lpc_precision = 11U; + else if(frame.blocksize <= 4608) + lpc_precision = 12U; + else if(frame.blocksize <= 8192) + lpc_precision = 13U; + else if(frame.blocksize <= 16384) + lpc_precision = 14U; + else + lpc_precision = 15; + + for(int i_precision = m_settings.MinPrecisionSearch; + i_precision <= m_settings.MaxPrecisionSearch && lpc_precision + i_precision < 16; + i_precision++) + + // check if we already calculated with this order, window and precision + { + if((frame.subframes[ch].lpc_ctx[iWindow].done_lpcs[i_precision] & 1U << order - 1) == 0) + { + frame.subframes[ch].lpc_ctx[iWindow].done_lpcs[i_precision] |= 1U << order - 1; + + uint cbits = lpc_precision + (uint)i_precision; + + frame.current.type = SubframeType.LPC; + frame.current.order = order; + frame.current.window = iWindow; + frame.current.cbits = (int)cbits; + + int pmax = get_max_p_order(m_settings.MaxPartitionOrder, frame.blocksize, frame.current.order); + int pmin = Math.Min(m_settings.MinPartitionOrder, pmax); + ulong* sums = stackalloc ulong[(pmax + 1) * FlakeConstants.MAX_PARTITIONS]; + ulong csum = 0; + + fixed(int* coefs = frame.current.coefs) { - frame.subframes[ch].lpc_ctx[iWindow].done_lpcs[i_precision] |= (1U << (order - 1)); + lpc.quantize_lpc_coefs(lpcs + (frame.current.order - 1) * lpc.MAX_LPC_ORDER, + frame.current.order, + cbits, + coefs, + out frame.current.shift, + 15, + 0); - uint cbits = lpc_precision + (uint)i_precision; + if(frame.current.shift < 0 || frame.current.shift > 15) throw new Exception("negative shift"); - frame.current.type = SubframeType.LPC; - frame.current.order = order; - frame.current.window = iWindow; - frame.current.cbits = (int)cbits; + for(int i = frame.current.order; i > 0; i--) csum += (ulong)Math.Abs(coefs[i - 1]); - int pmax = get_max_p_order(m_settings.MaxPartitionOrder, frame.blocksize, frame.current.order); - int pmin = Math.Min(m_settings.MinPartitionOrder, pmax); - ulong* sums = stackalloc ulong[(pmax + 1) * FlakeConstants.MAX_PARTITIONS]; - ulong csum = 0; - fixed (int* coefs = frame.current.coefs) + if(csum << frame.subframes[ch].obits >= 1UL << 32) { - lpc.quantize_lpc_coefs(lpcs + (frame.current.order - 1) * lpc.MAX_LPC_ORDER, - frame.current.order, cbits, coefs, out frame.current.shift, 15, 0); - - if (frame.current.shift < 0 || frame.current.shift > 15) - throw new Exception("negative shift"); - - for (int i = frame.current.order; i > 0; i--) - csum += (ulong)Math.Abs(coefs[i - 1]); - - if ((csum << frame.subframes[ch].obits) >= 1UL << 32) - lpc.encode_residual_long(frame.current.residual, frame.subframes[ch].samples, frame.blocksize, frame.current.order, coefs, frame.current.shift, sums + pmax * FlakeConstants.MAX_PARTITIONS, pmax); - else - lpc.encode_residual(frame.current.residual, frame.subframes[ch].samples, frame.blocksize, frame.current.order, coefs, frame.current.shift, sums + pmax * FlakeConstants.MAX_PARTITIONS, pmax); - + lpc.encode_residual_long(frame.current.residual, + frame.subframes[ch].samples, + frame.blocksize, + frame.current.order, + coefs, + frame.current.shift, + sums + pmax * FlakeConstants.MAX_PARTITIONS, + pmax); + } + else + { + lpc.encode_residual(frame.current.residual, + frame.subframes[ch].samples, + frame.blocksize, + frame.current.order, + coefs, + frame.current.shift, + sums + pmax * FlakeConstants.MAX_PARTITIONS, + pmax); } - uint best_size = calc_rice_params_sums(frame.current.rc, pmin, pmax, sums, (uint)frame.blocksize, (uint)frame.current.order, Settings.PCM.BitsPerSample); - frame.current.size = (uint)(frame.current.order * frame.subframes[ch].obits + 4 + 5 + frame.current.order * (int)cbits + 6 + (int)best_size); - frame.ChooseBestSubframe(ch); - //if (frame.current.size >= frame.subframes[ch].best.size) - // postprocess_coefs(frame, frame.current, ch); - //else - //{ - // frame.ChooseBestSubframe(ch); - // postprocess_coefs(frame, frame.subframes[ch].best, ch); - //} } + + uint best_size = calc_rice_params_sums(frame.current.rc, + pmin, + pmax, + sums, + (uint)frame.blocksize, + (uint)frame.current.order, + Settings.PCM.BitsPerSample); + + frame.current.size = (uint)(frame.current.order * frame.subframes[ch].obits + + 4 + + 5 + + frame.current.order * (int)cbits + + 6 + + (int)best_size); + + frame.ChooseBestSubframe(ch); + + //if (frame.current.size >= frame.subframes[ch].best.size) + // postprocess_coefs(frame, frame.current, ch); + //else + //{ + // frame.ChooseBestSubframe(ch); + // postprocess_coefs(frame, frame.subframes[ch].best, ch); + //} + } } + } - unsafe void encode_residual_fixed_sub(FlacFrame frame, int order, int ch) - { - if ((frame.subframes[ch].done_fixed & (1U << order)) != 0) - return; // already calculated; + unsafe void encode_residual_fixed_sub(FlacFrame frame, int order, int ch) + { + if((frame.subframes[ch].done_fixed & 1U << order) != 0) return; // already calculated; - frame.current.order = order; - frame.current.type = SubframeType.Fixed; + frame.current.order = order; + frame.current.type = SubframeType.Fixed; #if XXX int best_order = order; if (frame.subframes[ch].done_fixed == 0) { - best_order = encode_residual_fixed_estimate_best_order(frame.current.residual, frame.subframes[ch].samples, frame.blocksize, frame.current.order); + best_order = + encode_residual_fixed_estimate_best_order(frame.current.residual, frame.subframes[ch].samples, frame.blocksize, frame.current.order); if (best_order != order) { //frame.subframes[ch].done_fixed |= (1U << order); @@ -1031,38 +1158,66 @@ new int[] { // 30 } else #endif - int pmax = get_max_p_order(m_settings.MaxPartitionOrder, frame.blocksize, frame.current.order); - int pmin = Math.Min(m_settings.MinPartitionOrder, pmax); - ulong* sums = stackalloc ulong[(pmax + 1) * FlakeConstants.MAX_PARTITIONS]; - encode_residual_fixed(frame.current.residual, frame.subframes[ch].samples, frame.blocksize, frame.current.order, sums + pmax * FlakeConstants.MAX_PARTITIONS, pmax); + int pmax = get_max_p_order(m_settings.MaxPartitionOrder, frame.blocksize, frame.current.order); + int pmin = Math.Min(m_settings.MinPartitionOrder, pmax); + ulong* sums = stackalloc ulong[(pmax + 1) * FlakeConstants.MAX_PARTITIONS]; - frame.current.size = (uint)(frame.current.order * frame.subframes[ch].obits) + 6 - + calc_rice_params_sums(frame.current.rc, pmin, pmax, sums, (uint)frame.blocksize, (uint)frame.current.order, Settings.PCM.BitsPerSample); + encode_residual_fixed(frame.current.residual, + frame.subframes[ch].samples, + frame.blocksize, + frame.current.order, + sums + pmax * FlakeConstants.MAX_PARTITIONS, + pmax); - frame.subframes[ch].done_fixed |= (1U << order); + frame.current.size = (uint)(frame.current.order * frame.subframes[ch].obits) + + 6 + + calc_rice_params_sums(frame.current.rc, + pmin, + pmax, + sums, + (uint)frame.blocksize, + (uint)frame.current.order, + Settings.PCM.BitsPerSample); - frame.ChooseBestSubframe(ch); - } + frame.subframes[ch].done_fixed |= 1U << order; - unsafe void fixed_compute_best_predictor(int* data, uint data_len, ulong* errors)//, float* residual_bits_per_sample) - { - long last_error_0 = data[-1]; - long last_error_1 = data[-1] - data[-2]; - long last_error_2 = last_error_1 - (data[-2] - data[-3]); - long last_error_3 = last_error_2 - (data[-2] - 2 * data[-3] + data[-4]); - ulong total_error_0 = 0, total_error_1 = 0, total_error_2 = 0, total_error_3 = 0, total_error_4 = 0; + frame.ChooseBestSubframe(ch); + } + + unsafe void + fixed_compute_best_predictor(int* data, uint data_len, ulong* errors) //, float* residual_bits_per_sample) + { + long last_error_0 = data[-1]; + long last_error_1 = data[-1] - data[-2]; + long last_error_2 = last_error_1 - (data[-2] - data[-3]); + long last_error_3 = last_error_2 - (data[-2] - 2 * data[-3] + data[-4]); + ulong total_error_0 = 0, total_error_1 = 0, total_error_2 = 0, total_error_3 = 0, total_error_4 = 0; #if VARIANT1 - long error, save; - int* finish = data + data_len; - while (data < finish) - { - error = *(data++); total_error_0 += (ulong)((error << 1) ^ (error >> 63)); save = error; - error -= last_error_0; total_error_1 += (ulong)((error << 1) ^ (error >> 63)); last_error_0 = save; save = error; - error -= last_error_1; total_error_2 += (ulong)((error << 1) ^ (error >> 63)); last_error_1 = save; save = error; - error -= last_error_2; total_error_3 += (ulong)((error << 1) ^ (error >> 63)); last_error_2 = save; save = error; - error -= last_error_3; total_error_4 += (ulong)((error << 1) ^ (error >> 63)); last_error_3 = save; - } + long error, save; + int* finish = data + data_len; + + while(data < finish) + { + error = *data++; + total_error_0 += (ulong)(error << 1 ^ error >> 63); + save = error; + error -= last_error_0; + total_error_1 += (ulong)(error << 1 ^ error >> 63); + last_error_0 = save; + save = error; + error -= last_error_1; + total_error_2 += (ulong)(error << 1 ^ error >> 63); + last_error_1 = save; + save = error; + error -= last_error_2; + total_error_3 += (ulong)(error << 1 ^ error >> 63); + last_error_2 = save; + save = error; + error -= last_error_3; + total_error_4 += (ulong)(error << 1 ^ error >> 63); + last_error_3 = save; + } #else int* finish = data + data_len; while (data < finish) @@ -1086,770 +1241,886 @@ new int[] { // 30 } #endif - errors[0] = total_error_0; - errors[1] = total_error_1; - errors[2] = total_error_2; - errors[3] = total_error_3; - errors[4] = total_error_4; + errors[0] = total_error_0; + errors[1] = total_error_1; + errors[2] = total_error_2; + errors[3] = total_error_3; + errors[4] = total_error_4; - //residual_bits_per_sample[0] = (float)((total_error_0 > 0) ? log(M_LN2 * (FLAC__double)total_error_0 / (FLAC__double)data_len) / M_LN2 : 0.0); - //residual_bits_per_sample[1] = (float)((total_error_1 > 0) ? log(M_LN2 * (FLAC__double)total_error_1 / (FLAC__double)data_len) / M_LN2 : 0.0); - //residual_bits_per_sample[2] = (float)((total_error_2 > 0) ? log(M_LN2 * (FLAC__double)total_error_2 / (FLAC__double)data_len) / M_LN2 : 0.0); - //residual_bits_per_sample[3] = (float)((total_error_3 > 0) ? log(M_LN2 * (FLAC__double)total_error_3 / (FLAC__double)data_len) / M_LN2 : 0.0); - //residual_bits_per_sample[4] = (float)((total_error_4 > 0) ? log(M_LN2 * (FLAC__double)total_error_4 / (FLAC__double)data_len) / M_LN2 : 0.0); - } + //residual_bits_per_sample[0] = (float)((total_error_0 > 0) ? log(M_LN2 * (FLAC__double)total_error_0 / (FLAC__double)data_len) / M_LN2 : 0.0); + //residual_bits_per_sample[1] = (float)((total_error_1 > 0) ? log(M_LN2 * (FLAC__double)total_error_1 / (FLAC__double)data_len) / M_LN2 : 0.0); + //residual_bits_per_sample[2] = (float)((total_error_2 > 0) ? log(M_LN2 * (FLAC__double)total_error_2 / (FLAC__double)data_len) / M_LN2 : 0.0); + //residual_bits_per_sample[3] = (float)((total_error_3 > 0) ? log(M_LN2 * (FLAC__double)total_error_3 / (FLAC__double)data_len) / M_LN2 : 0.0); + //residual_bits_per_sample[4] = (float)((total_error_4 > 0) ? log(M_LN2 * (FLAC__double)total_error_4 / (FLAC__double)data_len) / M_LN2 : 0.0); + } - unsafe int fixed_compute_best_predictor_order(ulong* error) + unsafe int fixed_compute_best_predictor_order(ulong* error) + { + int order; + + if(error[0] < error[1] & error[0] < error[2] & error[0] < error[3] & error[0] < error[4]) + order = 0; + else if(error[1] < error[2] & error[1] < error[3] & error[1] < error[4]) + order = 1; + else if(error[2] < error[3] & error[2] < error[4]) + order = 2; + else if(error[3] < error[4]) + order = 3; + else + order = 4; + + return order; + } + + unsafe void encode_residual(FlacFrame frame, int ch, PredictionType predict, OrderMethod omethod, int pass, + int windows_mask) + { + int* smp = frame.subframes[ch].samples; + int i, n = frame.blocksize; + + // save best.window, because we can overwrite it later with fixed frame + + // CONSTANT + for(i = 1; i < n; i++) { - int order; - if ((error[0] < error[1]) & (error[0] < error[2]) & (error[0] < error[3]) & (error[0] < error[4])) - order = 0; - else if ((error[1] < error[2]) & (error[1] < error[3]) & (error[1] < error[4])) - order = 1; - else if ((error[2] < error[3]) & (error[2] < error[4])) - order = 2; - else if (error[3] < error[4]) - order = 3; - else - order = 4; - return order; + if(smp[i] != smp[0]) break; } - unsafe void encode_residual(FlacFrame frame, int ch, PredictionType predict, OrderMethod omethod, int pass, int windows_mask) - { - int* smp = frame.subframes[ch].samples; - int i, n = frame.blocksize; - // save best.window, because we can overwrite it later with fixed frame - - // CONSTANT - for (i = 1; i < n; i++) - { - if (smp[i] != smp[0]) break; - } - if (i == n) - { - frame.subframes[ch].best.type = SubframeType.Constant; - frame.subframes[ch].best.residual[0] = smp[0]; - frame.subframes[ch].best.size = (uint)frame.subframes[ch].obits; - return; - } - - // VERBATIM - frame.current.type = SubframeType.Verbatim; - frame.current.size = (uint)(frame.subframes[ch].obits * frame.blocksize); - frame.ChooseBestSubframe(ch); - - if (n < 5 || predict == PredictionType.None) - return; - - // LPC - if (n > m_settings.MaxLPCOrder && - (predict == PredictionType.Levinson || - predict == PredictionType.Search) - //predict == PredictionType.Search || - //(pass == 2 && frame.subframes[ch].best.type == SubframeType.LPC)) - ) - { - float* lpcs = stackalloc float[lpc.MAX_LPC_ORDER * lpc.MAX_LPC_ORDER]; - int min_order = m_settings.MinLPCOrder; - int max_order = m_settings.MaxLPCOrder; - - for (int iWindow = 0; iWindow < _windowcount; iWindow++) - { - if ((windows_mask & (1 << iWindow)) == 0) - continue; - - LpcContext lpc_ctx = frame.subframes[ch].lpc_ctx[iWindow]; - fixed (LpcWindowSection* sections = &windowSections[frame.nSeg, iWindow, 0]) - lpc_ctx.GetReflection( - frame.subframes[ch].sf, max_order, frame.blocksize, - smp, frame.window_buffer + iWindow * FlakeConstants.MAX_BLOCKSIZE * 2, sections); - lpc_ctx.ComputeLPC(lpcs); - - //int frameSize = n; - //float* F = stackalloc float[frameSize]; - //float* B = stackalloc float[frameSize]; - //float* PE = stackalloc float[max_order + 1]; - //float* arp = stackalloc float[max_order]; - //float* rc = stackalloc float[max_order]; - - //for (int j = 0; j < frameSize; j++) - // F[j] = B[j] = smp[j]; - - //for (int K = 1; K <= max_order; K++) - //{ - // // BURG: - // float denominator = 0.0f; - // //float denominator = F[K - 1] * F[K - 1] + B[frameSize - K] * B[frameSize - K]; - // for (int j = 0; j < frameSize - K; j++) - // denominator += F[j + K] * F[j + K] + B[j] * B[j]; - // denominator /= 2; - - // // Estimate error - // PE[K - 1] = denominator / (frameSize - K); - - // float reflectionCoeff = 0.0f; - // for (int j = 0; j < frameSize - K; j++) - // reflectionCoeff += F[j + K] * B[j]; - // reflectionCoeff /= denominator; - // rc[K - 1] = arp[K - 1] = reflectionCoeff; - - // // Levinson-Durbin - // for (int j = 0; j < (K - 1) >> 1; j++) - // { - // float arptmp = arp[j]; - // arp[j] -= reflectionCoeff * arp[K - 2 - j]; - // arp[K - 2 - j] -= reflectionCoeff * arptmp; - // } - // if (((K - 1) & 1) != 0) - // arp[(K - 1) >> 1] -= reflectionCoeff * arp[(K - 1) >> 1]; - - // for (int j = 0; j < frameSize - K; j++) - // { - // float f = F[j + K]; - // float b = B[j]; - // F[j + K] = f - reflectionCoeff * b; - // B[j] = b - reflectionCoeff * f; - // } - - // for (int j = 0; j < K; j++) - // lpcs[(K - 1) * lpc.MAX_LPC_ORDER + j] = (float)arp[j]; - //} - - switch (omethod) - { - case OrderMethod.Akaike: - //lpc_ctx.SortOrdersAkaike(frame.blocksize, m_settings.EstimationDepth, max_order, 7.1, 0.0); - lpc_ctx.SortOrdersAkaike(frame.blocksize, m_settings.EstimationDepth, min_order, max_order, 4.5, 0); - break; - default: - throw new Exception("unknown order method"); - } - - for (i = 0; i < m_settings.EstimationDepth && i < max_order; i++) - encode_residual_lpc_sub(frame, lpcs, iWindow, lpc_ctx.best_orders[i], ch); - } - - postprocess_coefs(frame, frame.subframes[ch].best, ch); - } - - // FIXED - if (predict == PredictionType.Fixed || - (predict == PredictionType.Search && pass != 1) || - //predict == PredictionType.Search || - //(pass == 2 && frame.subframes[ch].best.type == SubframeType.Fixed) || - (n > m_settings.MaxFixedOrder && n <= m_settings.MaxLPCOrder)) - { - int max_fixed_order = Math.Min(m_settings.MaxFixedOrder, 4); - int min_fixed_order = Math.Min(m_settings.MinFixedOrder, max_fixed_order); - - if (min_fixed_order == 0 && max_fixed_order == 4) - { - fixed (ulong* fixed_errors = frame.subframes[ch].best_fixed) - { - if ((frame.subframes[ch].done_fixed & (1U << 5)) == 0) - { - fixed_compute_best_predictor(smp + 4, (uint)n - 4, fixed_errors); - frame.subframes[ch].done_fixed |= (1U << 5); - } - i = fixed_compute_best_predictor_order(fixed_errors); - encode_residual_fixed_sub(frame, i, ch); - } - } - else - { - for (i = max_fixed_order; i >= min_fixed_order; i--) - encode_residual_fixed_sub(frame, i, ch); - } - } - - } - - unsafe void output_frame_header(FlacFrame frame, BitWriter bitwriter) - { - bitwriter.writebits(15, 0x7FFC); - bitwriter.writebits(1, eparams.variable_block_size > 0 ? 1 : 0); - bitwriter.writebits(4, frame.bs_code0); - bitwriter.writebits(4, sr_code0); - if (frame.ch_mode == ChannelMode.NotStereo) - bitwriter.writebits(4, ch_code); - else - bitwriter.writebits(4, (int) frame.ch_mode); - bitwriter.writebits(3, bps_code); - bitwriter.writebits(1, 0); - bitwriter.write_utf8(frame_count); - - // custom block size - if (frame.bs_code1 >= 0) - { - if (frame.bs_code1 < 256) - bitwriter.writebits(8, frame.bs_code1); - else - bitwriter.writebits(16, frame.bs_code1); - } - - // custom sample rate - if (sr_code1 > 0) - { - if (sr_code1 < 256) - bitwriter.writebits(8, sr_code1); - else - bitwriter.writebits(16, sr_code1); - } - - // CRC-8 of frame header - bitwriter.flush(); - byte crc = crc8.ComputeChecksum(frame_buffer, 0, bitwriter.Length); - bitwriter.writebits(8, crc); - } - - unsafe void output_residual(FlacFrame frame, BitWriter bitwriter, FlacSubframeInfo sub) - { - // rice-encoded block - bitwriter.writebits(2, sub.best.rc.coding_method); - - // partition order - int porder = sub.best.rc.porder; - int psize = frame.blocksize >> porder; - //assert(porder >= 0); - bitwriter.writebits(4, porder); - int res_cnt = psize - sub.best.order; - - int rice_len = 4 + sub.best.rc.coding_method; - // residual - int j = sub.best.order; - fixed (byte* fixbuf = &frame_buffer[0]) - for (int p = 0; p < (1 << porder); p++) - { - int k = sub.best.rc.rparams[p]; - bitwriter.writebits(rice_len, k); - if (p == 1) res_cnt = psize; - int cnt = Math.Min(res_cnt, frame.blocksize - j); - bitwriter.write_rice_block_signed(fixbuf, k, sub.best.residual + j, cnt); - j += cnt; - } - } - - unsafe void - output_subframe_constant(FlacFrame frame, BitWriter bitwriter, FlacSubframeInfo sub) - { - bitwriter.writebits_signed(sub.obits, sub.best.residual[0]); - } - - unsafe void - output_subframe_verbatim(FlacFrame frame, BitWriter bitwriter, FlacSubframeInfo sub) - { - int n = frame.blocksize; - for (int i = 0; i < n; i++) - bitwriter.writebits_signed(sub.obits, sub.samples[i]); - // Don't use residual here, because we don't copy samples to residual for verbatim frames. - } - - unsafe void - output_subframe_fixed(FlacFrame frame, BitWriter bitwriter, FlacSubframeInfo sub) - { - // warm-up samples - for (int i = 0; i < sub.best.order; i++) - bitwriter.writebits_signed(sub.obits, sub.best.residual[i]); - - // residual - output_residual(frame, bitwriter, sub); - } - - unsafe void - output_subframe_lpc(FlacFrame frame, BitWriter bitwriter, FlacSubframeInfo sub) - { - // warm-up samples - for (int i = 0; i < sub.best.order; i++) - bitwriter.writebits_signed(sub.obits, sub.best.residual[i]); - - // LPC coefficients - int cbits = 1; - for (int i = 0; i < sub.best.order; i++) - while (cbits < 16 && sub.best.coefs[i] != (sub.best.coefs[i] << (32 - cbits)) >> (32 - cbits)) - cbits++; - bitwriter.writebits(4, cbits - 1); - bitwriter.writebits_signed(5, sub.best.shift); - for (int i = 0; i < sub.best.order; i++) - bitwriter.writebits_signed(cbits, sub.best.coefs[i]); - - // residual - output_residual(frame, bitwriter, sub); - } - - unsafe void output_subframes(FlacFrame frame, BitWriter bitwriter) - { - for (int ch = 0; ch < channels; ch++) - { - FlacSubframeInfo sub = frame.subframes[ch]; - // subframe header - int type_code = (int) sub.best.type; - if (sub.best.type == SubframeType.Fixed) - type_code |= sub.best.order; - if (sub.best.type == SubframeType.LPC) - type_code |= sub.best.order - 1; - bitwriter.writebits(1, 0); - bitwriter.writebits(6, type_code); - bitwriter.writebits(1, sub.wbits != 0 ? 1 : 0); - if (sub.wbits > 0) - bitwriter.writebits((int)sub.wbits, 1); - - // subframe - switch (sub.best.type) - { - case SubframeType.Constant: - output_subframe_constant(frame, bitwriter, sub); - break; - case SubframeType.Verbatim: - output_subframe_verbatim(frame, bitwriter, sub); - break; - case SubframeType.Fixed: - output_subframe_fixed(frame, bitwriter, sub); - break; - case SubframeType.LPC: - output_subframe_lpc(frame, bitwriter, sub); - break; - } - } - } - - void output_frame_footer(BitWriter bitwriter) - { - bitwriter.flush(); - ushort crc = bitwriter.get_crc16(); - bitwriter.writebits(16, crc); - bitwriter.flush(); - } - - unsafe void encode_residual_pass1(FlacFrame frame, int ch, int windows_mask) - { - int max_prediction_order = m_settings.MaxLPCOrder; - //int max_fixed_order = m_settings.MaxFixedOrder; - //int min_fixed_order = m_settings.MinFixedOrder; - int lpc_min_precision_search = m_settings.MinPrecisionSearch; - int lpc_max_precision_search = m_settings.MaxPrecisionSearch; - int max_partition_order = m_settings.MaxPartitionOrder; - int estimation_depth = m_settings.EstimationDepth; - var development_mode = eparams.development_mode; - //m_settings.MinFixedOrder = 2; - //m_settings.MaxFixedOrder = 2; - m_settings.MinPrecisionSearch = m_settings.MaxPrecisionSearch; - m_settings.MaxLPCOrder = Math.Min(m_settings.MaxLPCOrder, Math.Max(m_settings.MinLPCOrder, 8)); - m_settings.EstimationDepth = 1; - eparams.development_mode = Math.Min(eparams.development_mode, -1); - encode_residual(frame, ch, m_settings.PredictionType, OrderMethod.Akaike, 1, windows_mask); - //m_settings.MinFixedOrder = min_fixed_order; - //m_settings.MaxFixedOrder = max_fixed_order; - m_settings.MaxLPCOrder = max_prediction_order; - m_settings.MinPrecisionSearch = lpc_min_precision_search; - m_settings.MaxPrecisionSearch = lpc_max_precision_search; - m_settings.MaxPartitionOrder = max_partition_order; - m_settings.EstimationDepth = estimation_depth; - eparams.development_mode = development_mode; - } - - unsafe void encode_residual_pass2(FlacFrame frame, int ch) - { - encode_residual(frame, ch, m_settings.PredictionType, eparams.order_method, 2, estimate_best_windows(frame, ch)); - } - - unsafe int estimate_best_windows_akaike(FlacFrame frame, int ch, int count, bool onePerType) + if(i == n) { - int* windows_present = stackalloc int[_windowcount]; - for (int i = 0; i < _windowcount; i++) - windows_present[i] = 0; - if (onePerType) - { - for (int i = 0; i < _windowcount; i++) - for (int j = 0; j < _windowcount; j++) - if (windowType[j] == windowType[i]) - windows_present[j]++; - } + frame.subframes[ch].best.type = SubframeType.Constant; + frame.subframes[ch].best.residual[0] = smp[0]; + frame.subframes[ch].best.size = (uint)frame.subframes[ch].obits; - float* err = stackalloc float[lpc.MAX_LPC_ORDER]; - for (int i = 0; i < _windowcount; i++) + return; + } + + // VERBATIM + frame.current.type = SubframeType.Verbatim; + frame.current.size = (uint)(frame.subframes[ch].obits * frame.blocksize); + frame.ChooseBestSubframe(ch); + + if(n < 5 || predict == PredictionType.None) return; + + // LPC + if(n > m_settings.MaxLPCOrder && (predict == PredictionType.Levinson || predict == PredictionType.Search) + + //predict == PredictionType.Search || + //(pass == 2 && frame.subframes[ch].best.type == SubframeType.LPC)) + ) + { + float* lpcs = stackalloc float[lpc.MAX_LPC_ORDER * lpc.MAX_LPC_ORDER]; + int min_order = m_settings.MinLPCOrder; + int max_order = m_settings.MaxLPCOrder; + + for(var iWindow = 0; iWindow < _windowcount; iWindow++) { - LpcContext lpc_ctx = frame.subframes[ch].lpc_ctx[i]; - if (onePerType && windows_present[i] <= count) + if((windows_mask & 1 << iWindow) == 0) continue; + + LpcContext lpc_ctx = frame.subframes[ch].lpc_ctx[iWindow]; + + fixed(LpcWindowSection* sections = &windowSections[frame.nSeg, iWindow, 0]) { - err[i] = 0; - continue; + lpc_ctx.GetReflection(frame.subframes[ch].sf, + max_order, + frame.blocksize, + smp, + frame.window_buffer + iWindow * FlakeConstants.MAX_BLOCKSIZE * 2, + sections); } - int estimate_order = 4; - fixed (LpcWindowSection* sections = &windowSections[frame.nSeg, i, 0]) - lpc_ctx.GetReflection( - frame.subframes[ch].sf, estimate_order, frame.blocksize, - frame.subframes[ch].samples, frame.window_buffer + i * FlakeConstants.MAX_BLOCKSIZE * 2, sections); - lpc_ctx.SortOrdersAkaike(frame.blocksize, 1, 1, estimate_order, 4.5, 0.0); - //err[i] = (float)(lpc_ctx.Akaike(frame.blocksize, lpc_ctx.best_orders[0], 4.5, 0.0)); - //err[i] = (float)((frame.blocksize * lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1] / windowScale[i]) + lpc_ctx.best_orders[0] * 4.5); - //err[i] = (float)((frame.blocksize * lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1] / windowScale[i]) + lpc_ctx.best_orders[0] * frame.subframes[ch].obits); - - // realistic - //err[i] = (float)(frame.blocksize * Math.Log(lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1]) / Math.Log(2) / 2.5 - //- windowScale[i] / 2 + lpc_ctx.best_orders[0] * frame.subframes[ch].obits / 2); - //err[i] = (float)(frame.blocksize * Math.Log(lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1]) / Math.Log(2) / 2.5 - //- frame.blocksize * Math.Log(lpc_ctx.autocorr_values[0]) / 2.1 - //+ Math.Log(frame.blocksize) * lpc_ctx.best_orders[0] * 4.5 / 2.5 / Math.Log(2)); + lpc_ctx.ComputeLPC(lpcs); - // Akaike - //err[i] = (float)(frame.blocksize * (Math.Log(lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1])) + Math.Log(frame.blocksize) * lpc_ctx.best_orders[0] * 4.5); + //int frameSize = n; + //float* F = stackalloc float[frameSize]; + //float* B = stackalloc float[frameSize]; + //float* PE = stackalloc float[max_order + 1]; + //float* arp = stackalloc float[max_order]; + //float* rc = stackalloc float[max_order]; - //err[i] = (float)(lpc_ctx.Akaike(frame.blocksize, lpc_ctx.best_orders[0], 4.5, 0.0) - frame.blocksize * (frame.subframes[ch].obits + Math.Log(windowScale[i] / frame.blocksize) / 2)); + //for (int j = 0; j < frameSize; j++) + // F[j] = B[j] = smp[j]; - // tested good - err[i] = (float)(lpc_ctx.Akaike(frame.blocksize, lpc_ctx.best_orders[0], 4.5, 0.0) - frame.blocksize * Math.Log(lpc_ctx.autocorr_values[0]) / 2); - } - int* best_windows = stackalloc int[lpc.MAX_LPC_ORDER]; - for (int i = 0; i < _windowcount; i++) - best_windows[i] = i; - for (int i = 0; i < _windowcount; i++) - { - for (int j = i + 1; j < _windowcount; j++) + //for (int K = 1; K <= max_order; K++) + //{ + // // BURG: + // float denominator = 0.0f; + // //float denominator = F[K - 1] * F[K - 1] + B[frameSize - K] * B[frameSize - K]; + // for (int j = 0; j < frameSize - K; j++) + // denominator += F[j + K] * F[j + K] + B[j] * B[j]; + // denominator /= 2; + + // // Estimate error + // PE[K - 1] = denominator / (frameSize - K); + + // float reflectionCoeff = 0.0f; + // for (int j = 0; j < frameSize - K; j++) + // reflectionCoeff += F[j + K] * B[j]; + // reflectionCoeff /= denominator; + // rc[K - 1] = arp[K - 1] = reflectionCoeff; + + // // Levinson-Durbin + // for (int j = 0; j < (K - 1) >> 1; j++) + // { + // float arptmp = arp[j]; + // arp[j] -= reflectionCoeff * arp[K - 2 - j]; + // arp[K - 2 - j] -= reflectionCoeff * arptmp; + // } + // if (((K - 1) & 1) != 0) + // arp[(K - 1) >> 1] -= reflectionCoeff * arp[(K - 1) >> 1]; + + // for (int j = 0; j < frameSize - K; j++) + // { + // float f = F[j + K]; + // float b = B[j]; + // F[j + K] = f - reflectionCoeff * b; + // B[j] = b - reflectionCoeff * f; + // } + + // for (int j = 0; j < K; j++) + // lpcs[(K - 1) * lpc.MAX_LPC_ORDER + j] = (float)arp[j]; + //} + + switch(omethod) { - if (err[best_windows[i]] > err[best_windows[j]]) - { - int tmp = best_windows[j]; - best_windows[j] = best_windows[i]; - best_windows[i] = tmp; - } + case OrderMethod.Akaike: + //lpc_ctx.SortOrdersAkaike(frame.blocksize, m_settings.EstimationDepth, max_order, 7.1, 0.0); + lpc_ctx.SortOrdersAkaike(frame.blocksize, + m_settings.EstimationDepth, + min_order, + max_order, + 4.5, + 0); + + break; + default: + throw new Exception("unknown order method"); } + + for(i = 0; i < m_settings.EstimationDepth && i < max_order; i++) + encode_residual_lpc_sub(frame, lpcs, iWindow, lpc_ctx.best_orders[i], ch); } - int window_mask = 0; - if (onePerType) + + postprocess_coefs(frame, frame.subframes[ch].best, ch); + } + + // FIXED + if(predict == PredictionType.Fixed || + predict == PredictionType.Search && pass != 1 || + + //predict == PredictionType.Search || + //(pass == 2 && frame.subframes[ch].best.type == SubframeType.Fixed) || + n > m_settings.MaxFixedOrder && n <= m_settings.MaxLPCOrder) + { + int max_fixed_order = Math.Min(m_settings.MaxFixedOrder, 4); + int min_fixed_order = Math.Min(m_settings.MinFixedOrder, max_fixed_order); + + if(min_fixed_order == 0 && max_fixed_order == 4) { - for (int i = 0; i < _windowcount; i++) - windows_present[i] = count; - for (int i = 0; i < _windowcount; i++) + fixed(ulong* fixed_errors = frame.subframes[ch].best_fixed) { - int w = best_windows[i]; - if (windows_present[w] > 0) + if((frame.subframes[ch].done_fixed & 1U << 5) == 0) { - for (int j = 0; j < _windowcount; j++) - if (windowType[j] == windowType[w]) - windows_present[j]--; - window_mask |= 1 << w; + fixed_compute_best_predictor(smp + 4, (uint)n - 4, fixed_errors); + frame.subframes[ch].done_fixed |= 1U << 5; } + + i = fixed_compute_best_predictor_order(fixed_errors); + encode_residual_fixed_sub(frame, i, ch); } } else - { - for (int i = 0; i < _windowcount && i < count; i++) - window_mask |= 1 << best_windows[i]; - } - return window_mask; + for(i = max_fixed_order; i >= min_fixed_order; i--) + encode_residual_fixed_sub(frame, i, ch); + } + } + + void output_frame_header(FlacFrame frame, BitWriter bitwriter) + { + bitwriter.writebits(15, 0x7FFC); + bitwriter.writebits(1, eparams.variable_block_size > 0 ? 1 : 0); + bitwriter.writebits(4, frame.bs_code0); + bitwriter.writebits(4, sr_code0); + + if(frame.ch_mode == ChannelMode.NotStereo) + bitwriter.writebits(4, ch_code); + else + bitwriter.writebits(4, (int)frame.ch_mode); + + bitwriter.writebits(3, bps_code); + bitwriter.writebits(1, 0); + bitwriter.write_utf8(frame_count); + + // custom block size + if(frame.bs_code1 >= 0) + { + if(frame.bs_code1 < 256) + bitwriter.writebits(8, frame.bs_code1); + else + bitwriter.writebits(16, frame.bs_code1); } - unsafe int estimate_best_windows(FlacFrame frame, int ch) - { - if (_windowcount == 1 || m_settings.PredictionType == PredictionType.Fixed) - return 1; - switch (m_settings.WindowMethod) - { - case WindowMethod.Estimate: - return estimate_best_windows_akaike(frame, ch, 1, false); - case WindowMethod.Estimate2: - return estimate_best_windows_akaike(frame, ch, 2, false); - case WindowMethod.Estimate3: - return estimate_best_windows_akaike(frame, ch, 3, false); - case WindowMethod.EstimateN: - return estimate_best_windows_akaike(frame, ch, 1, true); - case WindowMethod.Evaluate2: - encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 2, false)); - return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; - case WindowMethod.Evaluate3: - encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 3, false)); - return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; - case WindowMethod.EvaluateN: - encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 1, true)); + // custom sample rate + if(sr_code1 > 0) + { + if(sr_code1 < 256) + bitwriter.writebits(8, sr_code1); + else + bitwriter.writebits(16, sr_code1); + } + + // CRC-8 of frame header + bitwriter.flush(); + byte crc = crc8.ComputeChecksum(frame_buffer, 0, bitwriter.Length); + bitwriter.writebits(8, crc); + } + + unsafe void output_residual(FlacFrame frame, BitWriter bitwriter, FlacSubframeInfo sub) + { + // rice-encoded block + bitwriter.writebits(2, sub.best.rc.coding_method); + + // partition order + int porder = sub.best.rc.porder; + int psize = frame.blocksize >> porder; + + //assert(porder >= 0); + bitwriter.writebits(4, porder); + int res_cnt = psize - sub.best.order; + + int rice_len = 4 + sub.best.rc.coding_method; + + // residual + int j = sub.best.order; + + fixed(byte* fixbuf = &frame_buffer[0]) + { + for(var p = 0; p < 1 << porder; p++) + { + int k = sub.best.rc.rparams[p]; + bitwriter.writebits(rice_len, k); + if(p == 1) res_cnt = psize; + int cnt = Math.Min(res_cnt, frame.blocksize - j); + bitwriter.write_rice_block_signed(fixbuf, k, sub.best.residual + j, cnt); + j += cnt; + } + } + } + + unsafe void output_subframe_constant(FlacFrame frame, BitWriter bitwriter, FlacSubframeInfo sub) + { + bitwriter.writebits_signed(sub.obits, sub.best.residual[0]); + } + + unsafe void output_subframe_verbatim(FlacFrame frame, BitWriter bitwriter, FlacSubframeInfo sub) + { + int n = frame.blocksize; + for(var i = 0; i < n; i++) bitwriter.writebits_signed(sub.obits, sub.samples[i]); + + // Don't use residual here, because we don't copy samples to residual for verbatim frames. + } + + unsafe void output_subframe_fixed(FlacFrame frame, BitWriter bitwriter, FlacSubframeInfo sub) + { + // warm-up samples + for(var i = 0; i < sub.best.order; i++) bitwriter.writebits_signed(sub.obits, sub.best.residual[i]); + + // residual + output_residual(frame, bitwriter, sub); + } + + unsafe void output_subframe_lpc(FlacFrame frame, BitWriter bitwriter, FlacSubframeInfo sub) + { + // warm-up samples + for(var i = 0; i < sub.best.order; i++) bitwriter.writebits_signed(sub.obits, sub.best.residual[i]); + + // LPC coefficients + var cbits = 1; + + for(var i = 0; i < sub.best.order; i++) + while(cbits < 16 && sub.best.coefs[i] != sub.best.coefs[i] << 32 - cbits >> 32 - cbits) + cbits++; + + bitwriter.writebits(4, cbits - 1); + bitwriter.writebits_signed(5, sub.best.shift); + for(var i = 0; i < sub.best.order; i++) bitwriter.writebits_signed(cbits, sub.best.coefs[i]); + + // residual + output_residual(frame, bitwriter, sub); + } + + void output_subframes(FlacFrame frame, BitWriter bitwriter) + { + for(var ch = 0; ch < channels; ch++) + { + FlacSubframeInfo sub = frame.subframes[ch]; + + // subframe header + var type_code = (int)sub.best.type; + if(sub.best.type == SubframeType.Fixed) type_code |= sub.best.order; + if(sub.best.type == SubframeType.LPC) type_code |= sub.best.order - 1; + bitwriter.writebits(1, 0); + bitwriter.writebits(6, type_code); + bitwriter.writebits(1, sub.wbits != 0 ? 1 : 0); + if(sub.wbits > 0) bitwriter.writebits(sub.wbits, 1); + + // subframe + switch(sub.best.type) + { + case SubframeType.Constant: + output_subframe_constant(frame, bitwriter, sub); + + break; + case SubframeType.Verbatim: + output_subframe_verbatim(frame, bitwriter, sub); + + break; + case SubframeType.Fixed: + output_subframe_fixed(frame, bitwriter, sub); + + break; + case SubframeType.LPC: + output_subframe_lpc(frame, bitwriter, sub); + + break; + } + } + } + + void output_frame_footer(BitWriter bitwriter) + { + bitwriter.flush(); + ushort crc = bitwriter.get_crc16(); + bitwriter.writebits(16, crc); + bitwriter.flush(); + } + + void encode_residual_pass1(FlacFrame frame, int ch, int windows_mask) + { + int max_prediction_order = m_settings.MaxLPCOrder; + + //int max_fixed_order = m_settings.MaxFixedOrder; + //int min_fixed_order = m_settings.MinFixedOrder; + int lpc_min_precision_search = m_settings.MinPrecisionSearch; + int lpc_max_precision_search = m_settings.MaxPrecisionSearch; + int max_partition_order = m_settings.MaxPartitionOrder; + int estimation_depth = m_settings.EstimationDepth; + int development_mode = eparams.development_mode; + + //m_settings.MinFixedOrder = 2; + //m_settings.MaxFixedOrder = 2; + m_settings.MinPrecisionSearch = m_settings.MaxPrecisionSearch; + m_settings.MaxLPCOrder = Math.Min(m_settings.MaxLPCOrder, Math.Max(m_settings.MinLPCOrder, 8)); + m_settings.EstimationDepth = 1; + eparams.development_mode = Math.Min(eparams.development_mode, -1); + encode_residual(frame, ch, m_settings.PredictionType, OrderMethod.Akaike, 1, windows_mask); + + //m_settings.MinFixedOrder = min_fixed_order; + //m_settings.MaxFixedOrder = max_fixed_order; + m_settings.MaxLPCOrder = max_prediction_order; + m_settings.MinPrecisionSearch = lpc_min_precision_search; + m_settings.MaxPrecisionSearch = lpc_max_precision_search; + m_settings.MaxPartitionOrder = max_partition_order; + m_settings.EstimationDepth = estimation_depth; + eparams.development_mode = development_mode; + } + + void encode_residual_pass2(FlacFrame frame, int ch) + { + encode_residual(frame, + ch, + m_settings.PredictionType, + eparams.order_method, + 2, + estimate_best_windows(frame, ch)); + } + + unsafe int estimate_best_windows_akaike(FlacFrame frame, int ch, int count, bool onePerType) + { + int* windows_present = stackalloc int[_windowcount]; + for(var i = 0; i < _windowcount; i++) windows_present[i] = 0; + + if(onePerType) + { + for(var i = 0; i < _windowcount; i++) + { + for(var j = 0; j < _windowcount; j++) + if(windowType[j] == windowType[i]) + windows_present[j]++; + } + } + + float* err = stackalloc float[lpc.MAX_LPC_ORDER]; + + for(var i = 0; i < _windowcount; i++) + { + LpcContext lpc_ctx = frame.subframes[ch].lpc_ctx[i]; + + if(onePerType && windows_present[i] <= count) + { + err[i] = 0; + + continue; + } + + var estimate_order = 4; + + fixed(LpcWindowSection* sections = &windowSections[frame.nSeg, i, 0]) + { + lpc_ctx.GetReflection(frame.subframes[ch].sf, + estimate_order, + frame.blocksize, + frame.subframes[ch].samples, + frame.window_buffer + i * FlakeConstants.MAX_BLOCKSIZE * 2, + sections); + } + + lpc_ctx.SortOrdersAkaike(frame.blocksize, 1, 1, estimate_order, 4.5, 0.0); + + //err[i] = (float)(lpc_ctx.Akaike(frame.blocksize, lpc_ctx.best_orders[0], 4.5, 0.0)); + //err[i] = (float)((frame.blocksize * lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1] / windowScale[i]) + lpc_ctx.best_orders[0] * 4.5); + //err[i] = (float)((frame.blocksize * lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1] / windowScale[i]) + lpc_ctx.best_orders[0] * frame.subframes[ch].obits); + + // realistic + //err[i] = (float)(frame.blocksize * Math.Log(lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1]) / Math.Log(2) / 2.5 + //- windowScale[i] / 2 + lpc_ctx.best_orders[0] * frame.subframes[ch].obits / 2); + + //err[i] = (float)(frame.blocksize * Math.Log(lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1]) / Math.Log(2) / 2.5 + //- frame.blocksize * Math.Log(lpc_ctx.autocorr_values[0]) / 2.1 + //+ Math.Log(frame.blocksize) * lpc_ctx.best_orders[0] * 4.5 / 2.5 / Math.Log(2)); + + // Akaike + //err[i] = (float)(frame.blocksize * (Math.Log(lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1])) + Math.Log(frame.blocksize) * lpc_ctx.best_orders[0] * 4.5); + + //err[i] = (float)(lpc_ctx.Akaike(frame.blocksize, lpc_ctx.best_orders[0], 4.5, 0.0) - frame.blocksize * (frame.subframes[ch].obits + Math.Log(windowScale[i] / frame.blocksize) / 2)); + + // tested good + err[i] = (float)(lpc_ctx.Akaike(frame.blocksize, lpc_ctx.best_orders[0], 4.5, 0.0) - + frame.blocksize * Math.Log(lpc_ctx.autocorr_values[0]) / 2); + } + + int* best_windows = stackalloc int[lpc.MAX_LPC_ORDER]; + for(var i = 0; i < _windowcount; i++) best_windows[i] = i; + + for(var i = 0; i < _windowcount; i++) + { + for(int j = i + 1; j < _windowcount; j++) + { + if(err[best_windows[i]] > err[best_windows[j]]) + { + int tmp = best_windows[j]; + best_windows[j] = best_windows[i]; + best_windows[i] = tmp; + } + } + } + + var window_mask = 0; + + if(onePerType) + { + for(var i = 0; i < _windowcount; i++) windows_present[i] = count; + + for(var i = 0; i < _windowcount; i++) + { + int w = best_windows[i]; + + if(windows_present[w] > 0) + { + for(var j = 0; j < _windowcount; j++) + if(windowType[j] == windowType[w]) + windows_present[j]--; + + window_mask |= 1 << w; + } + } + } + else + for(var i = 0; i < _windowcount && i < count; i++) + window_mask |= 1 << best_windows[i]; + + return window_mask; + } + + int estimate_best_windows(FlacFrame frame, int ch) + { + if(_windowcount == 1 || m_settings.PredictionType == PredictionType.Fixed) return 1; + + switch(m_settings.WindowMethod) + { + case WindowMethod.Estimate: + return estimate_best_windows_akaike(frame, ch, 1, false); + case WindowMethod.Estimate2: + return estimate_best_windows_akaike(frame, ch, 2, false); + case WindowMethod.Estimate3: + return estimate_best_windows_akaike(frame, ch, 3, false); + case WindowMethod.EstimateN: + return estimate_best_windows_akaike(frame, ch, 1, true); + case WindowMethod.Evaluate2: + encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 2, false)); + + return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; + case WindowMethod.Evaluate3: + encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 3, false)); + + return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; + case WindowMethod.EvaluateN: + encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 1, true)); #if XXX if (frame.subframes[ch].best.type == SubframeType.LPC && frame.subframes[ch].best.order <= 4) { LpcContext lpc_ctx = frame.subframes[ch].lpc_ctx[frame.subframes[ch].best.window]; - double err = lpc_ctx.prediction_error[frame.subframes[ch].best.order - 1] / lpc_ctx.autocorr_values[0]; + double err = + lpc_ctx.prediction_error[frame.subframes[ch].best.order - 1] / lpc_ctx.autocorr_values[0]; double est = frame.blocksize * (frame.subframes[ch].obits * (1 - err)); double est1 = frame.blocksize * (frame.subframes[ch].obits * (err)); if (est < 0 || est1 < 0) return -1; } #endif - return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; - case WindowMethod.Evaluate2N: - encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 2, true)); - return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; - case WindowMethod.Evaluate3N: - encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 3, true)); - return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; - case WindowMethod.Evaluate: - encode_residual_pass1(frame, ch, -1); - return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; - case WindowMethod.Search: - return -1; - } - return -1; - } + return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; + case WindowMethod.Evaluate2N: + encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 2, true)); - unsafe void estimate_frame(FlacFrame frame, bool do_midside) - { - int subframes = do_midside ? channels * 2 : channels; + return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; + case WindowMethod.Evaluate3N: + encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 3, true)); - switch (m_settings.StereoMethod) - { - case StereoMethod.Estimate: - for (int ch = 0; ch < subframes; ch++) - { - LpcContext lpc_ctx = frame.subframes[ch].lpc_ctx[0]; - int estimate_order = 4; - int iWindow = 0; - fixed (LpcWindowSection* sections = &windowSections[frame.nSeg, iWindow, 0]) - lpc_ctx.GetReflection( - frame.subframes[ch].sf, estimate_order, frame.blocksize, - frame.subframes[ch].samples, frame.window_buffer + iWindow * FlakeConstants.MAX_BLOCKSIZE * 2, sections); - lpc_ctx.SortOrdersAkaike(frame.blocksize, 1, 1, estimate_order, 4.5, 0.0); - frame.subframes[ch].best.size - = (uint)Math.Max(0, frame.blocksize * (Math.Log(lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1])) + Math.Log(frame.blocksize) * lpc_ctx.best_orders[0] * 4.5 - //= (uint)Math.Max(0, lpc_ctx.Akaike(frame.blocksize, lpc_ctx.best_orders[0], 4.5, 0.0) - //* 2.0 / Math.Log(windowScale[0] / frame.blocksize) - + 7.1 * frame.subframes[ch].obits * m_settings.MaxLPCOrder); - } - break; - case StereoMethod.EstimateFixed: - for (int ch = 0; ch < subframes; ch++) - { - fixed (ulong* fixed_errors = frame.subframes[ch].best_fixed) - { - if ((frame.subframes[ch].done_fixed & (1U << 5)) == 0) - { - fixed_compute_best_predictor(frame.subframes[ch].samples + 4, (uint)frame.blocksize - 4, fixed_errors); - frame.subframes[ch].done_fixed |= (1U << 5); - } - int best_order = fixed_compute_best_predictor_order(fixed_errors); - //residual_bits_per_sample[0] = (float)((total_error_0 > 0) ? log(M_LN2 * (FLAC__double)total_error_0 / (FLAC__double)data_len) / M_LN2 : 0.0); - frame.subframes[ch].best.size = (uint)fixed_errors[best_order]; - } - } - break; - case StereoMethod.EstimateX: - for (int ch = 0; ch < subframes; ch++) - { - for (int iWindow = 0; iWindow < _windowcount; iWindow++) - { - LpcContext lpc_ctx = frame.subframes[ch].lpc_ctx[iWindow]; - int estimate_order = 4; - fixed (LpcWindowSection* sections = &windowSections[frame.nSeg, iWindow, 0]) - lpc_ctx.GetReflection( - frame.subframes[ch].sf, estimate_order, frame.blocksize, - frame.subframes[ch].samples, frame.window_buffer + iWindow * FlakeConstants.MAX_BLOCKSIZE * 2, sections); - lpc_ctx.SortOrdersAkaike(frame.blocksize, 1, 1, estimate_order, 4.5, 0.0); - uint estimate - = (uint)Math.Max(0, frame.blocksize * (Math.Log(lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1])) + Math.Log(frame.blocksize) * lpc_ctx.best_orders[0] * 4.5 - //= (uint)Math.Max(0, lpc_ctx.Akaike(frame.blocksize, lpc_ctx.best_orders[0], 4.5, 0.0) - //* 2.0 / Math.Log(windowScale[0] / frame.blocksize) - + 7.1 * frame.subframes[ch].obits * m_settings.MaxLPCOrder); - if (iWindow == 0 || frame.subframes[ch].best.size > estimate) - frame.subframes[ch].best.size = estimate; - } - } - break; - case StereoMethod.Evaluate: - for (int ch = 0; ch < subframes; ch++) - encode_residual_pass1(frame, ch, 1); - break; - case StereoMethod.EvaluateX: - for (int ch = 0; ch < subframes; ch++) - encode_residual_pass1(frame, ch, - estimate_best_windows_akaike(frame, ch, 1, false)); - break; - case StereoMethod.Search: - for (int ch = 0; ch < subframes; ch++) - encode_residual_pass2(frame, ch); - break; - } - } + return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; + case WindowMethod.Evaluate: + encode_residual_pass1(frame, ch, -1); - unsafe uint measure_frame_size(FlacFrame frame, bool do_midside) - { - // crude estimation of header/footer size - uint total = (uint)(32 + ((BitReader.log2i(frame_count) + 4) / 5) * 8 + (eparams.variable_block_size != 0 ? 16 : 0) + 16); + return frame.subframes[ch].best.type == SubframeType.LPC ? 1 << frame.subframes[ch].best.window : 0; + case WindowMethod.Search: + return -1; + } - if (do_midside) - { - uint bitsBest = AudioSamples.UINT32_MAX; - ChannelMode modeBest = ChannelMode.LeftRight; + return -1; + } - if (bitsBest > frame.subframes[2].best.size + frame.subframes[3].best.size) - { - bitsBest = frame.subframes[2].best.size + frame.subframes[3].best.size; - modeBest = ChannelMode.MidSide; - } - if (bitsBest > frame.subframes[3].best.size + frame.subframes[1].best.size) - { - bitsBest = frame.subframes[3].best.size + frame.subframes[1].best.size; - modeBest = ChannelMode.RightSide; - } - if (bitsBest > frame.subframes[3].best.size + frame.subframes[0].best.size) - { - bitsBest = frame.subframes[3].best.size + frame.subframes[0].best.size; - modeBest = ChannelMode.LeftSide; - } - if (bitsBest > frame.subframes[0].best.size + frame.subframes[1].best.size) - { - bitsBest = frame.subframes[0].best.size + frame.subframes[1].best.size; - modeBest = ChannelMode.LeftRight; - } - frame.ch_mode = modeBest; - return total + bitsBest; - } + unsafe void estimate_frame(FlacFrame frame, bool do_midside) + { + int subframes = do_midside ? channels * 2 : channels; - for (int ch = 0; ch < channels; ch++) - total += frame.subframes[ch].best.size; - return total; - } - - unsafe void encode_estimated_frame(FlacFrame frame) - { - switch (m_settings.StereoMethod) - { - case StereoMethod.Estimate: - case StereoMethod.EstimateX: - case StereoMethod.EstimateFixed: - for (int ch = 0; ch < channels; ch++) - { - frame.subframes[ch].best.size = AudioSamples.UINT32_MAX; - encode_residual_pass2(frame, ch); - } - break; - case StereoMethod.Evaluate: - case StereoMethod.EvaluateX: - for (int ch = 0; ch < channels; ch++) - encode_residual_pass2(frame, ch); - break; - case StereoMethod.Search: - break; - } - } - - unsafe delegate void window_function(float* window, int size); - - unsafe void calculate_window(float* window, window_function func, WindowFunction flag) - { - if ((m_settings.WindowFunctions & flag) == 0 || _windowcount == lpc.MAX_LPC_WINDOWS) - return; - int sz = _windowsize; - float* pos1 = window + _windowcount * FlakeConstants.MAX_BLOCKSIZE * 2; - float* pos = pos1; - int nSeg = 0; - do - { - windowSections[nSeg, _windowcount, 0].setData(0, sz); - for (int j = 1; j < lpc.MAX_LPC_SECTIONS; j++) - windowSections[nSeg, _windowcount, j].setZero(sz, sz); - - fixed (LpcWindowSection* sections = &windowSections[nSeg, _windowcount, 0]) - func(pos, sz); - if ((sz & 1) != 0) - break; - nSeg++; - pos += sz; - sz >>= 1; - } while (sz >= 32); - double scale = 0.0; - for (int i = 0; i < _windowsize; i++) - scale += pos1[i] * pos1[i]; - windowScale[_windowcount] = scale; - windowType[_windowcount] = flag; - _windowcount++; - } - - class PunchoutTukeyVariant + switch(m_settings.StereoMethod) { - public PunchoutTukeyVariant( - WindowFunction _type, - int _parts, double _overlap, double _p) - { - parts = _parts; - type = _type; - overlap = _overlap; - p = _p; - } - public WindowFunction type; - public int parts; - public double overlap; - public double p; - }; - - unsafe int encode_frame(out int size) - { - fixed (int* s = samplesBuffer, r = residualBuffer) - fixed (float* window = windowBuffer) - { - frame.InitSize(m_blockSize, eparams.variable_block_size != 0); - - if (frame.blocksize != _windowsize && frame.blocksize > 4 && m_settings.PredictionType != PredictionType.Fixed) + case StereoMethod.Estimate: + for(var ch = 0; ch < subframes; ch++) { - _windowsize = frame.blocksize; + LpcContext lpc_ctx = frame.subframes[ch].lpc_ctx[0]; + var estimate_order = 4; + var iWindow = 0; + + fixed(LpcWindowSection* sections = &windowSections[frame.nSeg, iWindow, 0]) + { + lpc_ctx.GetReflection(frame.subframes[ch].sf, + estimate_order, + frame.blocksize, + frame.subframes[ch].samples, + frame.window_buffer + iWindow * FlakeConstants.MAX_BLOCKSIZE * 2, + sections); + } + + lpc_ctx.SortOrdersAkaike(frame.blocksize, 1, 1, estimate_order, 4.5, 0.0); + + frame.subframes[ch].best.size = (uint)Math.Max(0, + frame.blocksize * + Math.Log(lpc_ctx.prediction_error + [lpc_ctx.best_orders[0] - 1]) + + Math.Log(frame.blocksize) * + lpc_ctx.best_orders[0] * + 4.5 + + //= (uint)Math.Max(0, lpc_ctx.Akaike(frame.blocksize, lpc_ctx.best_orders[0], 4.5, 0.0) + //* 2.0 / Math.Log(windowScale[0] / frame.blocksize) + + + 7.1 * + frame.subframes[ch].obits * + m_settings.MaxLPCOrder); + } + + break; + case StereoMethod.EstimateFixed: + for(var ch = 0; ch < subframes; ch++) + { + fixed(ulong* fixed_errors = frame.subframes[ch].best_fixed) + { + if((frame.subframes[ch].done_fixed & 1U << 5) == 0) + { + fixed_compute_best_predictor(frame.subframes[ch].samples + 4, + (uint)frame.blocksize - 4, + fixed_errors); + + frame.subframes[ch].done_fixed |= 1U << 5; + } + + int best_order = fixed_compute_best_predictor_order(fixed_errors); + + //residual_bits_per_sample[0] = (float)((total_error_0 > 0) ? log(M_LN2 * (FLAC__double)total_error_0 / (FLAC__double)data_len) / M_LN2 : 0.0); + frame.subframes[ch].best.size = (uint)fixed_errors[best_order]; + } + } + + break; + case StereoMethod.EstimateX: + for(var ch = 0; ch < subframes; ch++) + { + for(var iWindow = 0; iWindow < _windowcount; iWindow++) + { + LpcContext lpc_ctx = frame.subframes[ch].lpc_ctx[iWindow]; + var estimate_order = 4; + + fixed(LpcWindowSection* sections = &windowSections[frame.nSeg, iWindow, 0]) + { + lpc_ctx.GetReflection(frame.subframes[ch].sf, + estimate_order, + frame.blocksize, + frame.subframes[ch].samples, + frame.window_buffer + iWindow * FlakeConstants.MAX_BLOCKSIZE * 2, + sections); + } + + lpc_ctx.SortOrdersAkaike(frame.blocksize, 1, 1, estimate_order, 4.5, 0.0); + + var estimate = (uint)Math.Max(0, + frame.blocksize * + Math.Log(lpc_ctx.prediction_error[lpc_ctx.best_orders[0] - 1]) + + Math.Log(frame.blocksize) * lpc_ctx.best_orders[0] * 4.5 + + //= (uint)Math.Max(0, lpc_ctx.Akaike(frame.blocksize, lpc_ctx.best_orders[0], 4.5, 0.0) + //* 2.0 / Math.Log(windowScale[0] / frame.blocksize) + + + 7.1 * frame.subframes[ch].obits * m_settings.MaxLPCOrder); + + if(iWindow == 0 || frame.subframes[ch].best.size > estimate) + frame.subframes[ch].best.size = estimate; + } + } + + break; + case StereoMethod.Evaluate: + for(var ch = 0; ch < subframes; ch++) encode_residual_pass1(frame, ch, 1); + + break; + case StereoMethod.EvaluateX: + for(var ch = 0; ch < subframes; ch++) + encode_residual_pass1(frame, ch, estimate_best_windows_akaike(frame, ch, 1, false)); + + break; + case StereoMethod.Search: + for(var ch = 0; ch < subframes; ch++) encode_residual_pass2(frame, ch); + + break; + } + } + + uint measure_frame_size(FlacFrame frame, bool do_midside) + { + // crude estimation of header/footer size + var total = (uint)(32 + + (BitReader.log2i(frame_count) + 4) / 5 * 8 + + (eparams.variable_block_size != 0 ? 16 : 0) + + 16); + + if(do_midside) + { + uint bitsBest = AudioSamples.UINT32_MAX; + ChannelMode modeBest = ChannelMode.LeftRight; + + if(bitsBest > frame.subframes[2].best.size + frame.subframes[3].best.size) + { + bitsBest = frame.subframes[2].best.size + frame.subframes[3].best.size; + modeBest = ChannelMode.MidSide; + } + + if(bitsBest > frame.subframes[3].best.size + frame.subframes[1].best.size) + { + bitsBest = frame.subframes[3].best.size + frame.subframes[1].best.size; + modeBest = ChannelMode.RightSide; + } + + if(bitsBest > frame.subframes[3].best.size + frame.subframes[0].best.size) + { + bitsBest = frame.subframes[3].best.size + frame.subframes[0].best.size; + modeBest = ChannelMode.LeftSide; + } + + if(bitsBest > frame.subframes[0].best.size + frame.subframes[1].best.size) + { + bitsBest = frame.subframes[0].best.size + frame.subframes[1].best.size; + modeBest = ChannelMode.LeftRight; + } + + frame.ch_mode = modeBest; + + return total + bitsBest; + } + + for(var ch = 0; ch < channels; ch++) total += frame.subframes[ch].best.size; + + return total; + } + + void encode_estimated_frame(FlacFrame frame) + { + switch(m_settings.StereoMethod) + { + case StereoMethod.Estimate: + case StereoMethod.EstimateX: + case StereoMethod.EstimateFixed: + for(var ch = 0; ch < channels; ch++) + { + frame.subframes[ch].best.size = AudioSamples.UINT32_MAX; + encode_residual_pass2(frame, ch); + } + + break; + case StereoMethod.Evaluate: + case StereoMethod.EvaluateX: + for(var ch = 0; ch < channels; ch++) encode_residual_pass2(frame, ch); + + break; + case StereoMethod.Search: + break; + } + } + + unsafe delegate void window_function(float* window, int size); + + unsafe void calculate_window(float* window, window_function func, WindowFunction flag) + { + if((m_settings.WindowFunctions & flag) == 0 || _windowcount == lpc.MAX_LPC_WINDOWS) return; + int sz = _windowsize; + float* pos1 = window + _windowcount * FlakeConstants.MAX_BLOCKSIZE * 2; + float* pos = pos1; + var nSeg = 0; + + do + { + windowSections[nSeg, _windowcount, 0].setData(0, sz); + for(var j = 1; j < lpc.MAX_LPC_SECTIONS; j++) windowSections[nSeg, _windowcount, j].setZero(sz, sz); + + fixed(LpcWindowSection* sections = &windowSections[nSeg, _windowcount, 0]) + { + func(pos, sz); + } + + if((sz & 1) != 0) break; + nSeg++; + pos += sz; + sz >>= 1; + } while(sz >= 32); + + var scale = 0.0; + for(var i = 0; i < _windowsize; i++) scale += pos1[i] * pos1[i]; + windowScale[_windowcount] = scale; + windowType[_windowcount] = flag; + _windowcount++; + } + + class PunchoutTukeyVariant + { + public readonly double overlap; + public readonly double p; + public readonly int parts; + public readonly WindowFunction type; + + public PunchoutTukeyVariant(WindowFunction _type, int _parts, double _overlap, double _p) + { + parts = _parts; + type = _type; + overlap = _overlap; + p = _p; + } + } + + unsafe int encode_frame(out int size) + { + fixed(int* s = samplesBuffer, r = residualBuffer) + { + fixed(float* window = windowBuffer) + { + frame.InitSize(m_blockSize, eparams.variable_block_size != 0); + + if(frame.blocksize != _windowsize && + frame.blocksize > 4 && + m_settings.PredictionType != PredictionType.Fixed) + { + _windowsize = frame.blocksize; _windowcount = 0; - calculate_window(window, lpc.window_welch, WindowFunction.Welch); - calculate_window(window, lpc.window_flattop, WindowFunction.Flattop); - calculate_window(window, lpc.window_hann, WindowFunction.Hann); + calculate_window(window, lpc.window_welch, WindowFunction.Welch); + calculate_window(window, lpc.window_flattop, WindowFunction.Flattop); + calculate_window(window, lpc.window_hann, WindowFunction.Hann); calculate_window(window, lpc.window_bartlett, WindowFunction.Bartlett); + var tukeys = new PunchoutTukeyVariant[] { - new PunchoutTukeyVariant(WindowFunction.Tukey4, 4, 0, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey4A, 4, 0, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey4B, 4, 0, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey4X, 4, m_settings.TukeyOverlap, m_settings.TukeyP), - new PunchoutTukeyVariant(WindowFunction.Tukey3, 3, 1.0/3, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey3A, 3, 1.0/3, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey3B, 3, 1.0/3, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey3X, 3, m_settings.TukeyOverlap, m_settings.TukeyP), - new PunchoutTukeyVariant(WindowFunction.Tukey2, 2, 0.25, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey2A, 2, 0.25, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey2B, 2, 0.25, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey2X, 2, m_settings.TukeyOverlap, m_settings.TukeyP), - new PunchoutTukeyVariant(WindowFunction.Tukey, 1, 0.0, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey1A, 1, 0.0, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey1B, 1, 0.0, 0.03), - new PunchoutTukeyVariant(WindowFunction.Tukey1X, 1, m_settings.TukeyOverlap, m_settings.TukeyP), + new(WindowFunction.Tukey4, 4, 0, 0.03), new(WindowFunction.Tukey4A, 4, 0, 0.03), + new(WindowFunction.Tukey4B, 4, 0, 0.03), + new(WindowFunction.Tukey4X, 4, m_settings.TukeyOverlap, m_settings.TukeyP), + new(WindowFunction.Tukey3, 3, 1.0 / 3, 0.03), new(WindowFunction.Tukey3A, 3, 1.0 / 3, 0.03), + new(WindowFunction.Tukey3B, 3, 1.0 / 3, 0.03), + new(WindowFunction.Tukey3X, 3, m_settings.TukeyOverlap, m_settings.TukeyP), + new(WindowFunction.Tukey2, 2, 0.25, 0.03), new(WindowFunction.Tukey2A, 2, 0.25, 0.03), + new(WindowFunction.Tukey2B, 2, 0.25, 0.03), + new(WindowFunction.Tukey2X, 2, m_settings.TukeyOverlap, m_settings.TukeyP), + new(WindowFunction.Tukey, 1, 0.0, 0.03), new(WindowFunction.Tukey1A, 1, 0.0, 0.03), + new(WindowFunction.Tukey1B, 1, 0.0, 0.03), + new(WindowFunction.Tukey1X, 1, m_settings.TukeyOverlap, m_settings.TukeyP) }; - foreach (var tukey in tukeys) + foreach(PunchoutTukeyVariant tukey in tukeys) { - if (tukey.parts == 0 || (m_settings.WindowFunctions & tukey.type) == 0) continue; - if (tukey.parts == 1) + if(tukey.parts == 0 || (m_settings.WindowFunctions & tukey.type) == 0) continue; + + if(tukey.parts == 1) { - calculate_window(window, (w, wsz) => - { - lpc.window_tukey(w, wsz, tukey.p); - }, tukey.type); + calculate_window(window, (w, wsz) => { lpc.window_tukey(w, wsz, tukey.p); }, tukey.type); + continue; } - double overlap = tukey.overlap; + + double overlap = tukey.overlap; double overlap_units = overlap / (1.0 - overlap); - for (int m = 0; m < tukey.parts; m++) - calculate_window(window, (w, wsz) => - { - lpc.window_punchout_tukey(w, wsz, tukey.p, tukey.p, - m / (tukey.parts + overlap_units), - (m + 1 + overlap_units) / (tukey.parts + overlap_units)); - }, tukey.type); + + for(var m = 0; m < tukey.parts; m++) + { + calculate_window(window, + (w, wsz) => + { + lpc.window_punchout_tukey(w, + wsz, + tukey.p, + tukey.p, + m / (tukey.parts + overlap_units), + (m + 1 + overlap_units) / + (tukey.parts + overlap_units)); + }, + tukey.type); + } } - if (_windowcount == 0) - throw new Exception("invalid windowfunction"); - int nSeg = 0; - int sz = _windowsize; + if(_windowcount == 0) throw new Exception("invalid windowfunction"); + var nSeg = 0; + int sz = _windowsize; float* window_segment = window; + do - { - fixed (LpcWindowSection* sections = &windowSections[nSeg, 0, 0]) - LpcWindowSection.Detect(_windowcount, window_segment, FlakeConstants.MAX_BLOCKSIZE * 2, sz, Settings.PCM.BitsPerSample, sections); - if ((sz & 1) != 0) - break; + { + fixed(LpcWindowSection* sections = &windowSections[nSeg, 0, 0]) + { + LpcWindowSection.Detect(_windowcount, + window_segment, + FlakeConstants.MAX_BLOCKSIZE * 2, + sz, + Settings.PCM.BitsPerSample, + sections); + } + + if((sz & 1) != 0) break; window_segment += sz; nSeg++; sz >>= 1; - } while (sz >= 32); + } while(sz >= 32); #if NONONO using (TextWriter tx = File.CreateText(@"H:\ubuntu\flac\w.txt")) { @@ -1870,7 +2141,7 @@ new int[] { // 30 } tx.WriteLine("{0} grand total window data", totaltotal); #endif - for (int x = 0; x < frame.blocksize; x++) + for (int x = 0; x < frame.blocksize; x++) { tx.Write("{0}", x); for (int i = 0; i < _windowcount; i++) @@ -1881,522 +2152,586 @@ new int[] { // 30 #endif } - if (channels != 2 || frame.blocksize <= 32 || m_settings.StereoMethod == StereoMethod.Independent) - { - frame.window_buffer = window; - frame.nSeg = 0; - frame.current.residual = r + channels * FlakeConstants.MAX_BLOCKSIZE; - frame.ch_mode = channels != 2 ? ChannelMode.NotStereo : ChannelMode.LeftRight; - for (int ch = 0; ch < channels; ch++) - frame.subframes[ch].Init(s + ch * FlakeConstants.MAX_BLOCKSIZE, r + ch * FlakeConstants.MAX_BLOCKSIZE, - Settings.PCM.BitsPerSample, get_wasted_bits(s + ch * FlakeConstants.MAX_BLOCKSIZE, frame.blocksize)); + if(channels != 2 || frame.blocksize <= 32 || m_settings.StereoMethod == StereoMethod.Independent) + { + frame.window_buffer = window; + frame.nSeg = 0; + frame.current.residual = r + channels * FlakeConstants.MAX_BLOCKSIZE; + frame.ch_mode = channels != 2 ? ChannelMode.NotStereo : ChannelMode.LeftRight; - for (int ch = 0; ch < channels; ch++) - encode_residual_pass2(frame, ch); - } - else - { - //channel_decorrelation(s, s + FlakeConstants.MAX_BLOCKSIZE, s + 2 * FlakeConstants.MAX_BLOCKSIZE, s + 3 * FlakeConstants.MAX_BLOCKSIZE, frame.blocksize); - frame.window_buffer = window; - frame.nSeg = 0; - frame.current.residual = r + 4 * FlakeConstants.MAX_BLOCKSIZE; - for (int ch = 0; ch < 4; ch++) - frame.subframes[ch].Init(s + ch * FlakeConstants.MAX_BLOCKSIZE, r + ch * FlakeConstants.MAX_BLOCKSIZE, - Settings.PCM.BitsPerSample + (ch == 3 ? 1 : 0), get_wasted_bits(s + ch * FlakeConstants.MAX_BLOCKSIZE, frame.blocksize)); + for(var ch = 0; ch < channels; ch++) + { + frame.subframes[ch] + .Init(s + ch * FlakeConstants.MAX_BLOCKSIZE, + r + ch * FlakeConstants.MAX_BLOCKSIZE, + Settings.PCM.BitsPerSample, + get_wasted_bits(s + ch * FlakeConstants.MAX_BLOCKSIZE, frame.blocksize)); + } - //for (int ch = 0; ch < 4; ch++) - // for (int iWindow = 0; iWindow < _windowcount; iWindow++) - // frame.subframes[ch].lpc_ctx[iWindow].GetReflection(32, frame.subframes[ch].samples, frame.blocksize, frame.window_buffer + iWindow * FlakeConstants.MAX_BLOCKSIZE * 2); + for(var ch = 0; ch < channels; ch++) encode_residual_pass2(frame, ch); + } + else + { + //channel_decorrelation(s, s + FlakeConstants.MAX_BLOCKSIZE, s + 2 * FlakeConstants.MAX_BLOCKSIZE, s + 3 * FlakeConstants.MAX_BLOCKSIZE, frame.blocksize); + frame.window_buffer = window; + frame.nSeg = 0; + frame.current.residual = r + 4 * FlakeConstants.MAX_BLOCKSIZE; - estimate_frame(frame, true); - uint fs = measure_frame_size(frame, true); + for(var ch = 0; ch < 4; ch++) + { + frame.subframes[ch] + .Init(s + ch * FlakeConstants.MAX_BLOCKSIZE, + r + ch * FlakeConstants.MAX_BLOCKSIZE, + Settings.PCM.BitsPerSample + (ch == 3 ? 1 : 0), + get_wasted_bits(s + ch * FlakeConstants.MAX_BLOCKSIZE, frame.blocksize)); + } + + //for (int ch = 0; ch < 4; ch++) + // for (int iWindow = 0; iWindow < _windowcount; iWindow++) + // frame.subframes[ch].lpc_ctx[iWindow].GetReflection(32, frame.subframes[ch].samples, frame.blocksize, frame.window_buffer + iWindow * FlakeConstants.MAX_BLOCKSIZE * 2); + + estimate_frame(frame, true); + uint fs = measure_frame_size(frame, true); + + if(0 != eparams.variable_block_size) + { + var frame2 = new FlacFrame(channels * 2); + var frame3 = new FlacFrame(channels * 2); + var tumbler = 1; + + while((frame.blocksize & 1) == 0 && frame.blocksize >= 1024) + { + frame2.InitSize(frame.blocksize / 2, true); + frame2.window_buffer = frame.window_buffer + frame.blocksize; + frame2.nSeg = frame.nSeg + 1; + frame2.current.residual = r + tumbler * 5 * FlakeConstants.MAX_BLOCKSIZE; + + for(var ch = 0; ch < 4; ch++) + { + frame2.subframes[ch] + .Init(frame.subframes[ch].samples, + frame2.current.residual + (ch + 1) * frame2.blocksize, + frame.subframes[ch].obits + frame.subframes[ch].wbits, + frame.subframes[ch].wbits); + } + + estimate_frame(frame2, true); - if (0 != eparams.variable_block_size) - { - FlacFrame frame2 = new FlacFrame(channels * 2); - FlacFrame frame3 = new FlacFrame(channels * 2); - int tumbler = 1; - while ((frame.blocksize & 1) == 0 && frame.blocksize >= 1024) - { - frame2.InitSize(frame.blocksize / 2, true); - frame2.window_buffer = frame.window_buffer + frame.blocksize; - frame2.nSeg = frame.nSeg + 1; - frame2.current.residual = r + tumbler * 5 * FlakeConstants.MAX_BLOCKSIZE; - for (int ch = 0; ch < 4; ch++) - frame2.subframes[ch].Init(frame.subframes[ch].samples, frame2.current.residual + (ch + 1) * frame2.blocksize, - frame.subframes[ch].obits + frame.subframes[ch].wbits, frame.subframes[ch].wbits); - estimate_frame(frame2, true); //measure_frame_size(frame2, true); //frame2.ChooseSubframes(); //encode_estimated_frame(frame2); //uint fs2 = measure_frame_size(frame2, false); uint fs2 = measure_frame_size(frame2, true); - uint fs3 = fs2; - if (eparams.variable_block_size == 2 || eparams.variable_block_size == 4) - { - frame3.InitSize(frame2.blocksize, true); - frame3.window_buffer = frame2.window_buffer; - frame3.nSeg = frame2.nSeg; - frame3.current.residual = frame2.current.residual + 5 * frame2.blocksize; - for (int ch = 0; ch < 4; ch++) - frame3.subframes[ch].Init(frame2.subframes[ch].samples + frame2.blocksize, frame3.current.residual + (ch + 1) * frame3.blocksize, - frame.subframes[ch].obits + frame.subframes[ch].wbits, frame.subframes[ch].wbits); - estimate_frame(frame3, true); - fs3 = measure_frame_size(frame3, true); - } - if (fs2 + fs3 > fs) - break; - FlacFrame tmp = frame; - frame = frame2; - frame2 = tmp; - fs = fs2; - if (eparams.variable_block_size <= 2) - break; - tumbler = 1 - tumbler; - } - } + uint fs3 = fs2; - frame.ChooseSubframes(); - encode_estimated_frame(frame); - } + if(eparams.variable_block_size == 2 || eparams.variable_block_size == 4) + { + frame3.InitSize(frame2.blocksize, true); + frame3.window_buffer = frame2.window_buffer; + frame3.nSeg = frame2.nSeg; + frame3.current.residual = frame2.current.residual + 5 * frame2.blocksize; - BitWriter bitwriter = new BitWriter(frame_buffer, 0, max_frame_size); + for(var ch = 0; ch < 4; ch++) + { + frame3.subframes[ch] + .Init(frame2.subframes[ch].samples + frame2.blocksize, + frame3.current.residual + (ch + 1) * frame3.blocksize, + frame.subframes[ch].obits + frame.subframes[ch].wbits, + frame.subframes[ch].wbits); + } - output_frame_header(frame, bitwriter); - output_subframes(frame, bitwriter); - output_frame_footer(bitwriter); + estimate_frame(frame3, true); + fs3 = measure_frame_size(frame3, true); + } - if (bitwriter.Length >= max_frame_size) - throw new Exception("buffer overflow"); + if(fs2 + fs3 > fs) break; + FlacFrame tmp = frame; + frame = frame2; + frame2 = tmp; + fs = fs2; - if (frame_buffer != null) - { - if (eparams.variable_block_size > 0) - frame_count += frame.blocksize; - else - frame_count++; - } - size = frame.blocksize; - return bitwriter.Length; - } - } + if(eparams.variable_block_size <= 2) break; + tumbler = 1 - tumbler; + } + } - unsafe int output_frame() - { - if (verify != null) - { - fixed (int* s = verifyBuffer, r = samplesBuffer) - for (int ch = 0; ch < channels; ch++) - AudioSamples.MemCpy(s + ch * FlakeConstants.MAX_BLOCKSIZE, r + ch * FlakeConstants.MAX_BLOCKSIZE, m_blockSize); - } - - int fs, bs; - //if (0 != eparams.variable_block_size && 0 == (m_blockSize & 7) && m_blockSize >= 128) - // fs = encode_frame_vbs(); - //else - fs = encode_frame(out bs); - - if (seek_table != null && _IO.CanSeek) - { - for (int sp = 0; sp < seek_table.Length; sp++) - { - if (seek_table[sp].framesize != 0) - continue; - if (seek_table[sp].number > _position + bs) - break; - if (seek_table[sp].number >= _position) - { - seek_table[sp].number = _position; - seek_table[sp].offset = _IO.Position - first_frame_offset; - seek_table[sp].framesize = bs; - } - } - } - - _position += bs; - _IO.Write(frame_buffer, 0, fs); - _totalSize += fs; - - if (verify != null) - try - { - int decoded = verify.DecodeFrame(frame_buffer, 0, fs); - if (decoded != fs || verify.Remaining != bs) - throw new Exception(Properties.Resources.ExceptionValidationFailed); - fixed (int* s = verifyBuffer, r = verify.Samples) - { - for (int ch = 0; ch < channels; ch++) - if (AudioSamples.MemCmp(s + ch * FlakeConstants.MAX_BLOCKSIZE, r + ch * FlakeConstants.MAX_BLOCKSIZE, bs)) - throw new Exception(Properties.Resources.ExceptionValidationFailed); - } - } - catch (Exception ex) - { - //if (channels == 2) - //{ - // var sw = new WAVWriter(string.Format("verify_{0}.wav", this.frame_count), new WAVWriterSettings(this.Settings.PCM)); - // sw.FinalSampleCount = this.frame.blocksize; - // var ab = new AudioBuffer(this.Settings.PCM, this.frame.blocksize); - // ab.Prepare(this.frame.blocksize); - // fixed (int* abs = ab.Samples, s = verifyBuffer) - // AudioSamples.Interlace(abs, s, s + FlakeConstants.MAX_BLOCKSIZE, this.frame.blocksize); - // sw.Write(ab); - // sw.Close(); - //} else - throw ex; - } - - if (bs < m_blockSize) - { - for (int ch = 0; ch < (channels == 2 ? 4 : channels); ch++) - Buffer.BlockCopy(samplesBuffer, (bs + ch * FlakeConstants.MAX_BLOCKSIZE) * sizeof(int), samplesBuffer, ch * FlakeConstants.MAX_BLOCKSIZE * sizeof(int), (m_blockSize - bs) * sizeof(int)); - //fixed (int* s = samplesBuffer) - // for (int ch = 0; ch < channels; ch++) - // AudioSamples.MemCpy(s + ch * FlakeConstants.MAX_BLOCKSIZE, s + bs + ch * FlakeConstants.MAX_BLOCKSIZE, m_blockSize - bs); - } - - samplesInBuffer -= bs; - - return bs; - } - - public void Write(AudioBuffer buff) - { - if (!inited) - { - if (_IO == null) - _IO = new FileStream(_path, FileMode.Create, FileAccess.Write, FileShare.Read, 0x20000); - inited = true; - int header_size = flake_encode_init(); - _IO.Write(header, 0, header_size); - if (_IO.CanSeek) - first_frame_offset = _IO.Position; - } - - buff.Prepare(this); - - int pos = 0; - while (pos < buff.Length) - { - int block = Math.Min(buff.Length - pos, m_blockSize - samplesInBuffer); - - copy_samples(buff.Samples, pos, block); - - pos += block; - - while (samplesInBuffer >= m_blockSize) - output_frame(); - } - - if (md5 != null) - md5.TransformBlock(buff.Bytes, 0, buff.ByteLength, null, 0); - } - - public string Path { get { return _path; } } - - public static string Vendor - { - get - { - var version = typeof(AudioEncoder).Assembly.GetName().Version; - return vendor_string ?? "CUETools " + version.Major + "." + version.Minor + "." + version.Build; - } - set - { - vendor_string = value; - } - } - - static string vendor_string = null; - - int select_blocksize(int samplerate, int time_ms) - { - int blocksize = FlakeConstants.flac_blocksizes[1]; - int target = (samplerate * time_ms) / 1000; - if (eparams.variable_block_size > 0) - { - blocksize = 1024; - while (target >= blocksize) - blocksize <<= 1; - return blocksize >> 1; - } - - for (int i = 8; i < FlakeConstants.flac_blocksizes.Length - 1; i++) - if (target >= FlakeConstants.flac_blocksizes[i] && FlakeConstants.flac_blocksizes[i] > blocksize) - { - blocksize = FlakeConstants.flac_blocksizes[i]; - } - return blocksize; - } - - void write_streaminfo(byte[] header, int pos, int last) - { - Array.Clear(header, pos, 38); - BitWriter bitwriter = new BitWriter(header, pos, 38); - - // metadata header - bitwriter.writebits(1, last); - bitwriter.writebits(7, (int)MetadataType.StreamInfo); - bitwriter.writebits(24, 34); - - if (eparams.variable_block_size > 0) - bitwriter.writebits(16, 0); - else - bitwriter.writebits(16, m_blockSize); - - bitwriter.writebits(16, m_blockSize); - bitwriter.writebits(24, 0); - bitwriter.writebits(24, max_frame_size); - bitwriter.writebits(20, Settings.PCM.SampleRate); - bitwriter.writebits(3, channels - 1); - bitwriter.writebits(5, Settings.PCM.BitsPerSample - 1); - - // total samples - if (sample_count > 0) - { - bitwriter.writebits(4, 0); - bitwriter.writebits(32, sample_count); - } - else - { - bitwriter.writebits(4, 0); - bitwriter.writebits(32, 0); - } - bitwriter.flush(); - } - - /** - * Write vorbis comment metadata block to byte array. - * Just writes the vendor string for now. - */ - int write_vorbis_comment(byte[] comment, int pos, int len, int last) - { - BitWriter bitwriter = new BitWriter(comment, pos, len); - Encoding enc = new UTF8Encoding(); - byte[] str = enc.GetBytes(Vendor); - - // metadata header - bitwriter.writebits(1, last); - bitwriter.writebits(7, (int)MetadataType.VorbisComment); - int tagsLen = 0; - if (m_settings.Tags != null) - foreach (var t in m_settings.Tags) - tagsLen += 4 + enc.GetByteCount(t); - bitwriter.writebits(24, 8 + str.Length + tagsLen); - for (int i = 0; i < 4; i++) - bitwriter.writebits(8, (str.Length >> (i * 8)) & 0xff); - bitwriter.write(str); - int nTags = m_settings.Tags != null ? m_settings.Tags.Length : 0; - for (int i = 0; i < 4; i++) - bitwriter.writebits(8, (nTags >> (i * 8)) & 0xff); - if (m_settings.Tags != null) - foreach (var tag in m_settings.Tags) - { - str = enc.GetBytes(tag); - for (int i = 0; i < 4; i++) - bitwriter.writebits(8, (str.Length >> (i * 8)) & 0xff); - bitwriter.write(str); + frame.ChooseSubframes(); + encode_estimated_frame(frame); } - bitwriter.flush(); - return bitwriter.Length; - } - int write_seekpoints(byte[] header, int pos, int last) - { - seek_table_offset = pos + 4; + var bitwriter = new BitWriter(frame_buffer, 0, max_frame_size); - BitWriter bitwriter = new BitWriter(header, pos, 4 + 18 * seek_table.Length); + output_frame_header(frame, bitwriter); + output_subframes(frame, bitwriter); + output_frame_footer(bitwriter); - // metadata header - bitwriter.writebits(1, last); - bitwriter.writebits(7, (int)MetadataType.Seektable); - bitwriter.writebits(24, 18 * seek_table.Length); - for (int i = 0; i < seek_table.Length; i++) - { - bitwriter.writebits(FlakeConstants.FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN, (ulong)seek_table[i].number); - bitwriter.writebits(FlakeConstants.FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN, (ulong)seek_table[i].offset); - bitwriter.writebits(FlakeConstants.FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN, seek_table[i].framesize); - } - bitwriter.flush(); - return 4 + 18 * seek_table.Length; - } + if(bitwriter.Length >= max_frame_size) throw new Exception("buffer overflow"); - /** - * Write padding metadata block to byte array. - */ - int - write_padding(byte[] padding, int pos, int last, int padlen) - { - BitWriter bitwriter = new BitWriter(padding, pos, 4); + if(frame_buffer != null) + { + if(eparams.variable_block_size > 0) + frame_count += frame.blocksize; + else + frame_count++; + } - // metadata header - bitwriter.writebits(1, last); - bitwriter.writebits(7, (int)MetadataType.Padding); - bitwriter.writebits(24, padlen); + size = frame.blocksize; - bitwriter.flush(); - return padlen + 4; - } - - int write_headers() - { - int header_size = 0; - int last = 0; - - // stream marker - header[0] = 0x66; - header[1] = 0x4C; - header[2] = 0x61; - header[3] = 0x43; - header_size += 4; - - // streaminfo - write_streaminfo(header, header_size, last); - header_size += 38; - - // seek table - if (_IO.CanSeek && seek_table != null) - header_size += write_seekpoints(header, header_size, last); - - // vorbis comments - if (m_settings.Padding == 0) last = 1; - header_size += write_vorbis_comment(header, header_size, header.Length - header_size, last); - - // padding - if (m_settings.Padding > 0) - { - last = 1; - header_size += write_padding(header, header_size, last, m_settings.Padding); - } - - return header_size; - } - - int flake_encode_init() - { - int i, header_len; - - //if(flake_validate_params(s) < 0) - - ch_code = channels - 1; - - // find samplerate in table - for (i = 1; i < 12; i++) - { - if (Settings.PCM.SampleRate == FlakeConstants.flac_samplerates[i]) - { - sr_code0 = i; - break; - } - } - - // if not in table, samplerate is non-standard - if (i == 12) - throw new Exception("non-standard samplerate"); - - for (i = 1; i < 8; i++) - { - if (Settings.PCM.BitsPerSample == FlakeConstants.flac_bitdepths[i]) - { - bps_code = i; - break; - } - } - if (i == 8) - throw new Exception("non-standard bps"); - - m_blockSize = m_settings.BlockSize != 0 ? m_settings.BlockSize : - select_blocksize(Settings.PCM.SampleRate, eparams.block_time_ms); - - // set maximum encoded frame size (if larger, re-encodes in verbatim mode) - if (channels == 2) - max_frame_size = 16 + ((m_blockSize * (Settings.PCM.BitsPerSample + Settings.PCM.BitsPerSample + 1) + 7) >> 3); - else - max_frame_size = 16 + ((m_blockSize * channels * Settings.PCM.BitsPerSample + 7) >> 3); - - if (_IO.CanSeek && eparams.do_seektable && sample_count > 0) - { - int seek_points_distance = Settings.PCM.SampleRate * 10; - int num_seek_points = 1 + sample_count / seek_points_distance; // 1 seek point per 10 seconds - if (sample_count % seek_points_distance == 0) - num_seek_points--; - seek_table = new SeekPoint[num_seek_points]; - for (int sp = 0; sp < num_seek_points; sp++) - { - seek_table[sp].framesize = 0; - seek_table[sp].offset = 0; - seek_table[sp].number = sp * seek_points_distance; - } - } - - // output header bytes - int tagsLen = 0; - Encoding enc = new UTF8Encoding(); - if (m_settings.Tags != null) - foreach (var t in m_settings.Tags) - tagsLen += 4 + enc.GetByteCount(t); - header = new byte[m_settings.Padding + 1024 + (seek_table == null ? 0 : seek_table.Length * 18) + tagsLen]; - header_len = write_headers(); - - // initialize CRC & MD5 - if (_IO.CanSeek && m_settings.DoMD5) - md5 = new MD5CryptoServiceProvider(); - - if (m_settings.DoVerify) - { - verify = new AudioDecoder(Settings.PCM); - verifyBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * channels]; - } - - frame_buffer = new byte[max_frame_size]; - - return header_len; - } - } - - struct FlakeEncodeParams - { - // prediction order selection method - // set by user prior to calling flake_encode_init - // if set to less than 0, it is chosen based on compression. - // valid values are 0 to 5 - // 0 = use maximum order only - // 1 = use estimation - // 2 = 2-level - // 3 = 4-level - // 4 = 8-level - // 5 = full search - // 6 = log search - public OrderMethod order_method; - - // block time in milliseconds - // set by the user prior to calling flake_encode_init - // used to calculate block_size based on sample rate - // can also be changed by user before encoding a frame - public int block_time_ms; - - // whether to use variable block sizes - // set by user prior to calling flake_encode_init - // 0 = fixed block size - // 1 = variable block size - public int variable_block_size; - - public bool do_seektable; - - public int development_mode; - - public int flake_set_defaults(EncoderSettings settings) - { - order_method = OrderMethod.Akaike; - block_time_ms = 105; - variable_block_size = 0; - do_seektable = true; - development_mode = -1; - - if (settings.GetEncoderModeIndex() == 11) - variable_block_size = 4; - - return 0; + return bitwriter.Length; + } } - } + } + + unsafe int output_frame() + { + if(verify != null) + { + fixed(int* s = verifyBuffer, r = samplesBuffer) + { + for(var ch = 0; ch < channels; ch++) + { + AudioSamples.MemCpy(s + ch * FlakeConstants.MAX_BLOCKSIZE, + r + ch * FlakeConstants.MAX_BLOCKSIZE, + m_blockSize); + } + } + } + + int fs, bs; + + //if (0 != eparams.variable_block_size && 0 == (m_blockSize & 7) && m_blockSize >= 128) + // fs = encode_frame_vbs(); + //else + fs = encode_frame(out bs); + + if(seek_table != null && _IO.CanSeek) + { + for(var sp = 0; sp < seek_table.Length; sp++) + { + if(seek_table[sp].framesize != 0) continue; + + if(seek_table[sp].number > Position + bs) break; + + if(seek_table[sp].number >= Position) + { + seek_table[sp].number = Position; + seek_table[sp].offset = _IO.Position - first_frame_offset; + seek_table[sp].framesize = bs; + } + } + } + + Position += bs; + _IO.Write(frame_buffer, 0, fs); + TotalSize += fs; + + if(verify != null) + { + try + { + int decoded = verify.DecodeFrame(frame_buffer, 0, fs); + + if(decoded != fs || verify.Remaining != bs) throw new Exception(Resources.ExceptionValidationFailed); + + fixed(int* s = verifyBuffer, r = verify.Samples) + { + for(var ch = 0; ch < channels; ch++) + { + if(AudioSamples.MemCmp(s + ch * FlakeConstants.MAX_BLOCKSIZE, + r + ch * FlakeConstants.MAX_BLOCKSIZE, + bs)) + throw new Exception(Resources.ExceptionValidationFailed); + } + } + } + catch(Exception ex) + { + //if (channels == 2) + //{ + // var sw = new WAVWriter(string.Format("verify_{0}.wav", this.frame_count), new WAVWriterSettings(this.Settings.PCM)); + // sw.FinalSampleCount = this.frame.blocksize; + // var ab = new AudioBuffer(this.Settings.PCM, this.frame.blocksize); + // ab.Prepare(this.frame.blocksize); + // fixed (int* abs = ab.Samples, s = verifyBuffer) + // AudioSamples.Interlace(abs, s, s + FlakeConstants.MAX_BLOCKSIZE, this.frame.blocksize); + // sw.Write(ab); + // sw.Close(); + //} else + throw ex; + } + } + + if(bs < m_blockSize) + { + for(var ch = 0; ch < (channels == 2 ? 4 : channels); ch++) + { + Buffer.BlockCopy(samplesBuffer, + (bs + ch * FlakeConstants.MAX_BLOCKSIZE) * sizeof(int), + samplesBuffer, + ch * FlakeConstants.MAX_BLOCKSIZE * sizeof(int), + (m_blockSize - bs) * sizeof(int)); + } + + //fixed (int* s = samplesBuffer) + // for (int ch = 0; ch < channels; ch++) + // AudioSamples.MemCpy(s + ch * FlakeConstants.MAX_BLOCKSIZE, s + bs + ch * FlakeConstants.MAX_BLOCKSIZE, m_blockSize - bs); + } + + samplesInBuffer -= bs; + + return bs; + } + + public void Write(AudioBuffer buff) + { + if(!inited) + { + if(_IO == null) _IO = new FileStream(Path, FileMode.Create, FileAccess.Write, FileShare.Read, 0x20000); + inited = true; + int header_size = flake_encode_init(); + _IO.Write(header, 0, header_size); + if(_IO.CanSeek) first_frame_offset = _IO.Position; + } + + buff.Prepare(this); + + var pos = 0; + + while(pos < buff.Length) + { + int block = Math.Min(buff.Length - pos, m_blockSize - samplesInBuffer); + + copy_samples(buff.Samples, pos, block); + + pos += block; + + while(samplesInBuffer >= m_blockSize) output_frame(); + } + + if(md5 != null) md5.TransformBlock(buff.Bytes, 0, buff.ByteLength, null, 0); + } + + public string Path { get; } + + public static string Vendor + { + get + { + Version version = typeof(AudioEncoder).Assembly.GetName().Version; + + return vendor_string ?? "CUETools " + version.Major + "." + version.Minor + "." + version.Build; + } + set => vendor_string = value; + } + + static string vendor_string; + + int select_blocksize(int samplerate, int time_ms) + { + int blocksize = FlakeConstants.flac_blocksizes[1]; + int target = samplerate * time_ms / 1000; + + if(eparams.variable_block_size > 0) + { + blocksize = 1024; + while(target >= blocksize) blocksize <<= 1; + + return blocksize >> 1; + } + + for(var i = 8; i < FlakeConstants.flac_blocksizes.Length - 1; i++) + { + if(target >= FlakeConstants.flac_blocksizes[i] && FlakeConstants.flac_blocksizes[i] > blocksize) + blocksize = FlakeConstants.flac_blocksizes[i]; + } + + return blocksize; + } + + void write_streaminfo(byte[] header, int pos, int last) + { + Array.Clear(header, pos, 38); + var bitwriter = new BitWriter(header, pos, 38); + + // metadata header + bitwriter.writebits(1, last); + bitwriter.writebits(7, (int)MetadataType.StreamInfo); + bitwriter.writebits(24, 34); + + if(eparams.variable_block_size > 0) + bitwriter.writebits(16, 0); + else + bitwriter.writebits(16, m_blockSize); + + bitwriter.writebits(16, m_blockSize); + bitwriter.writebits(24, 0); + bitwriter.writebits(24, max_frame_size); + bitwriter.writebits(20, Settings.PCM.SampleRate); + bitwriter.writebits(3, channels - 1); + bitwriter.writebits(5, Settings.PCM.BitsPerSample - 1); + + // total samples + if(sample_count > 0) + { + bitwriter.writebits(4, 0); + bitwriter.writebits(32, sample_count); + } + else + { + bitwriter.writebits(4, 0); + bitwriter.writebits(32, 0); + } + + bitwriter.flush(); + } + + /** + * Write vorbis comment metadata block to byte array. + * Just writes the vendor string for now. + */ + int write_vorbis_comment(byte[] comment, int pos, int len, int last) + { + var bitwriter = new BitWriter(comment, pos, len); + Encoding enc = new UTF8Encoding(); + byte[] str = enc.GetBytes(Vendor); + + // metadata header + bitwriter.writebits(1, last); + bitwriter.writebits(7, (int)MetadataType.VorbisComment); + var tagsLen = 0; + + if(m_settings.Tags != null) + foreach(string t in m_settings.Tags) + tagsLen += 4 + enc.GetByteCount(t); + + bitwriter.writebits(24, 8 + str.Length + tagsLen); + for(var i = 0; i < 4; i++) bitwriter.writebits(8, str.Length >> i * 8 & 0xff); + bitwriter.write(str); + int nTags = m_settings.Tags != null ? m_settings.Tags.Length : 0; + for(var i = 0; i < 4; i++) bitwriter.writebits(8, nTags >> i * 8 & 0xff); + + if(m_settings.Tags != null) + { + foreach(string tag in m_settings.Tags) + { + str = enc.GetBytes(tag); + for(var i = 0; i < 4; i++) bitwriter.writebits(8, str.Length >> i * 8 & 0xff); + bitwriter.write(str); + } + } + + bitwriter.flush(); + + return bitwriter.Length; + } + + int write_seekpoints(byte[] header, int pos, int last) + { + seek_table_offset = pos + 4; + + var bitwriter = new BitWriter(header, pos, 4 + 18 * seek_table.Length); + + // metadata header + bitwriter.writebits(1, last); + bitwriter.writebits(7, (int)MetadataType.Seektable); + bitwriter.writebits(24, 18 * seek_table.Length); + + for(var i = 0; i < seek_table.Length; i++) + { + bitwriter.writebits(FlakeConstants.FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN, + (ulong)seek_table[i].number); + + bitwriter.writebits(FlakeConstants.FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN, + (ulong)seek_table[i].offset); + + bitwriter.writebits(FlakeConstants.FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN, + seek_table[i].framesize); + } + + bitwriter.flush(); + + return 4 + 18 * seek_table.Length; + } + + /** + * Write padding metadata block to byte array. + */ + int write_padding(byte[] padding, int pos, int last, int padlen) + { + var bitwriter = new BitWriter(padding, pos, 4); + + // metadata header + bitwriter.writebits(1, last); + bitwriter.writebits(7, (int)MetadataType.Padding); + bitwriter.writebits(24, padlen); + + bitwriter.flush(); + + return padlen + 4; + } + + int write_headers() + { + var header_size = 0; + var last = 0; + + // stream marker + header[0] = 0x66; + header[1] = 0x4C; + header[2] = 0x61; + header[3] = 0x43; + header_size += 4; + + // streaminfo + write_streaminfo(header, header_size, last); + header_size += 38; + + // seek table + if(_IO.CanSeek && seek_table != null) header_size += write_seekpoints(header, header_size, last); + + // vorbis comments + if(m_settings.Padding == 0) last = 1; + header_size += write_vorbis_comment(header, header_size, header.Length - header_size, last); + + // padding + if(m_settings.Padding > 0) + { + last = 1; + header_size += write_padding(header, header_size, last, m_settings.Padding); + } + + return header_size; + } + + int flake_encode_init() + { + int i, header_len; + + //if(flake_validate_params(s) < 0) + + ch_code = channels - 1; + + // find samplerate in table + for(i = 1; i < 12; i++) + { + if(Settings.PCM.SampleRate == FlakeConstants.flac_samplerates[i]) + { + sr_code0 = i; + + break; + } + } + + // if not in table, samplerate is non-standard + if(i == 12) throw new Exception("non-standard samplerate"); + + for(i = 1; i < 8; i++) + { + if(Settings.PCM.BitsPerSample == FlakeConstants.flac_bitdepths[i]) + { + bps_code = i; + + break; + } + } + + if(i == 8) throw new Exception("non-standard bps"); + + m_blockSize = m_settings.BlockSize != 0 + ? m_settings.BlockSize + : select_blocksize(Settings.PCM.SampleRate, eparams.block_time_ms); + + // set maximum encoded frame size (if larger, re-encodes in verbatim mode) + if(channels == 2) + { + max_frame_size = + 16 + (m_blockSize * (Settings.PCM.BitsPerSample + Settings.PCM.BitsPerSample + 1) + 7 >> 3); + } + else + max_frame_size = 16 + (m_blockSize * channels * Settings.PCM.BitsPerSample + 7 >> 3); + + if(_IO.CanSeek && eparams.do_seektable && sample_count > 0) + { + int seek_points_distance = Settings.PCM.SampleRate * 10; + int num_seek_points = 1 + sample_count / seek_points_distance; // 1 seek point per 10 seconds + if(sample_count % seek_points_distance == 0) num_seek_points--; + seek_table = new SeekPoint[num_seek_points]; + + for(var sp = 0; sp < num_seek_points; sp++) + { + seek_table[sp].framesize = 0; + seek_table[sp].offset = 0; + seek_table[sp].number = sp * seek_points_distance; + } + } + + // output header bytes + var tagsLen = 0; + Encoding enc = new UTF8Encoding(); + + if(m_settings.Tags != null) + foreach(string t in m_settings.Tags) + tagsLen += 4 + enc.GetByteCount(t); + + header = new byte[m_settings.Padding + 1024 + (seek_table == null ? 0 : seek_table.Length * 18) + tagsLen]; + header_len = write_headers(); + + // initialize CRC & MD5 + if(_IO.CanSeek && m_settings.DoMD5) md5 = new MD5CryptoServiceProvider(); + + if(m_settings.DoVerify) + { + verify = new AudioDecoder(Settings.PCM); + verifyBuffer = new int[FlakeConstants.MAX_BLOCKSIZE * channels]; + } + + frame_buffer = new byte[max_frame_size]; + + return header_len; + } } + +struct FlakeEncodeParams +{ + // prediction order selection method + // set by user prior to calling flake_encode_init + // if set to less than 0, it is chosen based on compression. + // valid values are 0 to 5 + // 0 = use maximum order only + // 1 = use estimation + // 2 = 2-level + // 3 = 4-level + // 4 = 8-level + // 5 = full search + // 6 = log search + public OrderMethod order_method; + + // block time in milliseconds + // set by the user prior to calling flake_encode_init + // used to calculate block_size based on sample rate + // can also be changed by user before encoding a frame + public int block_time_ms; + + // whether to use variable block sizes + // set by user prior to calling flake_encode_init + // 0 = fixed block size + // 1 = variable block size + public int variable_block_size; + + public bool do_seektable; + + public int development_mode; + + public int flake_set_defaults(EncoderSettings settings) + { + order_method = OrderMethod.Akaike; + block_time_ms = 105; + variable_block_size = 0; + do_seektable = true; + development_mode = -1; + + if(settings.GetEncoderModeIndex() == 11) variable_block_size = 4; + + return 0; + } +} \ No newline at end of file diff --git a/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/Flake.cs b/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/Flake.cs index b4a33d9d2..0e4b0456d 100644 --- a/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/Flake.cs +++ b/Aaru.Compression/cuetools.net/CUETools.Codecs.Flake/Flake.cs @@ -18,57 +18,51 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + using System; -namespace CUETools.Codecs.Flake +namespace CUETools.Codecs.Flake; + +public class FlakeConstants { - public class FlakeConstants - { - public const int MAX_BLOCKSIZE = 65535; - public const int MAX_RICE_PARAM = 14; - public const int MAX_PARTITION_ORDER = 8; - public const int MAX_PARTITIONS = 1 << MAX_PARTITION_ORDER; + public const int MAX_BLOCKSIZE = 65535; + public const int MAX_RICE_PARAM = 14; + public const int MAX_PARTITION_ORDER = 8; + public const int MAX_PARTITIONS = 1 << MAX_PARTITION_ORDER; - public const int FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN = 64; /* bits */ - public const int FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN = 64; /* bits */ - public const int FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN = 16; /* bits */ + public const int FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN = 64; /* bits */ + public const int FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN = 64; /* bits */ + public const int FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN = 16; /* bits */ - public static readonly int[] flac_samplerates = new int[16] { - 0, 88200, 176400, 192000, - 8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000, - 0, 0, 0, 0 - }; - //1100 : get 8 bit sample rate (in kHz) from end of header - //1101 : get 16 bit sample rate (in Hz) from end of header - //1110 : get 16 bit sample rate (in tens of Hz) from end of header - public static readonly int[] flac_blocksizes = new int[15] { 0, 192, 576, 1152, 2304, 4608, 0, 0, 256, 512, 1024, 2048, 4096, 8192, 16384 }; - //0110 : get 8 bit (blocksize-1) from end of header - //0111 : get 16 bit (blocksize-1) from end of header - public static readonly int[] flac_bitdepths = new int[8] { 0, 8, 12, 0, 16, 20, 24, 0 }; + public static readonly int[] flac_samplerates = + [ + 0, 88200, 176400, 192000, 8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000, 0, 0, 0, 0 + ]; - public static PredictionType LookupPredictionType(string name) - { - return (PredictionType)(Enum.Parse(typeof(PredictionType), name, true)); - } + //1100 : get 8 bit sample rate (in kHz) from end of header + //1101 : get 16 bit sample rate (in Hz) from end of header + //1110 : get 16 bit sample rate (in tens of Hz) from end of header + public static readonly int[] flac_blocksizes = + [ + 0, 192, 576, 1152, 2304, 4608, 0, 0, 256, 512, 1024, 2048, 4096, 8192, 16384 + ]; - public static StereoMethod LookupStereoMethod(string name) - { - return (StereoMethod)(Enum.Parse(typeof(StereoMethod), name, true)); - } + //0110 : get 8 bit (blocksize-1) from end of header + //0111 : get 16 bit (blocksize-1) from end of header + public static readonly int[] flac_bitdepths = [0, 8, 12, 0, 16, 20, 24, 0]; - public static WindowMethod LookupWindowMethod(string name) - { - return (WindowMethod)(Enum.Parse(typeof(WindowMethod), name, true)); - } + public static PredictionType LookupPredictionType(string name) => + (PredictionType)Enum.Parse(typeof(PredictionType), name, true); - public static OrderMethod LookupOrderMethod(string name) - { - return (OrderMethod)(Enum.Parse(typeof(OrderMethod), name, true)); - } + public static StereoMethod LookupStereoMethod(string name) => + (StereoMethod)Enum.Parse(typeof(StereoMethod), name, true); - public static WindowFunction LookupWindowFunction(string name) - { - return (WindowFunction)(Enum.Parse(typeof(WindowFunction), name, true)); - } - } -} + public static WindowMethod LookupWindowMethod(string name) => + (WindowMethod)Enum.Parse(typeof(WindowMethod), name, true); + + public static OrderMethod LookupOrderMethod(string name) => + (OrderMethod)Enum.Parse(typeof(OrderMethod), name, true); + + public static WindowFunction LookupWindowFunction(string name) => + (WindowFunction)Enum.Parse(typeof(WindowFunction), name, true); +} \ No newline at end of file diff --git a/Aaru.Compression/cuetools.net/CUETools.Codecs/BitReader.cs b/Aaru.Compression/cuetools.net/CUETools.Codecs/BitReader.cs index d2960607b..7989e28e9 100644 --- a/Aaru.Compression/cuetools.net/CUETools.Codecs/BitReader.cs +++ b/Aaru.Compression/cuetools.net/CUETools.Codecs/BitReader.cs @@ -1,335 +1,309 @@ using System; -namespace CUETools.Codecs +namespace CUETools.Codecs; + +public unsafe class BitReader { - unsafe public class BitReader + byte* bptr_m; + int buffer_len_m; + + ulong cache_m; + ushort crc16_m; + int have_bits_m; + + public BitReader() { - #region Static Methods + Buffer = null; + bptr_m = null; + buffer_len_m = 0; + have_bits_m = 0; + cache_m = 0; + crc16_m = 0; + } - public static int log2i(int v) + public BitReader(byte* _buffer, int _pos, int _len) + { + Reset(_buffer, _pos, _len); + } + + public int Position => (int)(bptr_m - Buffer - (have_bits_m >> 3)); + + public byte* Buffer { get; private set; } + + public void Reset(byte* _buffer, int _pos, int _len) + { + Buffer = _buffer; + bptr_m = _buffer + _pos; + buffer_len_m = _len; + have_bits_m = 0; + cache_m = 0; + crc16_m = 0; + fill(); + } + + public void fill() + { + while(have_bits_m < 56) { - return log2i((uint)v); + have_bits_m += 8; + byte b = *bptr_m++; + cache_m |= (ulong)b << 64 - have_bits_m; + crc16_m = (ushort)(crc16_m << 8 ^ Crc16.table[crc16_m >> 8 ^ b]); } + } - public static readonly byte[] MultiplyDeBruijnBitPosition = new byte[32] - { - 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, - 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 - }; - - public static int log2i(ulong v) - { - v |= v >> 1; // first round down to one less than a power of 2 - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - if (v >> 32 == 0) - return MultiplyDeBruijnBitPosition[(uint)((uint)v * 0x07C4ACDDU) >> 27]; - return 32 + MultiplyDeBruijnBitPosition[(uint)((uint)(v >> 32) * 0x07C4ACDDU) >> 27]; - } - - public static int log2i(uint v) - { - v |= v >> 1; // first round down to one less than a power of 2 - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - return MultiplyDeBruijnBitPosition[(uint)(v * 0x07C4ACDDU) >> 27]; - } - - public static readonly byte[] byte_to_unary_table = new byte[] - { - 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - - #endregion - - private byte* buffer_m; - private byte* bptr_m; - private int buffer_len_m; - private int have_bits_m; - private ulong cache_m; - private ushort crc16_m; - - public int Position - { - get { return (int)(bptr_m - buffer_m - (have_bits_m >> 3)); } - } - - public byte* Buffer - { - get - { - return buffer_m; - } - } - - public BitReader() - { - buffer_m = null; - bptr_m = null; - buffer_len_m = 0; - have_bits_m = 0; - cache_m = 0; - crc16_m = 0; - } - - public BitReader(byte* _buffer, int _pos, int _len) - { - Reset(_buffer, _pos, _len); - } - - public void Reset(byte* _buffer, int _pos, int _len) - { - buffer_m = _buffer; - bptr_m = _buffer + _pos; - buffer_len_m = _len; - have_bits_m = 0; - cache_m = 0; - crc16_m = 0; - fill(); - } - - public void fill() - { - while (have_bits_m < 56) - { - have_bits_m += 8; - byte b = *(bptr_m++); - cache_m |= (ulong)b << (64 - have_bits_m); - crc16_m = (ushort)((crc16_m << 8) ^ Crc16.table[(crc16_m >> 8) ^ b]); - } - } - - /* skip any number of bits */ - public void skipbits(int bits) - { - while (bits > have_bits_m) - { - bits -= have_bits_m; - cache_m = 0; - have_bits_m = 0; - fill(); - } - cache_m <<= bits; - have_bits_m -= bits; - } - - public long read_long() - { - return ((long)readbits(32) << 32) | readbits(32); - } - - public ulong read_ulong() - { - return ((ulong)readbits(32) << 32) | readbits(32); - } - - public int read_int() - { - return (int)readbits(sizeof(int)); - } - - public uint read_uint() - { - return (uint)readbits(sizeof(uint)); - } - - public short read_short() - { - return (short)readbits(16); - } - - public ushort read_ushort() - { - return (ushort)readbits(16); - } - - /* supports reading 1 to 32 bits, in big endian format */ - public uint readbits(int bits) + /* skip any number of bits */ + public void skipbits(int bits) + { + while(bits > have_bits_m) { + bits -= have_bits_m; + cache_m = 0; + have_bits_m = 0; fill(); - uint result = (uint)(cache_m >> 64 - bits); - skipbits(bits); - return result; } - /* supports reading 1 to 64 bits, in big endian format */ - public ulong readbits64(int bits) - { - if (bits <= 56) - return readbits(bits); - return ((ulong)readbits(32) << bits - 32) | readbits(bits - 32); - } + cache_m <<= bits; + have_bits_m -= bits; + } - /* reads a single bit */ - public uint readbit() - { - return readbits(1); - } + public long read_long() => (long)readbits(32) << 32 | readbits(32); - public uint read_unary() - { - fill(); - uint val = 0; - ulong result = cache_m >> 56; - while (result == 0) - { - val += 8; - cache_m <<= 8; - byte b = *(bptr_m++); - cache_m |= (ulong)b << (64 - have_bits_m); - crc16_m = (ushort)((crc16_m << 8) ^ Crc16.table[(crc16_m >> 8) ^ b]); - result = cache_m >> 56; - } - val += byte_to_unary_table[result]; - skipbits((int)(val & 7) + 1); - return val; - } + public ulong read_ulong() => (ulong)readbits(32) << 32 | readbits(32); - public void flush() - { - if ((have_bits_m & 7) > 0) - { - cache_m <<= have_bits_m & 7; - have_bits_m -= have_bits_m & 7; - } - } + public int read_int() => (int)readbits(sizeof(int)); - public ushort get_crc16() + public uint read_uint() => readbits(sizeof(uint)); + + public short read_short() => (short)readbits(16); + + public ushort read_ushort() => (ushort)readbits(16); + + /* supports reading 1 to 32 bits, in big endian format */ + public uint readbits(int bits) + { + fill(); + var result = (uint)(cache_m >> 64 - bits); + skipbits(bits); + + return result; + } + + /* supports reading 1 to 64 bits, in big endian format */ + public ulong readbits64(int bits) + { + if(bits <= 56) return readbits(bits); + + return (ulong)readbits(32) << bits - 32 | readbits(bits - 32); + } + + /* reads a single bit */ + public uint readbit() => readbits(1); + + public uint read_unary() + { + fill(); + uint val = 0; + ulong result = cache_m >> 56; + + while(result == 0) { - if (have_bits_m == 0) - return crc16_m; - ushort crc = 0; - int n = have_bits_m >> 3; - for (int i = 0; i < n; i++) - crc = (ushort)((crc << 8) ^ Crc16.table[(crc >> 8) ^ (byte)(cache_m >> (56 - (i << 3)))]); - return Crc16.Subtract(crc16_m, crc, n); + val += 8; + cache_m <<= 8; + byte b = *bptr_m++; + cache_m |= (ulong)b << 64 - have_bits_m; + crc16_m = (ushort)(crc16_m << 8 ^ Crc16.table[crc16_m >> 8 ^ b]); + result = cache_m >> 56; } - public int readbits_signed(int bits) - { - int val = (int)readbits(bits); - val <<= (32 - bits); - val >>= (32 - bits); - return val; - } + val += byte_to_unary_table[result]; + skipbits((int)(val & 7) + 1); - public uint read_utf8() - { - uint x = readbits(8); - uint v; - int i; - if (0 == (x & 0x80)) - { - v = x; - i = 0; - } - else if (0xC0 == (x & 0xE0)) /* 110xxxxx */ - { - v = x & 0x1F; - i = 1; - } - else if (0xE0 == (x & 0xF0)) /* 1110xxxx */ - { - v = x & 0x0F; - i = 2; - } - else if (0xF0 == (x & 0xF8)) /* 11110xxx */ - { - v = x & 0x07; - i = 3; - } - else if (0xF8 == (x & 0xFC)) /* 111110xx */ - { - v = x & 0x03; - i = 4; - } - else if (0xFC == (x & 0xFE)) /* 1111110x */ - { - v = x & 0x01; - i = 5; - } - else if (0xFE == x) /* 11111110 */ - { - v = 0; - i = 6; - } - else - { - throw new Exception("invalid utf8 encoding"); - } - for (; i > 0; i--) - { - x = readbits(8); - if (0x80 != (x & 0xC0)) /* 10xxxxxx */ - throw new Exception("invalid utf8 encoding"); - v <<= 6; - v |= (x & 0x3F); - } - return v; - } + return val; + } - public void read_rice_block(int n, int k, int* r) - { - fill(); - fixed (byte* unary_table = byte_to_unary_table) - fixed (ushort* t = Crc16.table) + public void flush() + { + if((have_bits_m & 7) > 0) + { + cache_m <<= have_bits_m & 7; + have_bits_m -= have_bits_m & 7; + } + } + + public ushort get_crc16() + { + if(have_bits_m == 0) return crc16_m; + ushort crc = 0; + int n = have_bits_m >> 3; + for(var i = 0; i < n; i++) crc = (ushort)(crc << 8 ^ Crc16.table[crc >> 8 ^ (byte)(cache_m >> 56 - (i << 3))]); + + return Crc16.Subtract(crc16_m, crc, n); + } + + public int readbits_signed(int bits) + { + var val = (int)readbits(bits); + val <<= 32 - bits; + val >>= 32 - bits; + + return val; + } + + public uint read_utf8() + { + uint x = readbits(8); + uint v; + int i; + + if(0 == (x & 0x80)) + { + v = x; + i = 0; + } + else if(0xC0 == (x & 0xE0)) /* 110xxxxx */ + { + v = x & 0x1F; + i = 1; + } + else if(0xE0 == (x & 0xF0)) /* 1110xxxx */ + { + v = x & 0x0F; + i = 2; + } + else if(0xF0 == (x & 0xF8)) /* 11110xxx */ + { + v = x & 0x07; + i = 3; + } + else if(0xF8 == (x & 0xFC)) /* 111110xx */ + { + v = x & 0x03; + i = 4; + } + else if(0xFC == (x & 0xFE)) /* 1111110x */ + { + v = x & 0x01; + i = 5; + } + else if(0xFE == x) /* 11111110 */ + { + v = 0; + i = 6; + } + else + throw new Exception("invalid utf8 encoding"); + + for(; i > 0; i--) + { + x = readbits(8); + + if(0x80 != (x & 0xC0)) /* 10xxxxxx */ throw new Exception("invalid utf8 encoding"); + v <<= 6; + v |= x & 0x3F; + } + + return v; + } + + public void read_rice_block(int n, int k, int* r) + { + fill(); + + fixed(byte* unary_table = byte_to_unary_table) + { + fixed(ushort* t = Crc16.table) { - uint mask = (1U << k) - 1; - byte* bptr = bptr_m; - int have_bits = have_bits_m; - ulong cache = cache_m; - ushort crc = crc16_m; - for (int i = n; i > 0; i--) + uint mask = (1U << k) - 1; + byte* bptr = bptr_m; + int have_bits = have_bits_m; + ulong cache = cache_m; + ushort crc = crc16_m; + + for(int i = n; i > 0; i--) { - uint bits; + uint bits; byte* orig_bptr = bptr; - while ((bits = unary_table[cache >> 56]) == 8) + + while((bits = unary_table[cache >> 56]) == 8) { cache <<= 8; - byte b = *(bptr++); - cache |= (ulong)b << (64 - have_bits); - crc = (ushort)((crc << 8) ^ t[(crc >> 8) ^ b]); - } - uint msbs = bits + ((uint)(bptr - orig_bptr) << 3); - // assumes k <= 41 (have_bits < 41 + 7 + 1 + 8 == 57, so we don't loose bits here) - while (have_bits < 56) - { - have_bits += 8; - byte b = *(bptr++); - cache |= (ulong)b << (64 - have_bits); - crc = (ushort)((crc << 8) ^ t[(crc >> 8) ^ b]); + byte b = *bptr++; + cache |= (ulong)b << 64 - have_bits; + crc = (ushort)(crc << 8 ^ t[crc >> 8 ^ b]); } - int btsk = k + (int)bits + 1; - uint uval = (msbs << k) | (uint)((cache >> (64 - btsk)) & mask); - cache <<= btsk; - have_bits -= btsk; - *(r++) = (int)(uval >> 1 ^ -(int)(uval & 1)); + uint msbs = bits + ((uint)(bptr - orig_bptr) << 3); + + // assumes k <= 41 (have_bits < 41 + 7 + 1 + 8 == 57, so we don't loose bits here) + while(have_bits < 56) + { + have_bits += 8; + byte b = *bptr++; + cache |= (ulong)b << 64 - have_bits; + crc = (ushort)(crc << 8 ^ t[crc >> 8 ^ b]); + } + + int btsk = k + (int)bits + 1; + uint uval = msbs << k | (uint)(cache >> 64 - btsk & mask); + cache <<= btsk; + have_bits -= btsk; + *r++ = (int)(uval >> 1 ^ -(int)(uval & 1)); } + have_bits_m = have_bits; - cache_m = cache; - bptr_m = bptr; - crc16_m = crc; + cache_m = cache; + bptr_m = bptr; + crc16_m = crc; } - } - } -} + } + } + +#region Static Methods + + public static int log2i(int v) => log2i((uint)v); + + public static readonly byte[] MultiplyDeBruijnBitPosition = + [ + 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, + 5, 4, 31 + ]; + + public static int log2i(ulong v) + { + v |= v >> 1; // first round down to one less than a power of 2 + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + + if(v >> 32 == 0) return MultiplyDeBruijnBitPosition[(uint)v * 0x07C4ACDDU >> 27]; + + return 32 + MultiplyDeBruijnBitPosition[(uint)(v >> 32) * 0x07C4ACDDU >> 27]; + } + + public static int log2i(uint v) + { + v |= v >> 1; // first round down to one less than a power of 2 + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + + return MultiplyDeBruijnBitPosition[v * 0x07C4ACDDU >> 27]; + } + + public static readonly byte[] byte_to_unary_table = + [ + 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0 + ]; + +#endregion +} \ No newline at end of file diff --git a/Aaru.Compression/cuetools.net/CUETools.Codecs/CRC/CRC16CCITT.cs b/Aaru.Compression/cuetools.net/CUETools.Codecs/CRC/CRC16CCITT.cs index d38d8821b..aba9c60a6 100644 --- a/Aaru.Compression/cuetools.net/CUETools.Codecs/CRC/CRC16CCITT.cs +++ b/Aaru.Compression/cuetools.net/CUETools.Codecs/CRC/CRC16CCITT.cs @@ -1,51 +1,54 @@ -namespace CUETools.Codecs +namespace CUETools.Codecs; + +public enum InitialCrcValue { - public enum InitialCrcValue { Zeros, NonZero1 = 0xffff, NonZero2 = 0x1D0F } - - public class Crc16Ccitt - { - const ushort poly = 4129; - ushort[] table = new ushort[256]; - ushort initialValue = 0; - - public ushort ComputeChecksum(byte[] bytes, int pos, int count) - { - ushort crc = this.initialValue; - for (int i = pos; i < pos + count; i++) - { - crc = (ushort)((crc << 8) ^ table[((crc >> 8) ^ (0xff & bytes[i]))]); - } - return crc; - } - - public byte[] ComputeChecksumBytes(byte[] bytes, int pos, int count) - { - ushort crc = ComputeChecksum(bytes, pos, count); - return new byte[] { (byte)(crc >> 8), (byte)(crc & 0x00ff) }; - } - - public Crc16Ccitt(InitialCrcValue initialValue) - { - this.initialValue = (ushort)initialValue; - ushort temp, a; - for (int i = 0; i < table.Length; i++) - { - temp = 0; - a = (ushort)(i << 8); - for (int j = 0; j < 8; j++) - { - if (((temp ^ a) & 0x8000) != 0) - { - temp = (ushort)((temp << 1) ^ poly); - } - else - { - temp <<= 1; - } - a <<= 1; - } - table[i] = temp; - } - } - } + Zeros, + NonZero1 = 0xffff, + NonZero2 = 0x1D0F } + +public class Crc16Ccitt +{ + const ushort poly = 4129; + readonly ushort initialValue; + readonly ushort[] table = new ushort[256]; + + public Crc16Ccitt(InitialCrcValue initialValue) + { + this.initialValue = (ushort)initialValue; + ushort temp, a; + + for(var i = 0; i < table.Length; i++) + { + temp = 0; + a = (ushort)(i << 8); + + for(var j = 0; j < 8; j++) + { + if(((temp ^ a) & 0x8000) != 0) + temp = (ushort)(temp << 1 ^ poly); + else + temp <<= 1; + + a <<= 1; + } + + table[i] = temp; + } + } + + public ushort ComputeChecksum(byte[] bytes, int pos, int count) + { + ushort crc = initialValue; + for(int i = pos; i < pos + count; i++) crc = (ushort)(crc << 8 ^ table[crc >> 8 ^ 0xff & bytes[i]]); + + return crc; + } + + public byte[] ComputeChecksumBytes(byte[] bytes, int pos, int count) + { + ushort crc = ComputeChecksum(bytes, pos, count); + + return [(byte)(crc >> 8), (byte)(crc & 0x00ff)]; + } +} \ No newline at end of file diff --git a/Aaru.Compression/cuetools.net/CUETools.Codecs/CUEToolsCodecsConfig.cs b/Aaru.Compression/cuetools.net/CUETools.Codecs/CUEToolsCodecsConfig.cs index 0bf0103a0..108d886b8 100644 --- a/Aaru.Compression/cuetools.net/CUETools.Codecs/CUEToolsCodecsConfig.cs +++ b/Aaru.Compression/cuetools.net/CUETools.Codecs/CUEToolsCodecsConfig.cs @@ -1,94 +1,296 @@ -using Newtonsoft.Json; -using System; +using System; using System.Collections.Generic; -using System.IO; -using System.Net; -using System.Text; -using System.Threading; -using System.Xml; -using System.Xml.Serialization; +using CUETools.Codecs.CommandLine; +using Newtonsoft.Json; -namespace CUETools.Codecs +namespace CUETools.Codecs; + +public class CUEToolsCodecsConfig { - public class CUEToolsCodecsConfig + public List decoders; + [JsonIgnore] + public DecoderListViewModel decodersViewModel; + public List encoders; + [JsonIgnore] + public EncoderListViewModel encodersViewModel; + [JsonIgnore] + public Dictionary formats; + + public CUEToolsCodecsConfig() { - [JsonIgnore] - public Dictionary formats; - public List encoders; - public List decoders; - [JsonIgnore] - public EncoderListViewModel encodersViewModel; - [JsonIgnore] - public DecoderListViewModel decodersViewModel; - - public CUEToolsCodecsConfig() - { - encoders = new List(); - decoders = new List(); - encodersViewModel = new EncoderListViewModel(encoders); - decodersViewModel = new DecoderListViewModel(decoders); - formats = new Dictionary(); - } - - public CUEToolsCodecsConfig(CUEToolsCodecsConfig src) - { - encoders = new List(); - decoders = new List(); - src.encoders.ForEach(item => encoders.Add(item.Clone())); - src.decoders.ForEach(item => decoders.Add(item.Clone())); - encodersViewModel = new EncoderListViewModel(encoders); - decodersViewModel = new DecoderListViewModel(decoders); - formats = new Dictionary(); - foreach (var fmt in src.formats) - formats.Add(fmt.Key, fmt.Value.Clone(this)); - } - - public void Init(List src_encoders, List src_decoders) - { - encoders = new List(); - decoders = new List(); - src_encoders.ForEach(item => encoders.Add(item.Clone())); - src_decoders.ForEach(item => decoders.Add(item.Clone())); - - if (Type.GetType("Mono.Runtime", false) == null) - { - encoders.Add(new CommandLine.EncoderSettings("flake.exe", "flac", true, "0 1 2 3 4 5 6 7 8 9 10 11 12", "8", "flake.exe", "-%M - -o %O -p %P")); - encoders.Add(new CommandLine.EncoderSettings("takc.exe", "tak", true, "0 1 2 2e 2m 3 3e 3m 4 4e 4m", "2", "takc.exe", "-e -p%M -overwrite - %O")); - encoders.Add(new CommandLine.EncoderSettings("ffmpeg.exe", "m4a", true, "", "", "ffmpeg.exe", "-i - -f ipod -acodec alac -y %O")); - encoders.Add(new CommandLine.EncoderSettings("lame.exe (VBR)", "mp3", false, "V9 V8 V7 V6 V5 V4 V3 V2 V1 V0", "V2", "lame.exe", "--vbr-new -%M - %O")); - encoders.Add(new CommandLine.EncoderSettings("lame.exe (CBR)", "mp3", false, "96 128 192 256 320", "256", "lame.exe", "-m s -q 0 -b %M --noreplaygain - %O")); - encoders.Add(new CommandLine.EncoderSettings("oggenc.exe", "ogg", false, "-1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8", "3", "oggenc.exe", "-q %M - -o %O")); - encoders.Add(new CommandLine.EncoderSettings("opusenc.exe", "opus", false, "6 16 32 48 64 96 128 192 256", "128", "opusenc.exe", "--bitrate %M - %O")); - encoders.Add(new CommandLine.EncoderSettings("neroAacEnc.exe", "m4a", false, "0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9", "0.4", "neroAacEnc.exe", "-q %M -if - -of %O")); - encoders.Add(new CommandLine.EncoderSettings("qaac.exe (tvbr)", "m4a", false, "10 20 30 40 50 60 70 80 90 100 110 127", "80", "qaac.exe", "-s -V %M -q 2 - -o %O")); - - decoders.Add(new CommandLine.DecoderSettings("takc.exe", "tak", "takc.exe", "-d %I -")); - decoders.Add(new CommandLine.DecoderSettings("ffmpeg.exe", "m4a", "ffmpeg.exe", "-v 0 -i %I -f wav -")); - } - else - { - // !!! - } - - encodersViewModel = new EncoderListViewModel(encoders); - decodersViewModel = new DecoderListViewModel(decoders); - - formats = new Dictionary(); - formats.Add("flac", new CUEToolsFormat("flac", CUEToolsTagger.TagLibSharp, true, false, true, true, encodersViewModel.GetDefault("flac", true), null, decodersViewModel.GetDefault("flac"))); - formats.Add("wv", new CUEToolsFormat("wv", CUEToolsTagger.TagLibSharp, true, false, true, true, encodersViewModel.GetDefault("wv", true), null, decodersViewModel.GetDefault("wv"))); - formats.Add("ape", new CUEToolsFormat("ape", CUEToolsTagger.TagLibSharp, true, false, true, true, encodersViewModel.GetDefault("ape", true), null, decodersViewModel.GetDefault("ape"))); - formats.Add("tta", new CUEToolsFormat("tta", CUEToolsTagger.APEv2, true, false, false, true, encodersViewModel.GetDefault("tta", true), null, decodersViewModel.GetDefault("tta"))); - formats.Add("m2ts", new CUEToolsFormat("m2ts", CUEToolsTagger.APEv2, true, false, false, true, null, null, decodersViewModel.GetDefault("m2ts"))); - formats.Add("mpls", new CUEToolsFormat("mpls", CUEToolsTagger.APEv2, true, false, false, true, null, null, decodersViewModel.GetDefault("mpls"))); - formats.Add("wav", new CUEToolsFormat("wav", CUEToolsTagger.TagLibSharp, true, false, false, true, encodersViewModel.GetDefault("wav", true), null, decodersViewModel.GetDefault("wav"))); - formats.Add("m4a", new CUEToolsFormat("m4a", CUEToolsTagger.TagLibSharp, true, true, false, true, encodersViewModel.GetDefault("m4a", true), encodersViewModel.GetDefault("m4a", false), decodersViewModel.GetDefault("m4a"))); - formats.Add("tak", new CUEToolsFormat("tak", CUEToolsTagger.APEv2, true, false, true, true, encodersViewModel.GetDefault("tak", true), null, decodersViewModel.GetDefault("tak"))); - formats.Add("wma", new CUEToolsFormat("wma", CUEToolsTagger.TagLibSharp, true, true, false, true, encodersViewModel.GetDefault("wma", true), encodersViewModel.GetDefault("wma", false), decodersViewModel.GetDefault("wma"))); - formats.Add("mp3", new CUEToolsFormat("mp3", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encodersViewModel.GetDefault("mp3", false), null)); - formats.Add("ogg", new CUEToolsFormat("ogg", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encodersViewModel.GetDefault("ogg", false), null)); - formats.Add("opus", new CUEToolsFormat("opus", CUEToolsTagger.TagLibSharp, false, true, false, true, null, encodersViewModel.GetDefault("opus", false), null)); - formats.Add("mlp", new CUEToolsFormat("mlp", CUEToolsTagger.APEv2, true, false, false, false, null, null, decodersViewModel.GetDefault("mlp"))); - formats.Add("aob", new CUEToolsFormat("aob", CUEToolsTagger.APEv2, true, false, false, false, null, null, decodersViewModel.GetDefault("aob"))); - } + encoders = []; + decoders = []; + encodersViewModel = new EncoderListViewModel(encoders); + decodersViewModel = new DecoderListViewModel(decoders); + formats = new Dictionary(); } -} + + public CUEToolsCodecsConfig(CUEToolsCodecsConfig src) + { + encoders = []; + decoders = []; + src.encoders.ForEach(item => encoders.Add(item.Clone())); + src.decoders.ForEach(item => decoders.Add(item.Clone())); + encodersViewModel = new EncoderListViewModel(encoders); + decodersViewModel = new DecoderListViewModel(decoders); + formats = new Dictionary(); + foreach(KeyValuePair fmt in src.formats) formats.Add(fmt.Key, fmt.Value.Clone(this)); + } + + public void Init(List src_encoders, List src_decoders) + { + encoders = []; + decoders = []; + src_encoders.ForEach(item => encoders.Add(item.Clone())); + src_decoders.ForEach(item => decoders.Add(item.Clone())); + + if(Type.GetType("Mono.Runtime", false) == null) + { + encoders.Add(new EncoderSettings("flake.exe", + "flac", + true, + "0 1 2 3 4 5 6 7 8 9 10 11 12", + "8", + "flake.exe", + "-%M - -o %O -p %P")); + + encoders.Add(new EncoderSettings("takc.exe", + "tak", + true, + "0 1 2 2e 2m 3 3e 3m 4 4e 4m", + "2", + "takc.exe", + "-e -p%M -overwrite - %O")); + + encoders.Add(new EncoderSettings("ffmpeg.exe", + "m4a", + true, + "", + "", + "ffmpeg.exe", + "-i - -f ipod -acodec alac -y %O")); + + encoders.Add(new EncoderSettings("lame.exe (VBR)", + "mp3", + false, + "V9 V8 V7 V6 V5 V4 V3 V2 V1 V0", + "V2", + "lame.exe", + "--vbr-new -%M - %O")); + + encoders.Add(new EncoderSettings("lame.exe (CBR)", + "mp3", + false, + "96 128 192 256 320", + "256", + "lame.exe", + "-m s -q 0 -b %M --noreplaygain - %O")); + + encoders.Add(new EncoderSettings("oggenc.exe", + "ogg", + false, + "-1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8", + "3", + "oggenc.exe", + "-q %M - -o %O")); + + encoders.Add(new EncoderSettings("opusenc.exe", + "opus", + false, + "6 16 32 48 64 96 128 192 256", + "128", + "opusenc.exe", + "--bitrate %M - %O")); + + encoders.Add(new EncoderSettings("neroAacEnc.exe", + "m4a", + false, + "0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9", + "0.4", + "neroAacEnc.exe", + "-q %M -if - -of %O")); + + encoders.Add(new EncoderSettings("qaac.exe (tvbr)", + "m4a", + false, + "10 20 30 40 50 60 70 80 90 100 110 127", + "80", + "qaac.exe", + "-s -V %M -q 2 - -o %O")); + + decoders.Add(new DecoderSettings("takc.exe", "tak", "takc.exe", "-d %I -")); + decoders.Add(new DecoderSettings("ffmpeg.exe", "m4a", "ffmpeg.exe", "-v 0 -i %I -f wav -")); + } + + // !!! + encodersViewModel = new EncoderListViewModel(encoders); + decodersViewModel = new DecoderListViewModel(decoders); + + formats = new Dictionary(); + + formats.Add("flac", + new CUEToolsFormat("flac", + CUEToolsTagger.TagLibSharp, + true, + false, + true, + true, + encodersViewModel.GetDefault("flac", true), + null, + decodersViewModel.GetDefault("flac"))); + + formats.Add("wv", + new CUEToolsFormat("wv", + CUEToolsTagger.TagLibSharp, + true, + false, + true, + true, + encodersViewModel.GetDefault("wv", true), + null, + decodersViewModel.GetDefault("wv"))); + + formats.Add("ape", + new CUEToolsFormat("ape", + CUEToolsTagger.TagLibSharp, + true, + false, + true, + true, + encodersViewModel.GetDefault("ape", true), + null, + decodersViewModel.GetDefault("ape"))); + + formats.Add("tta", + new CUEToolsFormat("tta", + CUEToolsTagger.APEv2, + true, + false, + false, + true, + encodersViewModel.GetDefault("tta", true), + null, + decodersViewModel.GetDefault("tta"))); + + formats.Add("m2ts", + new CUEToolsFormat("m2ts", + CUEToolsTagger.APEv2, + true, + false, + false, + true, + null, + null, + decodersViewModel.GetDefault("m2ts"))); + + formats.Add("mpls", + new CUEToolsFormat("mpls", + CUEToolsTagger.APEv2, + true, + false, + false, + true, + null, + null, + decodersViewModel.GetDefault("mpls"))); + + formats.Add("wav", + new CUEToolsFormat("wav", + CUEToolsTagger.TagLibSharp, + true, + false, + false, + true, + encodersViewModel.GetDefault("wav", true), + null, + decodersViewModel.GetDefault("wav"))); + + formats.Add("m4a", + new CUEToolsFormat("m4a", + CUEToolsTagger.TagLibSharp, + true, + true, + false, + true, + encodersViewModel.GetDefault("m4a", true), + encodersViewModel.GetDefault("m4a", false), + decodersViewModel.GetDefault("m4a"))); + + formats.Add("tak", + new CUEToolsFormat("tak", + CUEToolsTagger.APEv2, + true, + false, + true, + true, + encodersViewModel.GetDefault("tak", true), + null, + decodersViewModel.GetDefault("tak"))); + + formats.Add("wma", + new CUEToolsFormat("wma", + CUEToolsTagger.TagLibSharp, + true, + true, + false, + true, + encodersViewModel.GetDefault("wma", true), + encodersViewModel.GetDefault("wma", false), + decodersViewModel.GetDefault("wma"))); + + formats.Add("mp3", + new CUEToolsFormat("mp3", + CUEToolsTagger.TagLibSharp, + false, + true, + false, + true, + null, + encodersViewModel.GetDefault("mp3", false), + null)); + + formats.Add("ogg", + new CUEToolsFormat("ogg", + CUEToolsTagger.TagLibSharp, + false, + true, + false, + true, + null, + encodersViewModel.GetDefault("ogg", false), + null)); + + formats.Add("opus", + new CUEToolsFormat("opus", + CUEToolsTagger.TagLibSharp, + false, + true, + false, + true, + null, + encodersViewModel.GetDefault("opus", false), + null)); + + formats.Add("mlp", + new CUEToolsFormat("mlp", + CUEToolsTagger.APEv2, + true, + false, + false, + false, + null, + null, + decodersViewModel.GetDefault("mlp"))); + + formats.Add("aob", + new CUEToolsFormat("aob", + CUEToolsTagger.APEv2, + true, + false, + false, + false, + null, + null, + decodersViewModel.GetDefault("aob"))); + } +} \ No newline at end of file diff --git a/Aaru.Compression/cuetools.net/CUETools.Codecs/IAudioSource.cs b/Aaru.Compression/cuetools.net/CUETools.Codecs/IAudioSource.cs index ef88362dc..37481dd04 100644 --- a/Aaru.Compression/cuetools.net/CUETools.Codecs/IAudioSource.cs +++ b/Aaru.Compression/cuetools.net/CUETools.Codecs/IAudioSource.cs @@ -1,82 +1,98 @@ using System; using System.Collections.Generic; -namespace CUETools.Codecs +namespace CUETools.Codecs; + +public interface IAudioSource { - public interface IAudioSource - { - IAudioDecoderSettings Settings { get; } + IAudioDecoderSettings Settings { get; } - AudioPCMConfig PCM { get; } - string Path { get; } + AudioPCMConfig PCM { get; } + string Path { get; } - TimeSpan Duration { get; } - long Length { get; } - long Position { get; set; } - long Remaining { get; } + TimeSpan Duration { get; } + long Length { get; } + long Position { get; set; } + long Remaining { get; } - int Read(AudioBuffer buffer, int maxLength); - void Close(); - } + int Read(AudioBuffer buffer, int maxLength); + void Close(); +} - public interface IAudioTitle +public interface IAudioTitle +{ + List Chapters { get; } + AudioPCMConfig PCM { get; } + string Codec { get; } + string Language { get; } + int StreamId { get; } + + //IAudioSource Open { get; } +} + +public interface IAudioTitleSet +{ + List AudioTitles { get; } +} + +public static class IAudioTitleExtensions +{ + public static TimeSpan GetDuration(this IAudioTitle title) { - List Chapters { get; } - AudioPCMConfig PCM { get; } - string Codec { get; } - string Language { get; } - int StreamId { get; } - //IAudioSource Open { get; } + List chapters = title.Chapters; + + return chapters[chapters.Count - 1]; } - public interface IAudioTitleSet + + public static string GetRateString(this IAudioTitle title) { - List AudioTitles { get; } + int sr = title.PCM.SampleRate; + + if(sr % 1000 == 0) return $"{sr / 1000}KHz"; + if(sr % 100 == 0) return $"{sr / 100}.{sr / 100 % 10}KHz"; + + return $"{sr}Hz"; } - public static class IAudioTitleExtensions + public static string GetFormatString(this IAudioTitle title) { - public static TimeSpan GetDuration(this IAudioTitle title) + switch(title.PCM.ChannelCount) { - var chapters = title.Chapters; - return chapters[chapters.Count - 1]; + case 1: + return "mono"; + case 2: + return "stereo"; + default: + return "multi-channel"; } - - - public static string GetRateString(this IAudioTitle title) - { - var sr = title.PCM.SampleRate; - if (sr % 1000 == 0) return $"{sr / 1000}KHz"; - if (sr % 100 == 0) return $"{sr / 100}.{(sr / 100) % 10}KHz"; - return $"{sr}Hz"; - } - - public static string GetFormatString(this IAudioTitle title) - { - switch (title.PCM.ChannelCount) - { - case 1: return "mono"; - case 2: return "stereo"; - default: return "multi-channel"; - } - } - } - - public class SingleAudioTitle : IAudioTitle - { - public SingleAudioTitle(IAudioSource source) { this.source = source; } - public List Chapters => new List { TimeSpan.Zero, source.Duration }; - public AudioPCMConfig PCM => source.PCM; - public string Codec => source.Settings.Extension; - public string Language => ""; - public int StreamId => 0; - IAudioSource source; - } - - public class SingleAudioTitleSet : IAudioTitleSet - { - public SingleAudioTitleSet(IAudioSource source) { this.source = source; } - public List AudioTitles => new List { new SingleAudioTitle(source) }; - IAudioSource source; } } + +public class SingleAudioTitle : IAudioTitle +{ + readonly IAudioSource source; + public SingleAudioTitle(IAudioSource source) => this.source = source; + +#region IAudioTitle Members + + public List Chapters => [TimeSpan.Zero, source.Duration]; + public AudioPCMConfig PCM => source.PCM; + public string Codec => source.Settings.Extension; + public string Language => ""; + public int StreamId => 0; + +#endregion +} + +public class SingleAudioTitleSet : IAudioTitleSet +{ + readonly IAudioSource source; + public SingleAudioTitleSet(IAudioSource source) => this.source = source; + +#region IAudioTitleSet Members + + public List AudioTitles => [new SingleAudioTitle(source)]; + +#endregion +} \ No newline at end of file diff --git a/Aaru.Compression/cuetools.net/CUETools.Codecs/SRDescriptionAttribute.cs b/Aaru.Compression/cuetools.net/CUETools.Codecs/SRDescriptionAttribute.cs index 6c3e2fddd..0ccb04675 100644 --- a/Aaru.Compression/cuetools.net/CUETools.Codecs/SRDescriptionAttribute.cs +++ b/Aaru.Compression/cuetools.net/CUETools.Codecs/SRDescriptionAttribute.cs @@ -1,56 +1,56 @@ using System; using System.ComponentModel; +using System.Reflection; -namespace CUETools.Codecs +namespace CUETools.Codecs; + +/// +/// Localized description attribute +/// +[AttributeUsage(AttributeTargets.All)] +public class SRDescriptionAttribute : DescriptionAttribute { - /// - /// Localized description attribute - /// - [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] - public class SRDescriptionAttribute : DescriptionAttribute + /// + /// Resource manager to use; + /// + readonly Type SR; + /// + /// Store a flag indicating whether this has been localized + /// + bool localized; + + /// + /// Construct the description attribute + /// + /// + public SRDescriptionAttribute(Type SR, string text) : base(text) { - /// - /// Store a flag indicating whether this has been localized - /// - private bool localized; + localized = false; + this.SR = SR; + } - /// - /// Resource manager to use; - /// - private Type SR; + /// + /// Override the return of the description text to localize the text + /// + public override string Description + { + get + { + if(!localized) + { + localized = true; - /// - /// Construct the description attribute - /// - /// - public SRDescriptionAttribute(Type SR, string text) - : base(text) - { - this.localized = false; - this.SR = SR; - } + DescriptionValue = SR.InvokeMember(DescriptionValue, + BindingFlags.GetProperty | + BindingFlags.Static | + BindingFlags.Public | + BindingFlags.NonPublic, + null, + null, + []) as string; + } - /// - /// Override the return of the description text to localize the text - /// - public override string Description - { - get - { - if (!localized) - { - localized = true; - this.DescriptionValue = SR.InvokeMember( - this.DescriptionValue, - System.Reflection.BindingFlags.GetProperty | System.Reflection.BindingFlags.Static | - System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic, - null, - null, - new object[] { }) as string; - } - - return base.Description; - } - } - } -} + return base.Description; + } + } +} \ No newline at end of file diff --git a/Aaru.Compression/cuetools.net/CUETools.Codecs/WAV/AudioEncoder.cs b/Aaru.Compression/cuetools.net/CUETools.Codecs/WAV/AudioEncoder.cs index 3f32eb0a9..d028f6e90 100644 --- a/Aaru.Compression/cuetools.net/CUETools.Codecs/WAV/AudioEncoder.cs +++ b/Aaru.Compression/cuetools.net/CUETools.Codecs/WAV/AudioEncoder.cs @@ -2,179 +2,181 @@ using System.Collections.Generic; using System.IO; -namespace CUETools.Codecs.WAV +namespace CUETools.Codecs.WAV; + +public class AudioEncoder : IAudioDest { - public class AudioEncoder : IAudioDest + readonly EncoderSettings m_settings; + BinaryWriter _bw; + List _chunkFCCs; + List _chunks; + long _finalSampleCount = -1; + bool _headersWritten; + Stream _IO; + long hdrLen; + + public AudioEncoder(EncoderSettings settings, string path, Stream IO = null) { - private Stream _IO; - private BinaryWriter _bw; - private long _sampleLen; - private string _path; - private long hdrLen = 0; - private bool _headersWritten = false; - private long _finalSampleCount = -1; - private List _chunks = null; - private List _chunkFCCs = null; - - public long Position - { - get - { - return _sampleLen; - } - } - - public long FinalSampleCount - { - set { _finalSampleCount = value; } - } - - private EncoderSettings m_settings; - public IAudioEncoderSettings Settings => m_settings; - - public string Path { get { return _path; } } - - public AudioEncoder(EncoderSettings settings, string path, Stream IO = null) - { - m_settings = settings; - _path = path; - _IO = IO ?? new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read); - _bw = new BinaryWriter(_IO); - } - - public void WriteChunk(uint fcc, byte[] data) - { - if (_sampleLen > 0) - throw new Exception("data already written, no chunks allowed"); - if (_chunks == null) - { - _chunks = new List(); - _chunkFCCs = new List(); - } - _chunkFCCs.Add(fcc); - _chunks.Add(data); - hdrLen += 8 + data.Length + (data.Length & 1); - } - - private void WriteHeaders() - { - const uint fccRIFF = 0x46464952; - const uint fccWAVE = 0x45564157; - const uint fccFormat = 0x20746D66; - const uint fccData = 0x61746164; - - bool wavex = (Settings.PCM.BitsPerSample != 16 && Settings.PCM.BitsPerSample != 24) || Settings.PCM.ChannelMask != AudioPCMConfig.GetDefaultChannelMask(Settings.PCM.ChannelCount); - - hdrLen += 36 + (wavex ? 24 : 0) + 8; - - uint dataLen = (uint)(_finalSampleCount * Settings.PCM.BlockAlign); - uint dataLenPadded = dataLen + (dataLen & 1); - - _bw.Write(fccRIFF); - if (_finalSampleCount <= 0) - _bw.Write((uint)0xffffffff); - else - _bw.Write((uint)(dataLenPadded + hdrLen - 8)); - _bw.Write(fccWAVE); - _bw.Write(fccFormat); - if (wavex) - { - _bw.Write((uint)40); - _bw.Write((ushort)0xfffe); // WAVEX follows - } - else - { - _bw.Write((uint)16); - _bw.Write((ushort)1); // PCM - } - _bw.Write((ushort)Settings.PCM.ChannelCount); - _bw.Write((uint)Settings.PCM.SampleRate); - _bw.Write((uint)(Settings.PCM.SampleRate * Settings.PCM.BlockAlign)); - _bw.Write((ushort)Settings.PCM.BlockAlign); - _bw.Write((ushort)((Settings.PCM.BitsPerSample + 7) / 8 * 8)); - if (wavex) - { - _bw.Write((ushort)22); // length of WAVEX structure - _bw.Write((ushort)Settings.PCM.BitsPerSample); - _bw.Write((uint)Settings.PCM.ChannelMask); - _bw.Write((ushort)1); // PCM Guid - _bw.Write((ushort)0); - _bw.Write((ushort)0); - _bw.Write((ushort)0x10); - _bw.Write((byte)0x80); - _bw.Write((byte)0x00); - _bw.Write((byte)0x00); - _bw.Write((byte)0xaa); - _bw.Write((byte)0x00); - _bw.Write((byte)0x38); - _bw.Write((byte)0x9b); - _bw.Write((byte)0x71); - } - if (_chunks != null) - for (int i = 0; i < _chunks.Count; i++) - { - _bw.Write(_chunkFCCs[i]); - _bw.Write((uint)_chunks[i].Length); - _bw.Write(_chunks[i]); - if ((_chunks[i].Length & 1) != 0) - _bw.Write((byte)0); - } - - _bw.Write(fccData); - if (_finalSampleCount <= 0) - _bw.Write((uint)0xffffffff); - else - _bw.Write(dataLen); - - _headersWritten = true; - } - - public void Close() - { - if (_finalSampleCount <= 0 && _IO.CanSeek) - { - long dataLen = _sampleLen * Settings.PCM.BlockAlign; - long dataLenPadded = dataLen + (dataLen & 1); - if (dataLenPadded + hdrLen - 8 < 0xffffffff) - { - if ((dataLen & 1) == 1) - _bw.Write((byte)0); - - _bw.Seek(4, SeekOrigin.Begin); - _bw.Write((uint)(dataLenPadded + hdrLen - 8)); - - _bw.Seek((int)hdrLen - 4, SeekOrigin.Begin); - _bw.Write((uint)dataLen); - } - } - - _bw.Close(); - - _bw = null; - _IO = null; - - if (_finalSampleCount > 0 && _sampleLen != _finalSampleCount) - throw new Exception("Samples written differs from the expected sample count."); - } - - public void Delete() - { - _bw.Close(); - _bw = null; - _IO = null; - if (_path != "") - File.Delete(_path); - } - - public void Write(AudioBuffer buff) - { - if (buff.Length == 0) - return; - buff.Prepare(this); - if (!_headersWritten) - WriteHeaders(); - _IO.Write(buff.Bytes, 0, buff.ByteLength); - _sampleLen += buff.Length; - } + m_settings = settings; + Path = path; + _IO = IO ?? new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read); + _bw = new BinaryWriter(_IO); } -} + + public long Position { get; private set; } + +#region IAudioDest Members + + public long FinalSampleCount + { + set => _finalSampleCount = value; + } + + public IAudioEncoderSettings Settings => m_settings; + + public string Path { get; } + + public void Close() + { + if(_finalSampleCount <= 0 && _IO.CanSeek) + { + long dataLen = Position * Settings.PCM.BlockAlign; + long dataLenPadded = dataLen + (dataLen & 1); + + if(dataLenPadded + hdrLen - 8 < 0xffffffff) + { + if((dataLen & 1) == 1) _bw.Write((byte)0); + + _bw.Seek(4, SeekOrigin.Begin); + _bw.Write((uint)(dataLenPadded + hdrLen - 8)); + + _bw.Seek((int)hdrLen - 4, SeekOrigin.Begin); + _bw.Write((uint)dataLen); + } + } + + _bw.Close(); + + _bw = null; + _IO = null; + + if(_finalSampleCount > 0 && Position != _finalSampleCount) + throw new Exception("Samples written differs from the expected sample count."); + } + + public void Delete() + { + _bw.Close(); + _bw = null; + _IO = null; + if(Path != "") File.Delete(Path); + } + + public void Write(AudioBuffer buff) + { + if(buff.Length == 0) return; + buff.Prepare(this); + if(!_headersWritten) WriteHeaders(); + _IO.Write(buff.Bytes, 0, buff.ByteLength); + Position += buff.Length; + } + +#endregion + + public void WriteChunk(uint fcc, byte[] data) + { + if(Position > 0) throw new Exception("data already written, no chunks allowed"); + + if(_chunks == null) + { + _chunks = []; + _chunkFCCs = []; + } + + _chunkFCCs.Add(fcc); + _chunks.Add(data); + hdrLen += 8 + data.Length + (data.Length & 1); + } + + void WriteHeaders() + { + const uint fccRIFF = 0x46464952; + const uint fccWAVE = 0x45564157; + const uint fccFormat = 0x20746D66; + const uint fccData = 0x61746164; + + bool wavex = Settings.PCM.BitsPerSample != 16 && Settings.PCM.BitsPerSample != 24 || + Settings.PCM.ChannelMask != AudioPCMConfig.GetDefaultChannelMask(Settings.PCM.ChannelCount); + + hdrLen += 36 + (wavex ? 24 : 0) + 8; + + var dataLen = (uint)(_finalSampleCount * Settings.PCM.BlockAlign); + uint dataLenPadded = dataLen + (dataLen & 1); + + _bw.Write(fccRIFF); + + if(_finalSampleCount <= 0) + _bw.Write(0xffffffff); + else + _bw.Write((uint)(dataLenPadded + hdrLen - 8)); + + _bw.Write(fccWAVE); + _bw.Write(fccFormat); + + if(wavex) + { + _bw.Write((uint)40); + _bw.Write((ushort)0xfffe); // WAVEX follows + } + else + { + _bw.Write((uint)16); + _bw.Write((ushort)1); // PCM + } + + _bw.Write((ushort)Settings.PCM.ChannelCount); + _bw.Write((uint)Settings.PCM.SampleRate); + _bw.Write((uint)(Settings.PCM.SampleRate * Settings.PCM.BlockAlign)); + _bw.Write((ushort)Settings.PCM.BlockAlign); + _bw.Write((ushort)((Settings.PCM.BitsPerSample + 7) / 8 * 8)); + + if(wavex) + { + _bw.Write((ushort)22); // length of WAVEX structure + _bw.Write((ushort)Settings.PCM.BitsPerSample); + _bw.Write((uint)Settings.PCM.ChannelMask); + _bw.Write((ushort)1); // PCM Guid + _bw.Write((ushort)0); + _bw.Write((ushort)0); + _bw.Write((ushort)0x10); + _bw.Write((byte)0x80); + _bw.Write((byte)0x00); + _bw.Write((byte)0x00); + _bw.Write((byte)0xaa); + _bw.Write((byte)0x00); + _bw.Write((byte)0x38); + _bw.Write((byte)0x9b); + _bw.Write((byte)0x71); + } + + if(_chunks != null) + { + for(var i = 0; i < _chunks.Count; i++) + { + _bw.Write(_chunkFCCs[i]); + _bw.Write((uint)_chunks[i].Length); + _bw.Write(_chunks[i]); + if((_chunks[i].Length & 1) != 0) _bw.Write((byte)0); + } + } + + _bw.Write(fccData); + + if(_finalSampleCount <= 0) + _bw.Write(0xffffffff); + else + _bw.Write(dataLen); + + _headersWritten = true; + } +} \ No newline at end of file diff --git a/Aaru.Core/Checksum.cs b/Aaru.Core/Checksum.cs index 1a180cae7..89693173b 100644 --- a/Aaru.Core/Checksum.cs +++ b/Aaru.Core/Checksum.cs @@ -370,7 +370,7 @@ public sealed class Checksum /// Returns the checksum results public List End() { - List chks = new(); + List chks = []; if(_enabled.HasFlag(EnableChecksum.Adler32)) { @@ -680,7 +680,7 @@ public sealed class Checksum f16ThreadData.IsAlive || f32ThreadData.IsAlive) {} - List dataChecksums = new(); + List dataChecksums = []; if(enabled.HasFlag(EnableChecksum.Adler32)) { diff --git a/Aaru.Core/Devices/Dumping/ATA.cs b/Aaru.Core/Devices/Dumping/ATA.cs index 4d188c99d..6d56f3b1a 100644 --- a/Aaru.Core/Devices/Dumping/ATA.cs +++ b/Aaru.Core/Devices/Dumping/ATA.cs @@ -103,7 +103,7 @@ public partial class Dump double currentSpeed = 0; double maxSpeed = double.MinValue; double minSpeed = double.MaxValue; - cmdBuf = Array.Empty(); + cmdBuf = []; // Initialize reader UpdateStatus?.Invoke(Localization.Core.Initializing_reader); @@ -895,7 +895,9 @@ public partial class Dump $"{version.MajorVersion}.{version.MinorVersion}"; sidecar.BlockMedias[0].Pcmcia.AdditionalInformation = - new List(version.AdditionalInformation); + [ + ..version.AdditionalInformation + ]; } break; @@ -937,7 +939,7 @@ public partial class Dump .Per(totalChkDuration.Milliseconds()) .Humanize()); - List<(ulong start, string type)> filesystems = new(); + List<(ulong start, string type)> filesystems = []; if(sidecar.BlockMedias[0].FileSystemInformation != null) { diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/CdiReady.cs b/Aaru.Core/Devices/Dumping/CompactDisc/CdiReady.cs index 112f0f2bd..a3240e200 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/CdiReady.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/CdiReady.cs @@ -58,10 +58,7 @@ partial class Dump { if(sector?.Length != 2352) return false; - byte[] syncMark = - { - 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 - }; + byte[] syncMark = [0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00]; var testMark = new byte[12]; Array.Copy(sector, 0, testMark, 0, 12); @@ -80,10 +77,7 @@ partial class Dump if(sector?.Length != 2352) return false; - byte[] syncMark = - { - 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 - }; + byte[] syncMark = [0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00]; var testMark = new byte[12]; diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs index 8340b9028..739297f24 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs @@ -115,7 +115,7 @@ sealed partial class Dump var bcdSubchannel = false; // Subchannel positioning is in BCD Dictionary isrcs = new(); string mcn = null; - HashSet subchannelExtents = new(); + HashSet subchannelExtents = []; var cdiReadyReadAsAudio = false; uint firstLba; var outputOptical = _outputPlugin as IWritableOpticalImage; @@ -647,8 +647,8 @@ sealed partial class Dump return; } - List trkList = new() - { + List trkList = + [ new Track { Sequence = (uint)(tracks.Any(t => t.Sequence == 1) ? 0 : 1), @@ -660,7 +660,7 @@ sealed partial class Dump SubchannelType = subType, EndSector = tracks.First(t => t.Sequence >= 1).StartSector - 1 } - }; + ]; trkList.AddRange(tracks); tracks = trkList.ToArray(); @@ -1068,12 +1068,7 @@ sealed partial class Dump _dumpLog.WriteLine(Localization.Core.Setting_flags_for_track_0, track.Sequence); UpdateStatus?.Invoke(string.Format(Localization.Core.Setting_flags_for_track_0, track.Sequence)); - outputOptical.WriteSectorTag(new[] - { - kvp.Value - }, - kvp.Key, - SectorTagType.CdTrackFlags); + outputOptical.WriteSectorTag([kvp.Value], kvp.Key, SectorTagType.CdTrackFlags); } // Set MCN @@ -1108,16 +1103,15 @@ sealed partial class Dump if(supportedSubchannel != MmcSubchannel.None && desiredSubchannel != MmcSubchannel.None) { - subchannelExtents = new HashSet(); + subchannelExtents = []; - _resume.BadSubchannels ??= new List(); + _resume.BadSubchannels ??= []; foreach(int sub in _resume.BadSubchannels) subchannelExtents.Add(sub); if(_resume.NextBlock < blocks) - { - for(ulong i = _resume.NextBlock; i < blocks; i++) subchannelExtents.Add((int)i); - } + for(ulong i = _resume.NextBlock; i < blocks; i++) + subchannelExtents.Add((int)i); } if(_resume.NextBlock > 0) @@ -1606,9 +1600,8 @@ sealed partial class Dump supportsLongSectors); foreach(Tuple leadoutExtent in leadOutExtents.ToArray()) - { - for(ulong e = leadoutExtent.Item1; e <= leadoutExtent.Item2; e++) subchannelExtents.Remove((int)e); - } + for(ulong e = leadoutExtent.Item1; e <= leadoutExtent.Item2; e++) + subchannelExtents.Remove((int)e); if(subchannelExtents.Count > 0 && _retryPasses > 0 && _retrySubchannel) { @@ -1655,7 +1648,7 @@ sealed partial class Dump currentTry.Extents = ExtentsConverter.ToMetadata(extents); - _resume.BadSubchannels = new List(); + _resume.BadSubchannels = []; _resume.BadSubchannels.AddRange(subchannelExtents); _resume.BadSubchannels.Sort(); diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs index fe008d487..1c0e58d00 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs @@ -182,15 +182,15 @@ partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { + Pages = + [ new Modes.ModePage { Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) } - } + ] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -219,7 +219,7 @@ partial class Dump InitProgress?.Invoke(); cdRepeatRetry: ulong[] tmpArray = _resume.BadBlocks.ToArray(); - List sectorsNotEvenPartial = new(); + List sectorsNotEvenPartial = []; for(var i = 0; i < tmpArray.Length; i++) { @@ -469,9 +469,8 @@ partial class Dump // MEDIUM ERROR, retry with ignore error below if(decSense is { ASC: 0x11 }) - { - if(!sectorsNotEvenPartial.Contains(badSector)) sectorsNotEvenPartial.Add(badSector); - } + if(!sectorsNotEvenPartial.Contains(badSector)) + sectorsNotEvenPartial.Add(badSector); } // Because one block has been partially used to fix the offset @@ -587,15 +586,15 @@ partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { + Pages = + [ new Modes.ModePage { Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) } - } + ] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -717,10 +716,7 @@ partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { - currentModePage.Value - } + Pages = [currentModePage.Value] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -778,7 +774,7 @@ partial class Dump cdRepeatRetry: - _resume.BadSubchannels = new List(); + _resume.BadSubchannels = []; _resume.BadSubchannels.AddRange(subchannelExtents); _resume.BadSubchannels.Sort(); diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Recordable.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Recordable.cs index 5bab23c26..d4445b17d 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Recordable.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Recordable.cs @@ -48,7 +48,7 @@ partial class Dump HashSet subchannelExtents, SubchannelLog subLog, bool supportsLongSectors, Dictionary trackFlags, Track[] tracks) { - List runOutSectors = new(); + List runOutSectors = []; if(_outputPlugin is not IWritableOpticalImage outputOptical) return; diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs index cd3925d03..09d32d9bd 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs @@ -68,7 +68,7 @@ partial class Dump byte[] cmdBuf; // Data buffer const uint sectorSize = 2352; // Full sector size bool sense; // Sense indicator - List trackList = new(); // Tracks in disc + List trackList = []; // Tracks in disc byte[] tmpBuf; // Temporary buffer toc = null; lastSector = 0; diff --git a/Aaru.Core/Devices/Dumping/MMC.cs b/Aaru.Core/Devices/Dumping/MMC.cs index 34a710582..35cdea42e 100644 --- a/Aaru.Core/Devices/Dumping/MMC.cs +++ b/Aaru.Core/Devices/Dumping/MMC.cs @@ -1131,9 +1131,9 @@ partial class Dump case MediaTagType.Xbox_SecuritySector: sidecar.OpticalDiscs[0].Xbox ??= new Xbox(); - sidecar.OpticalDiscs[0].Xbox.SecuritySectors = new List - { - new() + sidecar.OpticalDiscs[0].Xbox.SecuritySectors = + [ + new XboxSecuritySector { RequestNumber = 0, RequestVersion = 1, @@ -1144,7 +1144,7 @@ partial class Dump Checksums = Checksum.GetChecksums(tag) } } - }; + ]; break; case MediaTagType.Xbox_PFI: @@ -1206,27 +1206,27 @@ partial class Dump break; case MediaTagType.CD_FirstTrackPregap: - sidecar.OpticalDiscs[0].FirstTrackPregrap = new List - { - new() + sidecar.OpticalDiscs[0].FirstTrackPregrap = + [ + new Border { Image = outputPath, Size = (ulong)tag.Length, Checksums = Checksum.GetChecksums(tag) } - }; + ]; break; case MediaTagType.CD_LeadIn: - sidecar.OpticalDiscs[0].LeadIn = new List - { - new() + sidecar.OpticalDiscs[0].LeadIn = + [ + new Border { Image = outputPath, Size = (ulong)tag.Length, Checksums = Checksum.GetChecksums(tag) } - }; + ]; break; } diff --git a/Aaru.Core/Devices/Dumping/Metadata.cs b/Aaru.Core/Devices/Dumping/Metadata.cs index a3ce46822..fd7ed0b56 100644 --- a/Aaru.Core/Devices/Dumping/Metadata.cs +++ b/Aaru.Core/Devices/Dumping/Metadata.cs @@ -111,7 +111,7 @@ partial class Dump sidecar = _preSidecar; } - List<(ulong start, string type)> filesystems = new(); + List<(ulong start, string type)> filesystems = []; if(sidecar.OpticalDiscs[0].Track != null) { diff --git a/Aaru.Core/Devices/Dumping/MiniDisc.cs b/Aaru.Core/Devices/Dumping/MiniDisc.cs index 57ac0d5ae..33154372d 100644 --- a/Aaru.Core/Devices/Dumping/MiniDisc.cs +++ b/Aaru.Core/Devices/Dumping/MiniDisc.cs @@ -613,15 +613,15 @@ partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { + Pages = + [ new Modes.ModePage { Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) } - } + ] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -724,10 +724,7 @@ partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { - currentModePage.Value - } + Pages = [currentModePage.Value] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -840,7 +837,7 @@ partial class Dump sidecar = _preSidecar; } - List<(ulong start, string type)> filesystems = new(); + List<(ulong start, string type)> filesystems = []; if(sidecar.BlockMedias[0].FileSystemInformation != null) { diff --git a/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs b/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs index 9befe0cb2..d93d644d1 100644 --- a/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs +++ b/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs @@ -497,15 +497,15 @@ public partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { + Pages = + [ new Modes.ModePage { Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) } - } + ] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -616,10 +616,7 @@ public partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { - currentModePage.Value - } + Pages = [currentModePage.Value] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -732,7 +729,7 @@ public partial class Dump sidecar = _preSidecar; } - List<(ulong start, string type)> filesystems = new(); + List<(ulong start, string type)> filesystems = []; if(sidecar.BlockMedias[0].FileSystemInformation != null) { diff --git a/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs b/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs index ce0434ed8..2ad950a16 100644 --- a/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs +++ b/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; @@ -186,19 +185,18 @@ public partial class Dump _dumpStopwatch.Restart(); double imageWriteDuration = 0; - outputOptical.SetTracks(new List - { - new() - { - BytesPerSector = (int)blockSize, - EndSector = blocks - 1, - Sequence = 1, - RawBytesPerSector = (int)blockSize, - SubchannelType = TrackSubchannelType.None, - Session = 1, - Type = TrackType.Data - } - }); + outputOptical.SetTracks([ + new Track + { + BytesPerSector = (int)blockSize, + EndSector = blocks - 1, + Sequence = 1, + RawBytesPerSector = (int)blockSize, + SubchannelType = TrackSubchannelType.None, + Session = 1, + Type = TrackType.Data + } + ]); DumpHardware currentTry = null; ExtentsULong extents = null; @@ -517,15 +515,15 @@ public partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { + Pages = + [ new Modes.ModePage { Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) } - } + ] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -635,10 +633,7 @@ public partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { - currentModePage.Value - } + Pages = [currentModePage.Value] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); diff --git a/Aaru.Core/Devices/Dumping/ResumeSupport.cs b/Aaru.Core/Devices/Dumping/ResumeSupport.cs index 9c6785c0e..6b855e461 100644 --- a/Aaru.Core/Devices/Dumping/ResumeSupport.cs +++ b/Aaru.Core/Devices/Dumping/ResumeSupport.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using Aaru.CommonTypes.AaruMetadata; using Aaru.CommonTypes.Extents; using Aaru.CommonTypes.Metadata; @@ -179,9 +178,9 @@ static class ResumeSupport { resume = new Resume { - Tries = new List(), + Tries = [], CreationDate = DateTime.UtcNow, - BadBlocks = new List(), + BadBlocks = [], LastBlock = isTape ? 0 : blocks - 1, Tape = isTape }; diff --git a/Aaru.Core/Devices/Dumping/SSC.cs b/Aaru.Core/Devices/Dumping/SSC.cs index ef95e14cf..036eb4d14 100644 --- a/Aaru.Core/Devices/Dumping/SSC.cs +++ b/Aaru.Core/Devices/Dumping/SSC.cs @@ -285,9 +285,8 @@ partial class Dump Modes.DecodedMode? decMode = null; if(!sense && !_dev.Error) - { - if(Modes.DecodeMode10(cmdBuf, _dev.ScsiType).HasValue) decMode = Modes.DecodeMode10(cmdBuf, _dev.ScsiType); - } + if(Modes.DecodeMode10(cmdBuf, _dev.ScsiType).HasValue) + decMode = Modes.DecodeMode10(cmdBuf, _dev.ScsiType); UpdateStatus?.Invoke(Localization.Core.Requesting_MODE_SENSE_6); @@ -315,9 +314,8 @@ partial class Dump if(sense || _dev.Error) sense = _dev.ModeSense(out cmdBuf, out senseBuf, 5, out duration); if(!sense && !_dev.Error) - { - if(Modes.DecodeMode6(cmdBuf, _dev.ScsiType).HasValue) decMode = Modes.DecodeMode6(cmdBuf, _dev.ScsiType); - } + if(Modes.DecodeMode6(cmdBuf, _dev.ScsiType).HasValue) + decMode = Modes.DecodeMode6(cmdBuf, _dev.ScsiType); // TODO: Check partitions page if(decMode.HasValue) @@ -1530,7 +1528,7 @@ partial class Dump sidecar = _preSidecar; } - List<(ulong start, string type)> filesystems = new(); + List<(ulong start, string type)> filesystems = []; if(sidecar.BlockMedias[0].FileSystemInformation != null) { diff --git a/Aaru.Core/Devices/Dumping/Sbc/Cache.cs b/Aaru.Core/Devices/Dumping/Sbc/Cache.cs index 53f5ecb5d..7167c7a9c 100644 --- a/Aaru.Core/Devices/Dumping/Sbc/Cache.cs +++ b/Aaru.Core/Devices/Dumping/Sbc/Cache.cs @@ -126,12 +126,7 @@ partial class Dump if(key.All(static k => k == 0)) { - outputFormat.WriteSectorTag(new byte[] - { - 0, 0, 0, 0, 0 - }, - i + j, - SectorTagType.DvdTitleKeyDecrypted); + outputFormat.WriteSectorTag([0, 0, 0, 0, 0], i + j, SectorTagType.DvdTitleKeyDecrypted); _resume.MissingTitleKeys?.Remove(i + j); diff --git a/Aaru.Core/Devices/Dumping/Sbc/Data.cs b/Aaru.Core/Devices/Dumping/Sbc/Data.cs index 74d2ff203..b581925dc 100644 --- a/Aaru.Core/Devices/Dumping/Sbc/Data.cs +++ b/Aaru.Core/Devices/Dumping/Sbc/Data.cs @@ -135,12 +135,7 @@ partial class Dump if(titleKey.HasValue) { - outputFormat.WriteSectorTag(new[] - { - titleKey.Value.CMI - }, - i + j, - SectorTagType.DvdSectorCmi); + outputFormat.WriteSectorTag([titleKey.Value.CMI], i + j, SectorTagType.DvdSectorCmi); } else continue; @@ -149,19 +144,9 @@ partial class Dump // not encrypted even if the CMI says it is. if(titleKey.Value.Key.All(static k => k == 0)) { - outputFormat.WriteSectorTag(new byte[] - { - 0, 0, 0, 0, 0 - }, - i + j, - SectorTagType.DvdSectorTitleKey); + outputFormat.WriteSectorTag([0, 0, 0, 0, 0], i + j, SectorTagType.DvdSectorTitleKey); - outputFormat.WriteSectorTag(new byte[] - { - 0, 0, 0, 0, 0 - }, - i + j, - SectorTagType.DvdTitleKeyDecrypted); + outputFormat.WriteSectorTag([0, 0, 0, 0, 0], i + j, SectorTagType.DvdTitleKeyDecrypted); _resume.MissingTitleKeys.Remove(i + j); diff --git a/Aaru.Core/Devices/Dumping/Sbc/Dump.cs b/Aaru.Core/Devices/Dumping/Sbc/Dump.cs index 3f0ecb29a..c50c6bb61 100644 --- a/Aaru.Core/Devices/Dumping/Sbc/Dump.cs +++ b/Aaru.Core/Devices/Dumping/Sbc/Dump.cs @@ -485,7 +485,7 @@ partial class Dump UpdateStatus?.Invoke(Localization.Core.Building_track_map); _dumpLog.WriteLine(Localization.Core.Building_track_map); - List tracks = new(); + List tracks = []; for(ushort tno = discInformation.Value.FirstTrackNumber; tno <= discInformation?.LastTrackLastSession; @@ -597,19 +597,18 @@ partial class Dump } else { - opticalPlugin.SetTracks(new List - { - new() - { - BytesPerSector = (int)blockSize, - EndSector = blocks - 1, - Sequence = 1, - RawBytesPerSector = (int)blockSize, - SubchannelType = TrackSubchannelType.None, - Session = 1, - Type = TrackType.Data - } - }); + opticalPlugin.SetTracks([ + new Track + { + BytesPerSector = (int)blockSize, + EndSector = blocks - 1, + Sequence = 1, + RawBytesPerSector = (int)blockSize, + SubchannelType = TrackSubchannelType.None, + Session = 1, + Type = TrackType.Data + } + ]); } } } @@ -714,19 +713,18 @@ partial class Dump UpdateStatus?.Invoke(Localization.Core .Creating_single_track_as_could_not_retrieve_track_list_from_drive); - (outputFormat as IWritableOpticalImage)?.SetTracks(new List - { - new() - { - BytesPerSector = (int)blockSize, - EndSector = blocks - 1, - Sequence = 1, - RawBytesPerSector = (int)blockSize, - SubchannelType = TrackSubchannelType.None, - Session = 1, - Type = TrackType.Data - } - }); + (outputFormat as IWritableOpticalImage)?.SetTracks([ + new Track + { + BytesPerSector = (int)blockSize, + EndSector = blocks - 1, + Sequence = 1, + RawBytesPerSector = (int)blockSize, + SubchannelType = TrackSubchannelType.None, + Session = 1, + Type = TrackType.Data + } + ]); } } @@ -816,7 +814,7 @@ partial class Dump (CopyrightType)cmi[0] == CopyrightType.CSS) { UpdateStatus?.Invoke(Localization.Core.Title_keys_dumping_is_enabled_This_will_be_very_slow); - _resume.MissingTitleKeys ??= new List(Enumerable.Range(0, (int)blocks).Select(n => (ulong)n)); + _resume.MissingTitleKeys ??= [..Enumerable.Range(0, (int)blocks).Select(n => (ulong)n)]; } if(_dev.ScsiType == PeripheralDeviceTypes.OpticalDevice) @@ -1431,7 +1429,7 @@ partial class Dump } } - List<(ulong start, string type)> filesystems = new(); + List<(ulong start, string type)> filesystems = []; if(sidecar.BlockMedias[0].FileSystemInformation != null) { diff --git a/Aaru.Core/Devices/Dumping/Sbc/Error.cs b/Aaru.Core/Devices/Dumping/Sbc/Error.cs index 1613b28dd..1f44e0df9 100644 --- a/Aaru.Core/Devices/Dumping/Sbc/Error.cs +++ b/Aaru.Core/Devices/Dumping/Sbc/Error.cs @@ -174,15 +174,15 @@ partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { + Pages = + [ new Modes.ModePage { Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) } - } + ] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -207,15 +207,15 @@ partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { + Pages = + [ new Modes.ModePage { Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) } - } + ] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -340,10 +340,7 @@ partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { - currentModePage.Value - } + Pages = [currentModePage.Value] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -408,30 +405,15 @@ partial class Dump if(!titleKey.HasValue) continue; - outputFormat.WriteSectorTag(new[] - { - titleKey.Value.CMI - }, - missingKey, - SectorTagType.DvdSectorCmi); + outputFormat.WriteSectorTag([titleKey.Value.CMI], missingKey, SectorTagType.DvdSectorCmi); // If the CMI bit is 1, the sector is using copy protection, else it is not // If the decoded title key is zeroed, there should be no copy protection if((titleKey.Value.CMI & 0x80) >> 7 == 0 || titleKey.Value.Key.All(k => k == 0)) { - outputFormat.WriteSectorTag(new byte[] - { - 0, 0, 0, 0, 0 - }, - missingKey, - SectorTagType.DvdSectorTitleKey); + outputFormat.WriteSectorTag([0, 0, 0, 0, 0], missingKey, SectorTagType.DvdSectorTitleKey); - outputFormat.WriteSectorTag(new byte[] - { - 0, 0, 0, 0, 0 - }, - missingKey, - SectorTagType.DvdTitleKeyDecrypted); + outputFormat.WriteSectorTag([0, 0, 0, 0, 0], missingKey, SectorTagType.DvdTitleKeyDecrypted); _resume.MissingTitleKeys.Remove(missingKey); diff --git a/Aaru.Core/Devices/Dumping/XGD.cs b/Aaru.Core/Devices/Dumping/XGD.cs index 9d4d4c80c..6c08c076a 100644 --- a/Aaru.Core/Devices/Dumping/XGD.cs +++ b/Aaru.Core/Devices/Dumping/XGD.cs @@ -623,19 +623,18 @@ partial class Dump _mediaGraph?.PaintSectorsBad(_resume.BadBlocks); } - (outputFormat as IWritableOpticalImage).SetTracks(new List - { - new() - { - BytesPerSector = (int)blockSize, - EndSector = blocks - 1, - Sequence = 1, - RawBytesPerSector = (int)blockSize, - SubchannelType = TrackSubchannelType.None, - Session = 1, - Type = TrackType.Data - } - }); + (outputFormat as IWritableOpticalImage).SetTracks([ + new Track + { + BytesPerSector = (int)blockSize, + EndSector = blocks - 1, + Sequence = 1, + RawBytesPerSector = (int)blockSize, + SubchannelType = TrackSubchannelType.None, + Session = 1, + Type = TrackType.Data + } + ]); ulong currentSector = _resume.NextBlock; @@ -785,11 +784,7 @@ partial class Dump i += _skip - blocksToRead; string[] senseLines = Sense.PrettifySense(senseBuf) - .Split(new[] - { - Environment.NewLine - }, - StringSplitOptions.RemoveEmptyEntries); + .Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries); foreach(string senseLine in senseLines) _dumpLog.WriteLine(senseLine); @@ -997,11 +992,7 @@ partial class Dump l1 += _skip - blocksToRead; string[] senseLines = Sense.PrettifySense(senseBuf) - .Split(new[] - { - Environment.NewLine - }, - StringSplitOptions.RemoveEmptyEntries); + .Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries); foreach(string senseLine in senseLines) _dumpLog.WriteLine(senseLine); } @@ -1152,12 +1143,11 @@ partial class Dump if(_resume.BadBlocks.Count > 0 && !_aborted && _retryPasses > 0) { - List tmpList = new(); + List tmpList = []; foreach(ulong ur in _resume.BadBlocks) - { - for(ulong i = ur; i < ur + blocksToRead; i++) tmpList.Add(i); - } + for(ulong i = ur; i < ur + blocksToRead; i++) + tmpList.Add(i); tmpList.Sort(); @@ -1245,15 +1235,15 @@ partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { + Pages = + [ new Modes.ModePage { Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) } - } + ] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -1368,10 +1358,7 @@ partial class Dump var md = new Modes.DecodedMode { Header = new Modes.ModeHeader(), - Pages = new[] - { - currentModePage.Value - } + Pages = [currentModePage.Value] }; md6 = Modes.EncodeMode6(md, _dev.ScsiType); @@ -1465,13 +1452,13 @@ partial class Dump var layers = new Layers { Type = LayerType.OTP, - Sectors = new List - { - new() + Sectors = + [ + new Sectors { Value = layerBreak } - } + ] }; WriteOpticalSidecar(blockSize, blocks, dskType, layers, mediaTags, 1, out totalChkDuration, null); diff --git a/Aaru.Core/Devices/Report/ATA.cs b/Aaru.Core/Devices/Report/ATA.cs index ec228cfe7..3705b480d 100644 --- a/Aaru.Core/Devices/Report/ATA.cs +++ b/Aaru.Core/Devices/Report/ATA.cs @@ -50,8 +50,8 @@ public sealed partial class DeviceReport AtaErrorRegistersChs errorChs = new(); AtaErrorRegistersLba28 errorLba = new(); AtaErrorRegistersLba48 errorLba48 = new(); - byte[] buffer = Array.Empty(); - byte[] readBuf = Array.Empty(); + byte[] buffer = []; + byte[] readBuf = []; var mediaTest = new TestedMedia { @@ -536,7 +536,7 @@ public sealed partial class DeviceReport public TestedMedia ReportAta(Identify.IdentifyDevice ataId) { var sense = true; - byte[] readBuf = Array.Empty(); + byte[] readBuf = []; AtaErrorRegistersChs errorChs = new(); AtaErrorRegistersLba28 errorLba = new(); AtaErrorRegistersLba48 errorLba48 = new(); diff --git a/Aaru.Core/Devices/Report/MMC.cs b/Aaru.Core/Devices/Report/MMC.cs index 85a0f0d80..1d15385cf 100644 --- a/Aaru.Core/Devices/Report/MMC.cs +++ b/Aaru.Core/Devices/Report/MMC.cs @@ -76,7 +76,7 @@ public sealed partial class DeviceReport public MmcFeatures ReportMmcFeatures() { var sense = true; - byte[] buffer = Array.Empty(); + byte[] buffer = []; Spectre.ProgressSingleSpinner(ctx => { @@ -580,8 +580,8 @@ public sealed partial class DeviceReport bool tryMediaTekF106) { var sense = true; - byte[] buffer = Array.Empty(); - byte[] senseBuffer = Array.Empty(); + byte[] buffer = []; + byte[] senseBuffer = []; var mediaTest = new TestedMedia(); Spectre.ProgressSingleSpinner(ctx => diff --git a/Aaru.Core/Devices/Report/SSC.cs b/Aaru.Core/Devices/Report/SSC.cs index 15016172b..f1eb8fadb 100644 --- a/Aaru.Core/Devices/Report/SSC.cs +++ b/Aaru.Core/Devices/Report/SSC.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using System.Linq; using Aaru.CommonTypes.Metadata; using Aaru.Decoders.SCSI; @@ -48,7 +47,7 @@ public sealed partial class DeviceReport { var report = new Ssc(); var sense = true; - byte[] buffer = Array.Empty(); + byte[] buffer = []; Spectre.ProgressSingleSpinner(ctx => { @@ -156,7 +155,7 @@ public sealed partial class DeviceReport { var seqTest = new TestedSequentialMedia(); var sense = true; - byte[] buffer = Array.Empty(); + byte[] buffer = []; Modes.DecodedMode? decMode = null; diff --git a/Aaru.Core/Devices/Report/Scsi.cs b/Aaru.Core/Devices/Report/Scsi.cs index 79004e5f3..ecaad2690 100644 --- a/Aaru.Core/Devices/Report/Scsi.cs +++ b/Aaru.Core/Devices/Report/Scsi.cs @@ -51,7 +51,7 @@ public sealed partial class DeviceReport public Scsi ReportScsiInquiry() { var sense = true; - byte[] buffer = Array.Empty(); + byte[] buffer = []; Spectre.ProgressSingleSpinner(ctx => { @@ -96,7 +96,7 @@ public sealed partial class DeviceReport public List ReportEvpdPages(string vendor) { var sense = false; - byte[] buffer = Array.Empty(); + byte[] buffer = []; Spectre.ProgressSingleSpinner(ctx => { @@ -110,7 +110,7 @@ public sealed partial class DeviceReport if(evpdPages is not { Length: > 0 }) return null; - List evpds = new(); + List evpds = []; Spectre.ProgressSingleSpinner(ctx => { @@ -487,7 +487,7 @@ public sealed partial class DeviceReport if(decMode.Value.Pages == null) return; - List modePages = new(); + List modePages = []; foreach(Modes.ModePage page in decMode.Value.Pages) { @@ -512,8 +512,8 @@ public sealed partial class DeviceReport { var mediaTest = new TestedMedia(); var sense = true; - byte[] buffer = Array.Empty(); - byte[] senseBuffer = Array.Empty(); + byte[] buffer = []; + byte[] senseBuffer = []; Spectre.ProgressSingleSpinner(ctx => { @@ -884,8 +884,8 @@ public sealed partial class DeviceReport public TestedMedia ReportScsi() { var sense = true; - byte[] buffer = Array.Empty(); - byte[] senseBuffer = Array.Empty(); + byte[] buffer = []; + byte[] senseBuffer = []; var capabilities = new TestedMedia { diff --git a/Aaru.Core/Devices/Report/SecureDigital.cs b/Aaru.Core/Devices/Report/SecureDigital.cs index 825e6c9a0..9f7241d30 100644 --- a/Aaru.Core/Devices/Report/SecureDigital.cs +++ b/Aaru.Core/Devices/Report/SecureDigital.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Metadata; using Aaru.Console; @@ -46,10 +45,10 @@ public sealed partial class DeviceReport { var report = new MmcSd(); var sense = true; - byte[] cid = Array.Empty(); - byte[] csd = Array.Empty(); - byte[] ecsd = Array.Empty(); - byte[] scr = Array.Empty(); + byte[] cid = []; + byte[] csd = []; + byte[] ecsd = []; + byte[] scr = []; Spectre.ProgressSingleSpinner(ctx => { diff --git a/Aaru.Core/Devices/Scanning/ATA.cs b/Aaru.Core/Devices/Scanning/ATA.cs index 5416884a4..92e92814a 100644 --- a/Aaru.Core/Devices/Scanning/ATA.cs +++ b/Aaru.Core/Devices/Scanning/ATA.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using Aaru.CommonTypes.Structs.Devices.ATA; using Aaru.Core.Logging; using Humanizer; @@ -105,7 +104,7 @@ public sealed partial class MediaScan double currentSpeed = 0; results.MaxSpeed = double.MinValue; results.MinSpeed = double.MaxValue; - results.UnreadableSectors = new List(); + results.UnreadableSectors = []; results.SeekMax = double.MinValue; results.SeekMin = double.MaxValue; results.SeekTotal = 0; diff --git a/Aaru.Core/Devices/Scanning/SCSI.cs b/Aaru.Core/Devices/Scanning/SCSI.cs index 47f3016a9..8f07c0cdc 100644 --- a/Aaru.Core/Devices/Scanning/SCSI.cs +++ b/Aaru.Core/Devices/Scanning/SCSI.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using System.Threading; using Aaru.CommonTypes.Structs.Devices.SCSI; using Aaru.Console; @@ -284,7 +283,7 @@ public sealed partial class MediaScan double currentSpeed = 0; results.MaxSpeed = double.MinValue; results.MinSpeed = double.MaxValue; - results.UnreadableSectors = new List(); + results.UnreadableSectors = []; if(compactDisc) { diff --git a/Aaru.Core/Devices/Scanning/SecureDigital.cs b/Aaru.Core/Devices/Scanning/SecureDigital.cs index d5cbecf49..c55f4f76b 100644 --- a/Aaru.Core/Devices/Scanning/SecureDigital.cs +++ b/Aaru.Core/Devices/Scanning/SecureDigital.cs @@ -33,7 +33,6 @@ // ReSharper disable JoinDeclarationAndInitializer using System; -using System.Collections.Generic; using Aaru.Core.Logging; using Aaru.Decoders.MMC; using Aaru.Decoders.SecureDigital; @@ -206,7 +205,7 @@ public sealed partial class MediaScan double currentSpeed = 0; results.MaxSpeed = double.MinValue; results.MinSpeed = double.MaxValue; - results.UnreadableSectors = new List(); + results.UnreadableSectors = []; results.SeekMax = double.MinValue; results.SeekMin = double.MaxValue; results.SeekTotal = 0; diff --git a/Aaru.Core/Entropy.cs b/Aaru.Core/Entropy.cs index ef3294749..4210427f9 100644 --- a/Aaru.Core/Entropy.cs +++ b/Aaru.Core/Entropy.cs @@ -80,7 +80,7 @@ public sealed class Entropy /// Calculated entropy public EntropyResults[] CalculateTracksEntropy(bool duplicatedSectors) { - List entropyResults = new(); + List entropyResults = []; if(_inputFormat is not IOpticalMediaImage opticalMediaImage) { @@ -111,7 +111,7 @@ public sealed class Entropy var entTable = new ulong[256]; ulong trackSize = 0; - List uniqueSectorsPerTrack = new(); + List uniqueSectorsPerTrack = []; trackEntropy.Sectors = currentTrack.EndSector - currentTrack.StartSector + 1; @@ -197,7 +197,7 @@ public sealed class Entropy var entTable = new ulong[256]; ulong diskSize = 0; - List uniqueSectors = new(); + List uniqueSectors = []; entropy.Sectors = mediaImage.Info.Sectors; AaruConsole.WriteLine(Localization.Core.Sectors_0, entropy.Sectors); diff --git a/Aaru.Core/Graphics/Spiral.cs b/Aaru.Core/Graphics/Spiral.cs index 60aad7276..3c09ccc2c 100644 --- a/Aaru.Core/Graphics/Spiral.cs +++ b/Aaru.Core/Graphics/Spiral.cs @@ -624,7 +624,7 @@ public sealed class Spiral : IMediaGraph static List GetSpiralPoints(SKPoint center, float minRadius, float maxRadius, float a) { // Initialize a list to store the points of the spiral. - List points = new(); + List points = []; const float dtheta = (float)(0.5f * Math.PI / 180); for(float theta = 0;; theta += dtheta) diff --git a/Aaru.Core/Logging/ErrorLog.cs b/Aaru.Core/Logging/ErrorLog.cs index 564e546f5..5ea7b7119 100644 --- a/Aaru.Core/Logging/ErrorLog.cs +++ b/Aaru.Core/Logging/ErrorLog.cs @@ -75,8 +75,8 @@ public sealed class ErrorLog } else { - List error = new(); - List status = new(); + List error = []; + List status = []; if((registers.Status & 0x01) == 0x01) status.Add("ERR"); @@ -141,8 +141,8 @@ public sealed class ErrorLog } else { - List error = new(); - List status = new(); + List error = []; + List status = []; if((registers.Status & 0x01) == 0x01) status.Add("ERR"); @@ -201,8 +201,8 @@ public sealed class ErrorLog } else { - List error = new(); - List status = new(); + List error = []; + List status = []; if((registers.Status & 0x01) == 0x01) status.Add("ERR"); @@ -259,8 +259,8 @@ public sealed class ErrorLog } else { - List error = new(); - List status = new(); + List error = []; + List status = []; if((registers.Status & 0x01) == 0x01) status.Add("ERR"); diff --git a/Aaru.Core/Media/CompactDisc.cs b/Aaru.Core/Media/CompactDisc.cs index 94585011c..8e10d81e7 100644 --- a/Aaru.Core/Media/CompactDisc.cs +++ b/Aaru.Core/Media/CompactDisc.cs @@ -132,9 +132,8 @@ public static class CompactDisc if(deSub[p] != 0 && deSub[p] != 255) pOk = false; for(var w = 0; w < 8; w++) - { - if((deSub[p] >> w & 1) > 0) pWeight++; - } + if((deSub[p] >> w & 1) > 0) + pWeight++; } // This seems to be a somewhat common pattern @@ -178,13 +177,11 @@ public static class CompactDisc if(!pOk && fixSubchannel) { if(pWeight >= 48) - { - for(int p = subPos; p < subPos + 12; p++) deSub[p] = 255; - } + for(int p = subPos; p < subPos + 12; p++) + deSub[p] = 255; else - { - for(int p = subPos; p < subPos + 12; p++) deSub[p] = 0; - } + for(int p = subPos; p < subPos + 12; p++) + deSub[p] = 0; pOk = true; @fixed = true; @@ -318,7 +315,7 @@ public static class CompactDisc out List newPregapSectors, ulong sectorAddress) { var status = false; - newPregapSectors = new List(); + newPregapSectors = []; // Check subchannel for(var subPos = 0; subPos < deSub.Length; subPos += 96) diff --git a/Aaru.Core/Media/Detection/MMC.cs b/Aaru.Core/Media/Detection/MMC.cs index 2c3b36bce..d92d2e2ed 100644 --- a/Aaru.Core/Media/Detection/MMC.cs +++ b/Aaru.Core/Media/Detection/MMC.cs @@ -66,30 +66,24 @@ public static class MMC const string MODULE_NAME = "Media detection"; static readonly byte[] _ps3Id = - { + [ 0x50, 0x6C, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x33, 0x00, 0x00, 0x00, 0x00 - }; + ]; static readonly byte[] _ps4Id = - { + [ 0x50, 0x6C, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x34, 0x00, 0x00, 0x00, 0x00 - }; + ]; static readonly byte[] _ps5Id = - { + [ 0x50, 0x6C, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x35, 0x00, 0x00, 0x00, 0x00 - }; + ]; - static readonly byte[] _operaId = - { - 0x01, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x01 - }; + static readonly byte[] _operaId = [0x01, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x01]; // Only present on bootable CDs, but those make more than 99% of all available - static readonly byte[] _fmTownsBootId = - { - 0x49, 0x50, 0x4C, 0x34, 0xEB, 0x55, 0x06 - }; + static readonly byte[] _fmTownsBootId = [0x49, 0x50, 0x4C, 0x34, 0xEB, 0x55, 0x06]; /// Present on first two seconds of second track, says "COPYRIGHT BANDAI" static readonly byte[] _playdiaCopyright = "COPYRIGHT BANDAI"u8.ToArray(); @@ -100,7 +94,7 @@ public static class MMC /// This is some kind of header. Every 10 bytes there's an audio byte. static readonly byte[] _videoNowColorFrameMarker = - { + [ 0x81, 0xE3, 0xE3, 0xC7, 0xC7, 0x81, 0x81, 0xE3, 0xC7, 0x00, 0x81, 0xE3, 0xE3, 0xC7, 0xC7, 0x81, 0x81, 0xE3, 0xC7, 0x00, 0x81, 0xE3, 0xE3, 0xC7, 0xC7, 0x81, 0x81, 0xE3, 0xC7, 0x00, 0x81, 0xE3, 0xE3, 0xC7, 0xC7, 0x81, 0x81, 0xE3, 0xC7, 0x00, 0x81, 0xE3, 0xE3, 0xC7, 0xC7, 0x81, 0x81, 0xE3, 0xC7, 0x00, 0x81, 0xE3, 0xE3, 0xC7, @@ -124,16 +118,13 @@ public static class MMC 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 - }; + ]; static bool IsData(byte[] sector) { if(sector?.Length != 2352) return false; - byte[] syncMark = - { - 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 - }; + byte[] syncMark = [0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00]; var testMark = new byte[12]; Array.Copy(sector, 0, testMark, 0, 12); @@ -147,10 +138,7 @@ public static class MMC if(sector?.Length != 2352) return false; - byte[] syncMark = - { - 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 - }; + byte[] syncMark = [0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00]; var testMark = new byte[12]; @@ -205,10 +193,7 @@ public static class MMC { if(sector16?.Length != 2352) return false; - byte[] cdiMark = - { - 0x01, 0x43, 0x44, 0x2D - }; + byte[] cdiMark = [0x01, 0x43, 0x44, 0x2D]; bool isData = IsData(sector0); @@ -2264,7 +2249,7 @@ public static class MMC if(isoSector.Length < 2048) return; - List rootEntries = new(); + List rootEntries = []; uint ngcdIplStart = 0; uint ngcdIplLength = 0; uint vcdStart = 0; diff --git a/Aaru.Core/Media/Info/CompactDisc.cs b/Aaru.Core/Media/Info/CompactDisc.cs index fa1c6f3f9..f1c495020 100644 --- a/Aaru.Core/Media/Info/CompactDisc.cs +++ b/Aaru.Core/Media/Info/CompactDisc.cs @@ -92,10 +92,7 @@ public static class CompactDisc if(dataTrack != null) { // Build sync - sectorSync = new byte[] - { - 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 - }; + sectorSync = [0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00]; tmpBuf = new byte[sectorSync.Length]; @@ -303,11 +300,11 @@ public static class CompactDisc second ^= 0x80; // Build sync - sectorSync = new byte[] - { + sectorSync = + [ 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, (byte)minute, (byte)second, (byte)frame - }; + ]; tmpBuf = new byte[sectorSync.Length]; diff --git a/Aaru.Core/Partitions.cs b/Aaru.Core/Partitions.cs index a4a64bb7f..38bf62896 100644 --- a/Aaru.Core/Partitions.cs +++ b/Aaru.Core/Partitions.cs @@ -50,9 +50,9 @@ public static class Partitions public static List GetAll(IMediaImage image) { PluginRegister plugins = PluginRegister.Singleton; - List foundPartitions = new(); - List childPartitions = new(); - List checkedLocations = new(); + List foundPartitions = []; + List childPartitions = []; + List checkedLocations = []; var tapeImage = image as ITapeImage; var partitionableImage = image as IPartitionableMediaImage; @@ -129,7 +129,7 @@ public static class Partitions continue; } - List children = new(); + List children = []; foreach(IPartition plugin in plugins.Partitions.Values) { @@ -221,7 +221,7 @@ public static class Partitions { if(partitions == null || partitions.Count == 0) return; - List schemes = new(); + List schemes = []; foreach(Partition part in partitions.Where(part => !schemes.Contains(part.Scheme))) schemes.Add(part.Scheme); diff --git a/Aaru.Core/Remote.cs b/Aaru.Core/Remote.cs index a83ee0b62..5330bbc76 100644 --- a/Aaru.Core/Remote.cs +++ b/Aaru.Core/Remote.cs @@ -140,7 +140,7 @@ public static class Remote if(!create) { - List latestAll = new(); + List latestAll = []; if(mctx.UsbVendors.Any()) latestAll.Add(mctx.UsbVendors.Max(v => v.ModifiedWhen)); @@ -284,7 +284,7 @@ public static class Remote ProgressTask task = ctx.AddTask(Localization.Core.Adding_known_iNES_NES_2_0_headers); task.MaxValue = sync.NesHeaders?.Count ?? 0; - foreach(NesHeaderDto header in sync.NesHeaders ?? new List()) + foreach(NesHeaderDto header in sync.NesHeaders ?? []) { task.Increment(1); @@ -491,7 +491,7 @@ public static class Remote ProgressTask task = ctx.AddTask(Localization.Core.Updating_known_iNES_NES_2_0_headers); task.MaxValue = sync.Offsets.Count; - sync.NesHeaders ??= new List(); + sync.NesHeaders ??= []; foreach(NesHeaderDto header in sync.NesHeaders) { diff --git a/Aaru.Core/Sidecar/AudioMedia.cs b/Aaru.Core/Sidecar/AudioMedia.cs index 31ac802a4..7667efd9e 100644 --- a/Aaru.Core/Sidecar/AudioMedia.cs +++ b/Aaru.Core/Sidecar/AudioMedia.cs @@ -58,9 +58,9 @@ public sealed partial class Sidecar List imgChecksums, ref Metadata sidecar, Encoding encoding) { - sidecar.AudioMedias = new List - { - new() + sidecar.AudioMedias = + [ + new AudioMedia { Checksums = imgChecksums, Image = new Image @@ -75,7 +75,7 @@ public sealed partial class Sidecar Title = image.Info.MediaTitle } } - }; + ]; if(image.Info.MediaSequence != 0 && image.Info.LastMediaSequence != 0) { diff --git a/Aaru.Core/Sidecar/BlockMedia.cs b/Aaru.Core/Sidecar/BlockMedia.cs index b3552861f..76a88b6ec 100644 --- a/Aaru.Core/Sidecar/BlockMedia.cs +++ b/Aaru.Core/Sidecar/BlockMedia.cs @@ -69,9 +69,9 @@ public sealed partial class Sidecar { if(_aborted) return; - sidecar.BlockMedias = new List - { - new() + sidecar.BlockMedias = + [ + new BlockMedia { Checksums = imgChecksums, Image = new Image @@ -86,7 +86,7 @@ public sealed partial class Sidecar Title = image.Info.MediaTitle } } - }; + ]; if(image.Info.MediaSequence != 0 && image.Info.LastMediaSequence != 0) { @@ -185,7 +185,9 @@ public sealed partial class Sidecar $"{vers.MajorVersion}.{vers.MinorVersion}"; sidecar.BlockMedias[0].Pcmcia.AdditionalInformation = - new List(vers.AdditionalInformation); + [ + ..vers.AdditionalInformation + ]; } break; @@ -453,7 +455,7 @@ public sealed partial class Sidecar if(image is ITapeImage { IsTape: true } tapeImage) { - List tapePartitions = new(); + List tapePartitions = []; foreach(CommonTypes.Structs.TapePartition tapePartition in tapeImage.TapePartitions) { @@ -549,7 +551,7 @@ public sealed partial class Sidecar EndProgress2(); } - List filesInPartition = new(); + List filesInPartition = []; foreach(CommonTypes.Structs.TapeFile tapeFile in tapeImage.Files.Where(f => f.Partition == tapePartition.Number)) @@ -675,7 +677,7 @@ public sealed partial class Sidecar List partitions = Partitions.GetAll(image); Partitions.AddSchemesToStats(partitions); - sidecar.BlockMedias[0].FileSystemInformation = new List(); + sidecar.BlockMedias[0].FileSystemInformation = []; if(partitions.Count > 0) { @@ -693,7 +695,7 @@ public sealed partial class Sidecar Type = partition.Type }; - List lstFs = new(); + List lstFs = []; foreach(IFilesystem fs in plugins.Filesystems.Values) { @@ -755,7 +757,7 @@ public sealed partial class Sidecar Size = image.Info.Sectors * image.Info.SectorSize }; - List lstFs = new(); + List lstFs = []; foreach(IFilesystem fs in plugins.Filesystems.Values) { @@ -992,7 +994,7 @@ public sealed partial class Sidecar { if(scpImage.Header.end + 1 >= image.Info.Cylinders) { - List scpBlockTrackTypes = new(); + List scpBlockTrackTypes = []; ulong currentSector = 0; Stream scpStream = scpFilter.GetDataForkStream(); @@ -1106,7 +1108,7 @@ public sealed partial class Sidecar { if(kfImage.Info.Cylinders >= image.Info.Cylinders) { - List kfBlockTrackTypes = new(); + List kfBlockTrackTypes = []; ulong currentSector = 0; @@ -1200,7 +1202,7 @@ public sealed partial class Sidecar { if(dfiImage.Info.Cylinders >= image.Info.Cylinders) { - List dfiBlockTrackTypes = new(); + List dfiBlockTrackTypes = []; ulong currentSector = 0; Stream dfiStream = dfiFilter.GetDataForkStream(); diff --git a/Aaru.Core/Sidecar/BlockTape.cs b/Aaru.Core/Sidecar/BlockTape.cs index 17e729a66..4a403ecb0 100644 --- a/Aaru.Core/Sidecar/BlockTape.cs +++ b/Aaru.Core/Sidecar/BlockTape.cs @@ -48,9 +48,9 @@ public sealed partial class Sidecar { _sidecar = new Metadata { - BlockMedias = new List - { - new() + BlockMedias = + [ + new BlockMedia { Image = new Image { @@ -65,9 +65,9 @@ public sealed partial class Sidecar }, PhysicalBlockSize = blockSize, LogicalBlockSize = blockSize, - TapeInformation = new List - { - new() + TapeInformation = + [ + new TapePartition { Image = new Image { @@ -75,9 +75,9 @@ public sealed partial class Sidecar Value = folderName } } - } + ] } - } + ] }; if(_aborted) return _sidecar; @@ -85,7 +85,7 @@ public sealed partial class Sidecar ulong currentBlock = 0; ulong totalSize = 0; var tapeWorker = new Checksum(); - List tapeFiles = new(); + List tapeFiles = []; UpdateStatus(Localization.Core.Hashing_files); diff --git a/Aaru.Core/Sidecar/Files.cs b/Aaru.Core/Sidecar/Files.cs index f4785c035..f3c5f3b6c 100644 --- a/Aaru.Core/Sidecar/Files.cs +++ b/Aaru.Core/Sidecar/Files.cs @@ -51,8 +51,8 @@ public sealed partial class Sidecar if(ret != ErrorNumber.NoError) return null; - List directories = new(); - List files = new(); + List directories = []; + List files = []; while(filesystem.ReadDir(node, out string dirent) == ErrorNumber.NoError && dirent is not null) { @@ -107,8 +107,8 @@ public sealed partial class Sidecar if(ret != ErrorNumber.NoError) return null; - List directories = new(); - List files = new(); + List directories = []; + List files = []; while(filesystem.ReadDir(node, out string dirent) == ErrorNumber.NoError && dirent is not null) { @@ -208,7 +208,7 @@ public sealed partial class Sidecar if(ret != ErrorNumber.NoError) return file; - List xattrTypes = new(); + List xattrTypes = []; foreach(string xattr in xattrs) { diff --git a/Aaru.Core/Sidecar/LinearMedia.cs b/Aaru.Core/Sidecar/LinearMedia.cs index a9b149798..aa7e45870 100644 --- a/Aaru.Core/Sidecar/LinearMedia.cs +++ b/Aaru.Core/Sidecar/LinearMedia.cs @@ -54,20 +54,20 @@ public sealed partial class Sidecar /// List of image checksums /// Metadata sidecar /// Encoding to be used for filesystem plugins - static void LinearMedia(IByteAddressableImage image, Guid filterId, string imagePath, FileInfo fi, - PluginRegister plugins, List imgChecksums, - ref Metadata sidecar, Encoding encoding) => sidecar.LinearMedias = new List - { - new() - { - Checksums = imgChecksums, - Image = new Image - { - Format = image.Format, - Offset = 0, - Value = Path.GetFileName(imagePath) - }, - Size = image.Info.Sectors - } - }; + static void LinearMedia(IByteAddressableImage image, Guid filterId, string imagePath, FileInfo fi, + PluginRegister plugins, List imgChecksums, + ref Metadata sidecar, Encoding encoding) => sidecar.LinearMedias = + [ + new LinearMedia + { + Checksums = imgChecksums, + Image = new Image + { + Format = image.Format, + Offset = 0, + Value = Path.GetFileName(imagePath) + }, + Size = image.Info.Sectors + } + ]; } \ No newline at end of file diff --git a/Aaru.Core/Sidecar/OpticalDisc.cs b/Aaru.Core/Sidecar/OpticalDisc.cs index 3cdea1cb7..3df433ac6 100644 --- a/Aaru.Core/Sidecar/OpticalDisc.cs +++ b/Aaru.Core/Sidecar/OpticalDisc.cs @@ -66,9 +66,9 @@ public sealed partial class Sidecar { if(_aborted) return; - sidecar.OpticalDiscs = new List - { - new() + sidecar.OpticalDiscs = + [ + new OpticalDisc { Checksums = imgChecksums, Image = new Image @@ -83,7 +83,7 @@ public sealed partial class Sidecar Title = image.Info.MediaTitle } } - }; + ]; if(image.Info.MediaSequence != 0 && image.Info.LastMediaSequence != 0) { @@ -234,7 +234,7 @@ public sealed partial class Sidecar { sidecar.OpticalDiscs[0].Tracks = new uint[1]; sidecar.OpticalDiscs[0].Tracks[0] = (uint)tracks.Count; - trksLst = new List(); + trksLst = []; } if(sidecar.OpticalDiscs[0].Dimensions == null && image.Info.MediaType != MediaType.Unknown) @@ -512,7 +512,7 @@ public sealed partial class Sidecar var trkPartitions = partitions.Where(p => p.Start >= trk.StartSector && p.End <= trk.EndSector).ToList(); - xmlTrk.FileSystemInformation = new List(); + xmlTrk.FileSystemInformation = []; if(trkPartitions.Count > 0) { @@ -528,7 +528,7 @@ public sealed partial class Sidecar Type = partition.Type }; - List lstFs = new(); + List lstFs = []; foreach(IFilesystem fs in plugins.Filesystems.Values) { @@ -579,7 +579,7 @@ public sealed partial class Sidecar StartSector = xmlTrk.StartSector }; - List lstFs = new(); + List lstFs = []; var xmlPart = new Partition { @@ -691,18 +691,18 @@ public sealed partial class Sidecar !string.IsNullOrEmpty(image.Info.DriveFirmwareRevision) || !string.IsNullOrEmpty(image.Info.DriveSerialNumber)) { - sidecar.OpticalDiscs[0].DumpHardware = new List - { - new() + sidecar.OpticalDiscs[0].DumpHardware = + [ + new DumpHardware { - Extents = new List - { - new() + Extents = + [ + new Extent { Start = 0, End = image.Info.Sectors } - }, + ], Manufacturer = image.Info.DriveManufacturer, Model = image.Info.DriveModel, Firmware = image.Info.DriveFirmwareRevision, @@ -713,7 +713,7 @@ public sealed partial class Sidecar Version = image.Info.ApplicationVersion } } - }; + ]; } } } \ No newline at end of file diff --git a/Aaru.Core/Sidecar/Sidecar.cs b/Aaru.Core/Sidecar/Sidecar.cs index 7a0ab3d3f..59795082e 100644 --- a/Aaru.Core/Sidecar/Sidecar.cs +++ b/Aaru.Core/Sidecar/Sidecar.cs @@ -66,7 +66,7 @@ public sealed partial class Sidecar _aborted = false; var emptyChkWorker = new Checksum(); - emptyChkWorker.Update(Array.Empty()); + emptyChkWorker.Update([]); _emptyChecksums = emptyChkWorker.End(); } diff --git a/Aaru.Core/Statistics.cs b/Aaru.Core/Statistics.cs index da06a091e..5027ef225 100644 --- a/Aaru.Core/Statistics.cs +++ b/Aaru.Core/Statistics.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; @@ -141,7 +140,7 @@ public static class Statistics if(ctx.Commands.Any(c => !c.Synchronized)) { - dto.Commands = new List(); + dto.Commands = []; foreach(string nvs in ctx.Commands.Where(c => !c.Synchronized).Select(c => c.Name).Distinct()) { @@ -155,7 +154,7 @@ public static class Statistics if(ctx.Filesystems.Any(c => !c.Synchronized)) { - dto.Filesystems = new List(); + dto.Filesystems = []; foreach(string nvs in ctx.Filesystems.Where(c => !c.Synchronized) .Select(c => c.Name) @@ -171,7 +170,7 @@ public static class Statistics if(ctx.Filters.Any(c => !c.Synchronized)) { - dto.Filters = new List(); + dto.Filters = []; foreach(string nvs in ctx.Filters.Where(c => !c.Synchronized).Select(c => c.Name).Distinct()) { @@ -185,7 +184,7 @@ public static class Statistics if(ctx.MediaFormats.Any(c => !c.Synchronized)) { - dto.MediaFormats = new List(); + dto.MediaFormats = []; foreach(string nvs in ctx.MediaFormats.Where(c => !c.Synchronized) .Select(c => c.Name) @@ -201,7 +200,7 @@ public static class Statistics if(ctx.Partitions.Any(c => !c.Synchronized)) { - dto.Partitions = new List(); + dto.Partitions = []; foreach(string nvs in ctx.Partitions.Where(c => !c.Synchronized).Select(c => c.Name).Distinct()) { @@ -215,7 +214,7 @@ public static class Statistics if(ctx.Versions.Any(c => !c.Synchronized)) { - dto.Versions = new List(); + dto.Versions = []; foreach(string nvs in ctx.Versions.Where(c => !c.Synchronized).Select(c => c.Name).Distinct()) { @@ -229,7 +228,7 @@ public static class Statistics if(ctx.Medias.Any(c => !c.Synchronized)) { - dto.Medias = new List(); + dto.Medias = []; foreach(string media in ctx.Medias.Where(c => !c.Synchronized).Select(c => c.Type).Distinct()) { @@ -257,7 +256,7 @@ public static class Statistics if(ctx.SeenDevices.Any(c => !c.Synchronized)) { - dto.Devices = new List(); + dto.Devices = []; foreach(DeviceStat device in ctx.SeenDevices.Where(c => !c.Synchronized)) { @@ -274,7 +273,7 @@ public static class Statistics if(ctx.OperatingSystems.Any(c => !c.Synchronized)) { - dto.OperatingSystems = new List(); + dto.OperatingSystems = []; foreach(string osName in ctx.OperatingSystems.Where(c => !c.Synchronized) .Select(c => c.Name) @@ -299,7 +298,7 @@ public static class Statistics if(ctx.RemoteApplications.Any(c => !c.Synchronized)) { - dto.RemoteApplications = new List(); + dto.RemoteApplications = []; foreach(string remoteAppName in ctx.RemoteApplications.Where(c => !c.Synchronized) .Select(c => c.Name) @@ -325,7 +324,7 @@ public static class Statistics if(ctx.RemoteArchitectures.Any(c => !c.Synchronized)) { - dto.RemoteArchitectures = new List(); + dto.RemoteArchitectures = []; foreach(string nvs in ctx.RemoteArchitectures.Where(c => !c.Synchronized) .Select(c => c.Name) @@ -341,7 +340,7 @@ public static class Statistics if(ctx.RemoteOperatingSystems.Any(c => !c.Synchronized)) { - dto.RemoteOperatingSystems = new List(); + dto.RemoteOperatingSystems = []; foreach(string remoteOsName in ctx.RemoteOperatingSystems.Where(c => !c.Synchronized) .Select(c => c.Name) diff --git a/Aaru.Decoders/Bluray/DI.cs b/Aaru.Decoders/Bluray/DI.cs index a6b8daa43..6b6321856 100644 --- a/Aaru.Decoders/Bluray/DI.cs +++ b/Aaru.Decoders/Bluray/DI.cs @@ -134,7 +134,7 @@ public static class DI }; var offset = 4; - List units = new(); + List units = []; while(true) { diff --git a/Aaru.Decoders/CD/FullTOC.cs b/Aaru.Decoders/CD/FullTOC.cs index c415e62d6..375861a97 100644 --- a/Aaru.Decoders/CD/FullTOC.cs +++ b/Aaru.Decoders/CD/FullTOC.cs @@ -667,7 +667,7 @@ public static class FullTOC Dictionary sessionEndingTrack = new(); toc.FirstCompleteSession = byte.MaxValue; toc.LastCompleteSession = byte.MinValue; - List trackDescriptors = new(); + List trackDescriptors = []; byte currentTrack = 0; foreach(Track track in tracks.OrderBy(t => t.Session).ThenBy(t => t.Sequence)) diff --git a/Aaru.Decoders/CD/PMA.cs b/Aaru.Decoders/CD/PMA.cs index c93c9b149..c7774e4e3 100644 --- a/Aaru.Decoders/CD/PMA.cs +++ b/Aaru.Decoders/CD/PMA.cs @@ -324,7 +324,7 @@ public static class PMA break; case 3: - tracks = new List(); + tracks = []; if(descriptor.Min > 0) tracks.Add($"{descriptor.Min}"); @@ -344,7 +344,7 @@ public static class PMA break; case 4: - tracks = new List(); + tracks = []; if(descriptor.Min > 0) tracks.Add($"{descriptor.Min}"); diff --git a/Aaru.Decoders/CD/Sector.cs b/Aaru.Decoders/CD/Sector.cs index b91a0ca0b..897d0599f 100644 --- a/Aaru.Decoders/CD/Sector.cs +++ b/Aaru.Decoders/CD/Sector.cs @@ -46,7 +46,7 @@ namespace Aaru.Decoders.CD; public static class Sector { public static readonly byte[] ScrambleTable = - { + [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00, 0x28, 0x00, 0x1E, 0x80, 0x08, 0x60, 0x06, 0xA8, 0x02, 0xFE, 0x81, 0x80, 0x60, 0x60, 0x28, 0x28, 0x1E, 0x9E, 0x88, 0x68, 0x66, 0xAE, 0xAA, 0xFC, 0x7F, 0x01, 0xE0, 0x00, 0x48, 0x00, 0x36, 0x80, 0x16, 0xE0, 0x0E, 0xC8, 0x04, @@ -178,12 +178,9 @@ public static class Sector 0x22, 0x85, 0xD9, 0xA3, 0x1A, 0xF9, 0xCB, 0x02, 0xD7, 0x41, 0x9E, 0xB0, 0x68, 0x74, 0x2E, 0xA7, 0x5C, 0x7A, 0xB9, 0xE3, 0x32, 0xC9, 0xD5, 0x96, 0xDF, 0x2E, 0xD8, 0x1C, 0x5A, 0x89, 0xFB, 0x26, 0xC3, 0x5A, 0xD1, 0xFB, 0x1C, 0x43, 0x49, 0xF1, 0xF6, 0xC4, 0x46, 0xD3, 0x72, 0xDD, 0xE5, 0x99 - }; + ]; - public static readonly byte[] SyncMark = - { - 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 - }; + public static readonly byte[] SyncMark = [0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00]; public static byte[] Scramble(byte[] sector) { diff --git a/Aaru.Decoders/CD/Subchannel.cs b/Aaru.Decoders/CD/Subchannel.cs index e21d13154..1db2f77a8 100644 --- a/Aaru.Decoders/CD/Subchannel.cs +++ b/Aaru.Decoders/CD/Subchannel.cs @@ -34,7 +34,7 @@ namespace Aaru.Decoders.CD; public static class Subchannel { static readonly string[] _isrcTable = - { + [ // 0x00 "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "", "", "", "", "", "", @@ -46,7 +46,7 @@ public static class Subchannel // 0x30 "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - }; + ]; public static void BinaryToBcdQ(byte[] q) { diff --git a/Aaru.Decoders/DVD/Sector.cs b/Aaru.Decoders/DVD/Sector.cs index d4ca75051..6133158e8 100644 --- a/Aaru.Decoders/DVD/Sector.cs +++ b/Aaru.Decoders/DVD/Sector.cs @@ -44,13 +44,13 @@ namespace Aaru.Decoders.DVD; public sealed class Sector { static readonly ushort[] _ecma267InitialValues = - { - 0x0001, 0x5500, 0x0002, 0x2A00, 0x0004, 0x5400, 0x0008, 0x2800, 0x0010, 0x5000, 0x0020, 0x2001, 0x0040, 0x4002, - 0x0080, 0x0005 - }; + [ + 0x0001, 0x5500, 0x0002, 0x2A00, 0x0004, 0x5400, 0x0008, 0x2800, 0x0010, 0x5000, 0x0020, 0x2001, 0x0040, + 0x4002, 0x0080, 0x0005 + ]; static readonly uint[] _edcTable = - { + [ 0x00000000, 0x80000011, 0x80000033, 0x00000022, 0x80000077, 0x00000066, 0x00000044, 0x80000055, 0x800000FF, 0x000000EE, 0x000000CC, 0x800000DD, 0x00000088, 0x80000099, 0x800000BB, 0x000000AA, 0x800001EF, 0x000001FE, 0x000001DC, 0x800001CD, 0x00000198, 0x80000189, 0x800001AB, 0x000001BA, 0x00000110, 0x80000101, 0x80000123, @@ -80,7 +80,7 @@ public sealed class Sector 0x80000B83, 0x00000B92, 0x80000BC7, 0x00000BD6, 0x00000BF4, 0x80000BE5, 0x00000AA0, 0x80000AB1, 0x80000A93, 0x00000A82, 0x80000AD7, 0x00000AC6, 0x00000AE4, 0x80000AF5, 0x80000A5F, 0x00000A4E, 0x00000A6C, 0x80000A7D, 0x00000A28, 0x80000A39, 0x80000A1B, 0x00000A0A - }; + ]; readonly Dictionary _seeds = new(); diff --git a/Aaru.Decoders/Floppy/Apple2.cs b/Aaru.Decoders/Floppy/Apple2.cs index 04d8d6417..15286021e 100644 --- a/Aaru.Decoders/Floppy/Apple2.cs +++ b/Aaru.Decoders/Floppy/Apple2.cs @@ -51,7 +51,7 @@ public static class Apple2 { const string MODULE_NAME = "Apple ][ GCR Decoder"; static readonly byte[] ReadTable5and3 = - { + [ // 00h 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, @@ -99,10 +99,10 @@ public static class Apple2 // F0h 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x18, 0x19, 0x1A, 0xFF, 0xFF, 0x1B, 0x1C, 0xFF, 0x1D, 0x1E, 0x1F - }; + ]; static readonly byte[] ReadTable6and2 = - { + [ // 00h 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, @@ -150,7 +150,7 @@ public static class Apple2 // F0h 0xFF, 0xFF, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0xFF, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F - }; + ]; /// Decodes the 5and3 encoded data /// 5and3 encoded data. @@ -274,30 +274,12 @@ public static class Apple2 { addressField = new RawAddressField { - prologue = new[] - { - data[position], data[position + 1], data[position + 2] - }, - volume = new[] - { - data[position + 3], data[position + 4] - }, - track = new[] - { - data[position + 5], data[position + 6] - }, - sector = new[] - { - data[position + 7], data[position + 8] - }, - checksum = new[] - { - data[position + 9], data[position + 10] - }, - epilogue = new[] - { - data[position + 11], data[position + 12], data[position + 13] - } + prologue = [data[position], data[position + 1], data[position + 2]], + volume = [data[position + 3], data[position + 4]], + track = [data[position + 5], data[position + 6]], + sector = [data[position + 7], data[position + 8]], + checksum = [data[position + 9], data[position + 10]], + epilogue = [data[position + 11], data[position + 12], data[position + 13]] } }; @@ -476,7 +458,7 @@ public static class Apple2 var onSync = false; var gaps = new MemoryStream(); var count = 0; - List sectors = new(); + List sectors = []; var trackNumber = new byte[2]; endOffset = offset; @@ -556,7 +538,7 @@ public static class Apple2 public static List MarshalDisk(byte[] data, out int endOffset, int offset = 0) { endOffset = offset; - List tracks = new(); + List tracks = []; int position = offset; RawTrack track = MarshalTrack(data, out position, position); diff --git a/Aaru.Decoders/Floppy/AppleSony.cs b/Aaru.Decoders/Floppy/AppleSony.cs index c98867347..10e9eea16 100644 --- a/Aaru.Decoders/Floppy/AppleSony.cs +++ b/Aaru.Decoders/Floppy/AppleSony.cs @@ -159,19 +159,13 @@ public static class AppleSony { addressField = new RawAddressField { - prologue = new[] - { - data[position], data[position + 1], data[position + 2] - }, + prologue = [data[position], data[position + 1], data[position + 2]], track = data[position + 3], sector = data[position + 4], side = data[position + 5], format = (AppleEncodedFormat)data[position + 6], checksum = data[position + 7], - epilogue = new[] - { - data[position + 8], data[position + 9] - } + epilogue = [data[position + 8], data[position + 9]] } }; @@ -198,11 +192,8 @@ public static class AppleSony sector.dataField = new RawDataField { - prologue = new[] - { - data[position], data[position + 1], data[position + 2] - }, - spare = data[position + 3] + prologue = [data[position], data[position + 1], data[position + 2]], + spare = data[position + 3] }; position += 4; @@ -316,7 +307,7 @@ public static class AppleSony var onSync = false; var gaps = new MemoryStream(); var count = 0; - List sectors = new(); + List sectors = []; byte trackNumber = 0; byte sideNumber = 0; endOffset = offset; @@ -387,7 +378,7 @@ public static class AppleSony public static List MarshalDisk(byte[] data, out int endOffset, int offset = 0) { endOffset = offset; - List tracks = new(); + List tracks = []; int position = offset; RawTrack track = MarshalTrack(data, out position, position); diff --git a/Aaru.Decoders/PCMCIA/CIS.cs b/Aaru.Decoders/PCMCIA/CIS.cs index c66a367d8..a9878e115 100644 --- a/Aaru.Decoders/PCMCIA/CIS.cs +++ b/Aaru.Decoders/PCMCIA/CIS.cs @@ -48,7 +48,7 @@ public static class CIS // TODO: Handle links? Or are they removed in lower layers of the operating system drivers? public static Tuple[] GetTuples(byte[] data) { - List tuples = new(); + List tuples = []; var position = 0; while(position < data.Length) @@ -90,7 +90,7 @@ public static class CIS if((data?.Length - 2) % 6 != 0) return null; var tuple = new DeviceGeometryTuple(); - List geometries = new(); + List geometries = []; for(var position = 2; position < data.Length; position += 6) { @@ -211,7 +211,7 @@ public static class CIS if(data.Length < 4) return null; - List buffer = new(); + List buffer = []; List strings = null; var firstString = false; const bool secondString = false; @@ -235,7 +235,7 @@ public static class CIS if(!firstString) { tuple.Manufacturer = StringHandlers.CToString(buffer.ToArray()); - buffer = new List(); + buffer = []; firstString = true; continue; @@ -245,16 +245,16 @@ public static class CIS if(!secondString) { tuple.Product = StringHandlers.CToString(buffer.ToArray()); - buffer = new List(); + buffer = []; firstString = true; continue; } - if(strings == null) strings = new List(); + if(strings == null) strings = []; strings.Add(StringHandlers.CToString(buffer.ToArray())); - buffer = new List(); + buffer = []; } if(strings != null) tuple.AdditionalInformation = strings.ToArray(); diff --git a/Aaru.Decoders/SCSI/DiscStructureCapabilities.cs b/Aaru.Decoders/SCSI/DiscStructureCapabilities.cs index 44f29bf74..f4e3dcd98 100644 --- a/Aaru.Decoders/SCSI/DiscStructureCapabilities.cs +++ b/Aaru.Decoders/SCSI/DiscStructureCapabilities.cs @@ -49,7 +49,7 @@ public static class DiscStructureCapabilities if(len + 2 != response.Length) return null; - List caps = new(); + List caps = []; uint offset = 4; diff --git a/Aaru.Decoders/SCSI/EVPD.cs b/Aaru.Decoders/SCSI/EVPD.cs index 938388847..231467d47 100644 --- a/Aaru.Decoders/SCSI/EVPD.cs +++ b/Aaru.Decoders/SCSI/EVPD.cs @@ -98,9 +98,8 @@ public static class EVPD Array.Copy(page, 4, ascii, 0, page.Length - 4); for(var i = 0; i < ascii.Length - 1; i++) - { - if(ascii[i] < 0x20) return null; - } + if(ascii[i] < 0x20) + return null; return StringHandlers.CToString(ascii); } @@ -229,7 +228,7 @@ public static class EVPD }; var position = 6; - List definitions = new(); + List definitions = []; while(position < pageResponse.Length) { @@ -385,7 +384,7 @@ public static class EVPD }; var position = 4; - List descriptors = new(); + List descriptors = []; while(position < pageResponse.Length) { @@ -836,7 +835,7 @@ public static class EVPD }; var position = 4; - List identifiers = new(); + List identifiers = []; while(position < pageResponse.Length) { @@ -944,7 +943,7 @@ public static class EVPD }; var position = 4; - List descriptors = new(); + List descriptors = []; while(position < pageResponse.Length) { @@ -2171,7 +2170,7 @@ public static class EVPD if(pageResponse[4] != pageResponse[3] - 1) return null; - List array = new(); + List array = []; const string fwRegExStr = @"Firmware Rev\s+=\s+(?\d+\.\d+)\s+Build date\s+=\s+(?(\w|\d|\s*.)*)\s*$"; @@ -2206,7 +2205,7 @@ public static class EVPD decoded.Version = Encoding.ASCII.GetBytes(servoMatch.Groups["version"].Value); } - array = new List(); + array = []; } else array.Add(pageResponse[pos]); diff --git a/Aaru.Decoders/SCSI/MMC/Features.cs b/Aaru.Decoders/SCSI/MMC/Features.cs index abbeadba4..70fd4be09 100644 --- a/Aaru.Decoders/SCSI/MMC/Features.cs +++ b/Aaru.Decoders/SCSI/MMC/Features.cs @@ -1205,7 +1205,7 @@ public static class Features decoded.Version = (byte)((feature[2] & 0x3C) >> 2); var offset = 4; - List listProfiles = new(); + List listProfiles = []; while(offset < feature.Length) { @@ -4394,7 +4394,7 @@ public static class Features }; uint offset = 8; - List descLst = new(); + List descLst = []; while(offset + 4 < response.Length) { diff --git a/Aaru.Decoders/SCSI/Modes/Mode10.cs b/Aaru.Decoders/SCSI/Modes/Mode10.cs index 5dddfa56a..21b4bc7ee 100644 --- a/Aaru.Decoders/SCSI/Modes/Mode10.cs +++ b/Aaru.Decoders/SCSI/Modes/Mode10.cs @@ -178,7 +178,7 @@ public static partial class Modes if(length != modeResponse.Length) return decoded; - List listpages = new(); + List listpages = []; while(offset < modeResponse.Length) { diff --git a/Aaru.Decoders/SCSI/Modes/Mode6.cs b/Aaru.Decoders/SCSI/Modes/Mode6.cs index 9bda6efb1..09824ca76 100644 --- a/Aaru.Decoders/SCSI/Modes/Mode6.cs +++ b/Aaru.Decoders/SCSI/Modes/Mode6.cs @@ -124,7 +124,7 @@ public static partial class Modes if(length != modeResponse.Length) return decoded; - List listpages = new(); + List listpages = []; while(offset < modeResponse.Length) { diff --git a/Aaru.Decoders/SCSI/SSC/DensitySupport.cs b/Aaru.Decoders/SCSI/SSC/DensitySupport.cs index 9aeac8ae4..f59439d8d 100644 --- a/Aaru.Decoders/SCSI/SSC/DensitySupport.cs +++ b/Aaru.Decoders/SCSI/SSC/DensitySupport.cs @@ -52,7 +52,7 @@ public static class DensitySupport if(response.Length != responseLen) return null; - List descriptors = new(); + List descriptors = []; var offset = 4; while(offset < response.Length) @@ -152,7 +152,7 @@ public static class DensitySupport if(response.Length != responseLen) return null; - List descriptors = new(); + List descriptors = []; var offset = 4; while(offset < response.Length) diff --git a/Aaru.Decryption/DVD/CSS.cs b/Aaru.Decryption/DVD/CSS.cs index d3334821e..6c16ab63d 100644 --- a/Aaru.Decryption/DVD/CSS.cs +++ b/Aaru.Decryption/DVD/CSS.cs @@ -154,7 +154,7 @@ public class CSS }; static readonly byte[] _cssTable1 = - { + [ 0x33, 0x73, 0x3b, 0x26, 0x63, 0x23, 0x6b, 0x76, 0x3e, 0x7e, 0x36, 0x2b, 0x6e, 0x2e, 0x66, 0x7b, 0xd3, 0x93, 0xdb, 0x06, 0x43, 0x03, 0x4b, 0x96, 0xde, 0x9e, 0xd6, 0x0b, 0x4e, 0x0e, 0x46, 0x9b, 0x57, 0x17, 0x5f, 0x82, 0xc7, 0x87, 0xcf, 0x12, 0x5a, 0x1a, 0x52, 0x8f, 0xca, 0x8a, 0xc2, 0x1f, 0xd9, 0x99, 0xd1, 0x00, 0x49, 0x09, @@ -170,10 +170,10 @@ public class CSS 0xbc, 0xfc, 0xb4, 0xa5, 0xec, 0xac, 0xe4, 0xf5, 0x39, 0x79, 0x31, 0x20, 0x69, 0x29, 0x61, 0x70, 0x38, 0x78, 0x30, 0x21, 0x68, 0x28, 0x60, 0x71, 0xb7, 0xf7, 0xbf, 0xa2, 0xe7, 0xa7, 0xef, 0xf2, 0xba, 0xfa, 0xb2, 0xaf, 0xea, 0xaa, 0xe2, 0xff - }; + ]; static readonly byte[] _cssTable2 = - { + [ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, 0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23, 0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a, 0x36, 0x37, 0x34, 0x35, 0x32, 0x33, @@ -189,10 +189,10 @@ public class CSS 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf6, 0xf7, 0xf4, 0xf5, 0xf2, 0xf3, 0xf0, 0xf1, 0xed, 0xec, 0xef, 0xee, 0xe9, 0xe8, 0xeb, 0xea, 0xe4, 0xe5, 0xe6, 0xe7, 0xe0, 0xe1, 0xe2, 0xe3 - }; + ]; static readonly byte[] _cssTable3 = - { + [ 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, @@ -222,10 +222,10 @@ public class CSS 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff - }; + ]; static readonly byte[] _cssTable4 = - { + [ 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, @@ -241,10 +241,10 @@ public class CSS 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff - }; + ]; static readonly byte[] _cssTable5 = - { + [ 0xff, 0x7f, 0xbf, 0x3f, 0xdf, 0x5f, 0x9f, 0x1f, 0xef, 0x6f, 0xaf, 0x2f, 0xcf, 0x4f, 0x8f, 0x0f, 0xf7, 0x77, 0xb7, 0x37, 0xd7, 0x57, 0x97, 0x17, 0xe7, 0x67, 0xa7, 0x27, 0xc7, 0x47, 0x87, 0x07, 0xfb, 0x7b, 0xbb, 0x3b, 0xdb, 0x5b, 0x9b, 0x1b, 0xeb, 0x6b, 0xab, 0x2b, 0xcb, 0x4b, 0x8b, 0x0b, 0xf3, 0x73, 0xb3, 0x33, 0xd3, 0x53, @@ -260,10 +260,10 @@ public class CSS 0xe4, 0x64, 0xa4, 0x24, 0xc4, 0x44, 0x84, 0x04, 0xf8, 0x78, 0xb8, 0x38, 0xd8, 0x58, 0x98, 0x18, 0xe8, 0x68, 0xa8, 0x28, 0xc8, 0x48, 0x88, 0x08, 0xf0, 0x70, 0xb0, 0x30, 0xd0, 0x50, 0x90, 0x10, 0xe0, 0x60, 0xa0, 0x20, 0xc0, 0x40, 0x80, 0x00 - }; + ]; static readonly byte[] _encryptTable0 = - { + [ 0xB7, 0xF4, 0x82, 0x57, 0xDA, 0x4D, 0xDB, 0xE2, 0x2F, 0x52, 0x1A, 0xA8, 0x68, 0x5A, 0x8A, 0xFF, 0xFB, 0x0E, 0x6D, 0x35, 0xF7, 0x5C, 0x76, 0x12, 0xCE, 0x25, 0x79, 0x29, 0x39, 0x62, 0x08, 0x24, 0xA5, 0x85, 0x7B, 0x56, 0x01, 0x23, 0x68, 0xCF, 0x0A, 0xE2, 0x5A, 0xED, 0x3D, 0x59, 0xB0, 0xA9, 0xB0, 0x2C, 0xF2, 0xB8, 0xEF, 0x32, @@ -279,10 +279,10 @@ public class CSS 0x79, 0x1B, 0x48, 0xF2, 0xE9, 0x93, 0x1F, 0xFC, 0xDB, 0x2A, 0x90, 0xA9, 0x8A, 0x3D, 0x39, 0x18, 0xA3, 0x8E, 0x58, 0x6C, 0xE0, 0x12, 0xBB, 0x25, 0xCD, 0x71, 0x22, 0xA2, 0x64, 0xC6, 0xE7, 0xFB, 0xAD, 0x94, 0x77, 0x04, 0x9A, 0x39, 0xCF, 0x7C - }; + ]; static readonly byte[] _encryptTable1 = - { + [ 0x8C, 0x47, 0xB0, 0xE1, 0xEB, 0xFC, 0xEB, 0x56, 0x10, 0xE5, 0x2C, 0x1A, 0x5D, 0xEF, 0xBE, 0x4F, 0x08, 0x75, 0x97, 0x4B, 0x0E, 0x25, 0x8E, 0x6E, 0x39, 0x5A, 0x87, 0x53, 0xC4, 0x1F, 0xF4, 0x5C, 0x4E, 0xE6, 0x99, 0x30, 0xE0, 0x42, 0x88, 0xAB, 0xE5, 0x85, 0xBC, 0x8F, 0xD8, 0x3C, 0x54, 0xC9, 0x53, 0x47, 0x18, 0xD6, 0x06, 0x5B, @@ -298,10 +298,10 @@ public class CSS 0x6E, 0x84, 0x56, 0x68, 0xF4, 0x0E, 0x03, 0x64, 0xD0, 0xA9, 0x92, 0x2F, 0x8B, 0xBC, 0x39, 0x9C, 0xAC, 0x09, 0x5E, 0xEE, 0xE5, 0x97, 0xBF, 0xA5, 0xCE, 0xFA, 0x28, 0x2C, 0x6D, 0x4F, 0xEF, 0x77, 0xAA, 0x1B, 0x79, 0x8E, 0x97, 0xB4, 0xC3, 0xF4 - }; + ]; static readonly byte[] _encryptTable2 = - { + [ 0xB7, 0x75, 0x81, 0xD5, 0xDC, 0xCA, 0xDE, 0x66, 0x23, 0xDF, 0x15, 0x26, 0x62, 0xD1, 0x83, 0x77, 0xE3, 0x97, 0x76, 0xAF, 0xE9, 0xC3, 0x6B, 0x8E, 0xDA, 0xB0, 0x6E, 0xBF, 0x2B, 0xF1, 0x19, 0xB4, 0x95, 0x34, 0x48, 0xE4, 0x37, 0x94, 0x5D, 0x7B, 0x36, 0x5F, 0x65, 0x53, 0x07, 0xE2, 0x89, 0x11, 0x98, 0x85, 0xD9, 0x12, 0xC1, 0x9D, @@ -317,10 +317,10 @@ public class CSS 0xCD, 0x2E, 0xFF, 0xC4, 0x5B, 0xA0, 0xAE, 0xCC, 0x4B, 0x3B, 0x03, 0xBB, 0x1C, 0x2A, 0xAC, 0x0C, 0x3F, 0x93, 0xC7, 0x72, 0x7A, 0x09, 0x22, 0x3D, 0x45, 0x78, 0xA9, 0xA8, 0xEA, 0xC9, 0x6A, 0xF7, 0x29, 0x91, 0xF0, 0x02, 0x18, 0x3A, 0x4E, 0x7C - }; + ]; static readonly byte[] _encryptTable3 = - { + [ 0x73, 0x51, 0x95, 0xE1, 0x12, 0xE4, 0xC0, 0x58, 0xEE, 0xF2, 0x08, 0x1B, 0xA9, 0xFA, 0x98, 0x4C, 0xA7, 0x33, 0xE2, 0x1B, 0xA7, 0x6D, 0xF5, 0x30, 0x97, 0x1D, 0xF3, 0x02, 0x60, 0x5A, 0x82, 0x0F, 0x91, 0xD0, 0x9C, 0x10, 0x39, 0x7A, 0x83, 0x85, 0x3B, 0xB2, 0xB8, 0xAE, 0x0C, 0x09, 0x52, 0xEA, 0x1C, 0xE1, 0x8D, 0x66, 0x4F, 0xF3, @@ -337,7 +337,7 @@ public class CSS 0x16, 0x83, 0x7D, 0xEE, 0xF5, 0xCA, 0xC5, 0x18, 0xF9, 0xD8, 0x68, 0xAB, 0x38, 0x85, 0xA8, 0xF0, 0xA1, 0x73, 0x9F, 0x5D, 0x19, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x72, 0x39, 0x25, 0x67, 0x26, 0x6D, 0x71, 0x36, 0x77, 0x3C, 0x20, 0x62, 0x23, 0x68, 0x74, 0xC3, 0x82, 0xC9, 0x15, 0x57, 0x16, 0x5D, 0x81 - }; + ]; static readonly byte[,] _permutationChallenge = { @@ -365,15 +365,12 @@ public class CSS }; static readonly byte[] _variants = - { + [ 0xB7, 0x74, 0x85, 0xD0, 0xCC, 0xDB, 0xCA, 0x73, 0x03, 0xFE, 0x31, 0x03, 0x52, 0xE0, 0xB7, 0x42, 0x63, 0x16, 0xF2, 0x2A, 0x79, 0x52, 0xFF, 0x1B, 0x7A, 0x11, 0xCA, 0x1A, 0x9B, 0x40, 0xAD, 0x01 - }; + ]; - static readonly byte[] _secret = - { - 0x55, 0xD6, 0xC4, 0xC5, 0x28 - }; + static readonly byte[] _secret = [0x55, 0xD6, 0xC4, 0xC5, 0x28]; /// /// The disc key returned by the logical unit is encoded with the bus key to prevent man-in-the-middle attacks. diff --git a/Aaru.Decryption/DVD/Dump.cs b/Aaru.Decryption/DVD/Dump.cs index 6a1eb5863..3c445723c 100644 --- a/Aaru.Decryption/DVD/Dump.cs +++ b/Aaru.Decryption/DVD/Dump.cs @@ -49,7 +49,7 @@ public sealed class Dump(Device dev) const string MODULE_NAME = "DVD decryption"; public byte Agid { get; private set; } - public byte[] BusKey { get; private set; } = Array.Empty(); + public byte[] BusKey { get; private set; } = []; /// Returns the Authentication Success Flag of the logical unit. /// true if the command failed and contains the sense buffer. @@ -127,7 +127,7 @@ public sealed class Dump(Device dev) { senseBuffer = new byte[64]; var cdb = new byte[12]; - buffer = Array.Empty(); + buffer = []; cdb[0] = (byte)ScsiCommands.ReportKey; cdb[7] = (byte)keyClass; @@ -366,7 +366,7 @@ public sealed class Dump(Device dev) out double duration) { duration = 0; - buffer = Array.Empty(); + buffer = []; senseBuffer = new byte[64]; var sense = false; @@ -435,7 +435,7 @@ public sealed class Dump(Device dev) if(i < 31) continue; - senseBuffer = Array.Empty(); + senseBuffer = []; return true; } diff --git a/Aaru.Decryption/DVD/MPEG.cs b/Aaru.Decryption/DVD/MPEG.cs index 213a0e7ea..92a5cf63c 100644 --- a/Aaru.Decryption/DVD/MPEG.cs +++ b/Aaru.Decryption/DVD/MPEG.cs @@ -131,17 +131,13 @@ public class Mpeg #endregion - static readonly byte[] _mpeg2PackHeaderStartCode = - { - 0x0, 0x0, 0x1 - }; + static readonly byte[] _mpeg2PackHeaderStartCode = [0x0, 0x0, 0x1]; public static bool ContainsMpegPackets(byte[] sectorData, uint blocks = 1, uint blockSize = 2048) { for(uint i = 0; i < blocks; i++) - { - if(IsMpegPacket(sectorData.Skip((int)(i * blockSize)))) return true; - } + if(IsMpegPacket(sectorData.Skip((int)(i * blockSize)))) + return true; return false; } diff --git a/Aaru.Devices/Device/AtaCommands/Ata28.cs b/Aaru.Devices/Device/AtaCommands/Ata28.cs index 5b7278166..d0eed75c3 100644 --- a/Aaru.Devices/Device/AtaCommands/Ata28.cs +++ b/Aaru.Devices/Device/AtaCommands/Ata28.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using Aaru.Console; using Aaru.Decoders.ATA; @@ -216,7 +215,7 @@ public partial class Device out double duration) { lba = 0; - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba28 { @@ -369,7 +368,7 @@ public partial class Device /// true if the device set an error condition, false otherwise public bool Seek(out AtaErrorRegistersLba28 statusRegisters, uint lba, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba28 { diff --git a/Aaru.Devices/Device/AtaCommands/Ata48.cs b/Aaru.Devices/Device/AtaCommands/Ata48.cs index 68c7cd9da..cf20b2302 100644 --- a/Aaru.Devices/Device/AtaCommands/Ata48.cs +++ b/Aaru.Devices/Device/AtaCommands/Ata48.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using Aaru.Console; using Aaru.Decoders.ATA; @@ -48,7 +47,7 @@ public partial class Device out double duration) { lba = 0; - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba48 { @@ -267,7 +266,7 @@ public partial class Device out double duration) { lba = 0; - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba48 { diff --git a/Aaru.Devices/Device/AtaCommands/AtaCHS.cs b/Aaru.Devices/Device/AtaCommands/AtaCHS.cs index 289b9d655..c23040057 100644 --- a/Aaru.Devices/Device/AtaCommands/AtaCHS.cs +++ b/Aaru.Devices/Device/AtaCommands/AtaCHS.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using System.Diagnostics.CodeAnalysis; using Aaru.Console; using Aaru.Decoders.ATA; @@ -327,7 +326,7 @@ public partial class Device public bool Seek(out AtaErrorRegistersChs statusRegisters, ushort cylinder, byte head, byte sector, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersChs { @@ -378,7 +377,7 @@ public partial class Device public bool SetFeatures(out AtaErrorRegistersChs statusRegisters, AtaFeatures feature, ushort cylinder, byte head, byte sector, byte sectorCount, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersChs { @@ -415,7 +414,7 @@ public partial class Device /// true if the device set an error condition, false otherwise public bool DoorLock(out AtaErrorRegistersChs statusRegisters, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersChs { @@ -446,7 +445,7 @@ public partial class Device /// true if the device set an error condition, false otherwise public bool DoorUnlock(out AtaErrorRegistersChs statusRegisters, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersChs { @@ -477,7 +476,7 @@ public partial class Device /// true if the device set an error condition, false otherwise public bool MediaEject(out AtaErrorRegistersChs statusRegisters, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersChs { diff --git a/Aaru.Devices/Device/AtaCommands/Cfa.cs b/Aaru.Devices/Device/AtaCommands/Cfa.cs index c08384d0b..af1d9d33c 100644 --- a/Aaru.Devices/Device/AtaCommands/Cfa.cs +++ b/Aaru.Devices/Device/AtaCommands/Cfa.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using Aaru.Console; using Aaru.Decoders.ATA; @@ -127,7 +126,7 @@ public partial class Device public bool RequestExtendedErrorCode(out byte errorCode, out AtaErrorRegistersLba28 statusRegisters, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba28 { diff --git a/Aaru.Devices/Device/AtaCommands/MCPT.cs b/Aaru.Devices/Device/AtaCommands/MCPT.cs index 0cd53653f..4755f8586 100644 --- a/Aaru.Devices/Device/AtaCommands/MCPT.cs +++ b/Aaru.Devices/Device/AtaCommands/MCPT.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using System.Diagnostics.CodeAnalysis; using Aaru.Console; using Aaru.Decoders.ATA; @@ -71,7 +70,7 @@ public partial class Device public bool CheckMediaCardType(byte feature, out AtaErrorRegistersChs statusRegisters, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersChs { diff --git a/Aaru.Devices/Device/AtaCommands/Smart.cs b/Aaru.Devices/Device/AtaCommands/Smart.cs index 2416bc800..553c0715a 100644 --- a/Aaru.Devices/Device/AtaCommands/Smart.cs +++ b/Aaru.Devices/Device/AtaCommands/Smart.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using Aaru.Console; using Aaru.Decoders.ATA; @@ -45,7 +44,7 @@ public partial class Device /// true if the device set an error condition, false otherwise public bool SmartDisable(out AtaErrorRegistersLba28 statusRegisters, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba28 { @@ -80,7 +79,7 @@ public partial class Device public bool SmartEnableAttributeAutosave(out AtaErrorRegistersLba28 statusRegisters, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba28 { @@ -116,7 +115,7 @@ public partial class Device public bool SmartDisableAttributeAutosave(out AtaErrorRegistersLba28 statusRegisters, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba28 { @@ -150,7 +149,7 @@ public partial class Device /// true if the device set an error condition, false otherwise public bool SmartEnable(out AtaErrorRegistersLba28 statusRegisters, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba28 { @@ -186,7 +185,7 @@ public partial class Device public bool SmartExecuteOffLineImmediate(out AtaErrorRegistersLba28 statusRegisters, byte subcommand, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba28 { @@ -295,7 +294,7 @@ public partial class Device /// true if the device set an error condition, false otherwise public bool SmartReturnStatus(out AtaErrorRegistersLba28 statusRegisters, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var registers = new AtaRegistersLba28 { diff --git a/Aaru.Devices/Device/List.cs b/Aaru.Devices/Device/List.cs index 6fc1ff634..d497a07fb 100644 --- a/Aaru.Devices/Device/List.cs +++ b/Aaru.Devices/Device/List.cs @@ -118,7 +118,7 @@ public partial class Device { AaruConsole.ErrorWriteLine(Localization.Invalid_remote_URI); - return Array.Empty(); + return []; } using var remote = new Remote.Remote(aaruUri); @@ -136,7 +136,7 @@ public partial class Device { AaruConsole.ErrorWriteLine(Localization.Error_connecting_to_host); - return Array.Empty(); + return []; } } } \ No newline at end of file diff --git a/Aaru.Devices/Device/MmcCommands/MMC.cs b/Aaru.Devices/Device/MmcCommands/MMC.cs index 96d9191a5..405575de7 100644 --- a/Aaru.Devices/Device/MmcCommands/MMC.cs +++ b/Aaru.Devices/Device/MmcCommands/MMC.cs @@ -169,7 +169,7 @@ public partial class Device /// true if the device set an error condition, false otherwise public bool SetBlockLength(uint length, out uint[] response, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; LastError = SendMmcCommand(MmcCommands.SetBlocklen, false, @@ -437,7 +437,7 @@ public partial class Device argument = transferLength, blockSize = 0, blocks = 0, - buffer = Array.Empty() + buffer = [] }; // READ_MULTIPLE_BLOCK @@ -464,7 +464,7 @@ public partial class Device argument = 0, blockSize = 0, blocks = 0, - buffer = Array.Empty() + buffer = [] }; LastError = SendMultipleMmcCommands(commands, out duration, out bool sense, timeout); diff --git a/Aaru.Devices/Device/ScsiCommands/ArchiveCorp.cs b/Aaru.Devices/Device/ScsiCommands/ArchiveCorp.cs index 1cbed8541..22cfb96c4 100644 --- a/Aaru.Devices/Device/ScsiCommands/ArchiveCorp.cs +++ b/Aaru.Devices/Device/ScsiCommands/ArchiveCorp.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using Aaru.Console; // ReSharper disable UnusedMember.Global @@ -92,7 +91,7 @@ public partial class Device public bool ArchiveCorpSeekBlock(out byte[] senseBuffer, bool immediate, uint lba, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var cdb = new byte[6]; senseBuffer = new byte[64]; diff --git a/Aaru.Devices/Device/ScsiCommands/Certance.cs b/Aaru.Devices/Device/ScsiCommands/Certance.cs index 01c4fd5ff..127feeaeb 100644 --- a/Aaru.Devices/Device/ScsiCommands/Certance.cs +++ b/Aaru.Devices/Device/ScsiCommands/Certance.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using System.Diagnostics.CodeAnalysis; using Aaru.Console; @@ -60,7 +59,7 @@ public partial class Device /// Duration. public bool CertanceParkUnpark(out byte[] senseBuffer, bool park, uint timeout, out double duration) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; var cdb = new byte[6]; senseBuffer = new byte[64]; diff --git a/Aaru.Devices/Device/ScsiCommands/HL-DT-ST.cs b/Aaru.Devices/Device/ScsiCommands/HL-DT-ST.cs index 0a2f32f6e..dca8dfd60 100644 --- a/Aaru.Devices/Device/ScsiCommands/HL-DT-ST.cs +++ b/Aaru.Devices/Device/ScsiCommands/HL-DT-ST.cs @@ -103,10 +103,7 @@ public partial class Device { for(var i = 0; i < transferLength; i++) { - byte[] sectorBuffer = - { - 0x0, buffer[1 + 2064 * i], buffer[2 + 2064 * i], buffer[3 + 2064 * i] - }; + byte[] sectorBuffer = [0x0, buffer[1 + 2064 * i], buffer[2 + 2064 * i], buffer[3 + 2064 * i]]; var sectorNumber = BigEndianBitConverter.ToUInt32(sectorBuffer, 0); diff --git a/Aaru.Devices/Device/ScsiCommands/Kreon.cs b/Aaru.Devices/Device/ScsiCommands/Kreon.cs index 111c5061c..99692bd8e 100644 --- a/Aaru.Devices/Device/ScsiCommands/Kreon.cs +++ b/Aaru.Devices/Device/ScsiCommands/Kreon.cs @@ -46,7 +46,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[6]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.KreonCommand; cdb[1] = 0x08; @@ -102,7 +102,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[6]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.KreonCommand; cdb[1] = 0x08; diff --git a/Aaru.Devices/Device/ScsiCommands/MMC.cs b/Aaru.Devices/Device/ScsiCommands/MMC.cs index 589460a64..b57b9c16d 100644 --- a/Aaru.Devices/Device/ScsiCommands/MMC.cs +++ b/Aaru.Devices/Device/ScsiCommands/MMC.cs @@ -637,7 +637,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[6]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.PreventAllowMediumRemoval; @@ -715,7 +715,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[6]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.StartStopUnit; @@ -867,7 +867,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[12]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.SetCdRomSpeed; cdb[1] = (byte)((byte)rotationalControl & 0x03); diff --git a/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs b/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs index 5dcccda66..ab326e019 100644 --- a/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs +++ b/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs @@ -32,7 +32,6 @@ // ReSharper disable InconsistentNaming -using System; using Aaru.Console; // ReSharper disable UnusedMember.Global @@ -162,7 +161,7 @@ public partial class Device cdb[0] = (byte)ScsiCommands.MiniDiscStopPlay; - buffer = Array.Empty(); + buffer = []; LastError = SendScsiCommand(cdb, ref buffer, diff --git a/Aaru.Devices/Device/ScsiCommands/Optical.cs b/Aaru.Devices/Device/ScsiCommands/Optical.cs index ef5f4153a..1085ffd0e 100644 --- a/Aaru.Devices/Device/ScsiCommands/Optical.cs +++ b/Aaru.Devices/Device/ScsiCommands/Optical.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using Aaru.Console; using Aaru.Decoders.SCSI; @@ -64,7 +63,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[10]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; foundLba = 0; foundBlocks = 0; diff --git a/Aaru.Devices/Device/ScsiCommands/SBC.cs b/Aaru.Devices/Device/ScsiCommands/SBC.cs index f70d685fb..2843fd5ad 100644 --- a/Aaru.Devices/Device/ScsiCommands/SBC.cs +++ b/Aaru.Devices/Device/ScsiCommands/SBC.cs @@ -400,7 +400,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[6]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.Seek6; cdb[1] = (byte)((lba & 0x1F0000) >> 16); @@ -431,7 +431,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[10]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.Seek10; cdb[2] = (byte)((lba & 0xFF000000) >> 24); diff --git a/Aaru.Devices/Device/ScsiCommands/SPC.cs b/Aaru.Devices/Device/ScsiCommands/SPC.cs index 17813a5aa..c3f1d3af9 100644 --- a/Aaru.Devices/Device/ScsiCommands/SPC.cs +++ b/Aaru.Devices/Device/ScsiCommands/SPC.cs @@ -77,10 +77,7 @@ public partial class Device buffer = new byte[36]; senseBuffer = new byte[64]; - byte[] cdb = - { - (byte)ScsiCommands.Inquiry, 0, 0, 0, 36, 0 - }; + byte[] cdb = [(byte)ScsiCommands.Inquiry, 0, 0, 0, 36, 0]; LastError = SendScsiCommand(cdb, ref buffer, @@ -96,10 +93,7 @@ public partial class Device var pagesLength = (byte)(buffer[4] + 5); - cdb = new byte[] - { - (byte)ScsiCommands.Inquiry, 0, 0, 0, pagesLength, 0 - }; + cdb = [(byte)ScsiCommands.Inquiry, 0, 0, 0, pagesLength, 0]; buffer = new byte[pagesLength]; senseBuffer = new byte[64]; @@ -163,10 +157,7 @@ public partial class Device buffer = new byte[36]; senseBuffer = new byte[64]; - byte[] cdb = - { - (byte)ScsiCommands.Inquiry, 1, page, 0, 36, 0 - }; + byte[] cdb = [(byte)ScsiCommands.Inquiry, 1, page, 0, 36, 0]; LastError = SendScsiCommand(cdb, ref buffer, @@ -185,10 +176,7 @@ public partial class Device var pagesLength = (byte)(buffer[3] + 4); - cdb = new byte[] - { - (byte)ScsiCommands.Inquiry, 1, page, 0, pagesLength, 0 - }; + cdb = [(byte)ScsiCommands.Inquiry, 1, page, 0, pagesLength, 0]; buffer = new byte[pagesLength]; senseBuffer = new byte[64]; @@ -217,12 +205,9 @@ public partial class Device { senseBuffer = new byte[64]; - byte[] cdb = - { - (byte)ScsiCommands.TestUnitReady, 0, 0, 0, 0, 0 - }; + byte[] cdb = [(byte)ScsiCommands.TestUnitReady, 0, 0, 0, 0, 0]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; LastError = SendScsiCommand(cdb, ref buffer, @@ -454,7 +439,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[6]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.PreventAllowMediumRemoval; cdb[4] = (byte)((byte)preventMode & 0x03); diff --git a/Aaru.Devices/Device/ScsiCommands/SSC.cs b/Aaru.Devices/Device/ScsiCommands/SSC.cs index ac78e8b7d..dbaf41cca 100644 --- a/Aaru.Devices/Device/ScsiCommands/SSC.cs +++ b/Aaru.Devices/Device/ScsiCommands/SSC.cs @@ -75,7 +75,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[6]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.LoadUnload; @@ -161,7 +161,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[10]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.Locate; @@ -259,7 +259,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[16]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; byte[] idBytes = BitConverter.GetBytes(identifier); cdb[0] = (byte)ScsiCommands.Locate16; @@ -1015,7 +1015,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[6]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.Rewind; @@ -1046,7 +1046,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[6]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; cdb[0] = (byte)ScsiCommands.TrackSelect; cdb[5] = track; @@ -1077,7 +1077,7 @@ public partial class Device { senseBuffer = new byte[64]; var cdb = new byte[6]; - byte[] buffer = Array.Empty(); + byte[] buffer = []; byte[] countB = BitConverter.GetBytes(count); cdb[0] = (byte)ScsiCommands.Space; diff --git a/Aaru.Devices/Device/ScsiCommands/SyQuest.cs b/Aaru.Devices/Device/ScsiCommands/SyQuest.cs index 0225dfb3c..ed7f3656a 100644 --- a/Aaru.Devices/Device/ScsiCommands/SyQuest.cs +++ b/Aaru.Devices/Device/ScsiCommands/SyQuest.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System; using Aaru.Console; // ReSharper disable UnusedMember.Global @@ -106,7 +105,7 @@ public partial class Device cdb[4] = 1; } else - buffer = Array.Empty(); + buffer = []; if(!inhibitDma) { @@ -194,7 +193,7 @@ public partial class Device cdb[4] = 1; } else - buffer = Array.Empty(); + buffer = []; if(!inhibitDma) { diff --git a/Aaru.Devices/Remote/Remote.cs b/Aaru.Devices/Remote/Remote.cs index 8e813da5a..832103924 100644 --- a/Aaru.Devices/Remote/Remote.cs +++ b/Aaru.Devices/Remote/Remote.cs @@ -327,7 +327,7 @@ public class Remote : IDisposable { AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network); - return Array.Empty(); + return []; } var hdrBuf = new byte[Marshal.SizeOf()]; @@ -338,7 +338,7 @@ public class Remote : IDisposable { AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network); - return Array.Empty(); + return []; } AaruPacketHeader hdr = Marshal.ByteArrayToStructureLittleEndian(hdrBuf); @@ -347,7 +347,7 @@ public class Remote : IDisposable { AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet); - return Array.Empty(); + return []; } if(hdr.packetType != AaruPacketType.ResponseListDevices) @@ -358,7 +358,7 @@ public class Remote : IDisposable .Remote_ListDevices_Expected_List_Devices_Response_Packet_got_packet_type_0, hdr.packetType); - return Array.Empty(); + return []; } buf = new byte[hdr.len]; @@ -368,21 +368,21 @@ public class Remote : IDisposable { AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network); - return Array.Empty(); + return []; } AaruPacketNop nop = Marshal.ByteArrayToStructureLittleEndian(buf); AaruConsole.ErrorWriteLine($"{nop.reason}"); - return Array.Empty(); + return []; } if(hdr.version != Consts.PACKET_VERSION) { AaruConsole.ErrorWriteLine(Localization.Unrecognized_packet_version); - return Array.Empty(); + return []; } buf = new byte[hdr.len]; @@ -392,13 +392,13 @@ public class Remote : IDisposable { AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network); - return Array.Empty(); + return []; } AaruPacketResponseListDevices response = Marshal.ByteArrayToStructureLittleEndian(buf); - List devices = new(); + List devices = []; int offset = Marshal.SizeOf(); int devInfoLen = Marshal.SizeOf(); diff --git a/Aaru.Dto/DeviceDto.cs b/Aaru.Dto/DeviceDto.cs index db2dc4dc7..8a74b36ff 100644 --- a/Aaru.Dto/DeviceDto.cs +++ b/Aaru.Dto/DeviceDto.cs @@ -32,7 +32,6 @@ // ReSharper disable VirtualMemberCallInConstructor -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Aaru.CommonTypes.Metadata; @@ -95,7 +94,7 @@ public class DeviceDto : DeviceReport if(ATA.RemovableMedias != null) { TestedMedia[] medias = ATA.RemovableMedias.ToArray(); - ATA.RemovableMedias = new List(); + ATA.RemovableMedias = []; foreach(TestedMedia media in medias) ATA.RemovableMedias.Add(ClearBinaries(media)); } @@ -109,7 +108,7 @@ public class DeviceDto : DeviceReport if(ATAPI.RemovableMedias != null) { TestedMedia[] medias = ATAPI.RemovableMedias.ToArray(); - ATAPI.RemovableMedias = new List(); + ATAPI.RemovableMedias = []; foreach(TestedMedia media in medias) ATAPI.RemovableMedias.Add(ClearBinaries(media)); } @@ -145,7 +144,7 @@ public class DeviceDto : DeviceReport if(SCSI.RemovableMedias != null) { TestedMedia[] medias = SCSI.RemovableMedias.ToArray(); - SCSI.RemovableMedias = new List(); + SCSI.RemovableMedias = []; foreach(TestedMedia media in medias) SCSI.RemovableMedias.Add(ClearBinaries(media)); } @@ -159,7 +158,7 @@ public class DeviceDto : DeviceReport if(SCSI.MultiMediaDevice.TestedMedia != null) { TestedMedia[] medias = SCSI.MultiMediaDevice.TestedMedia.ToArray(); - SCSI.MultiMediaDevice.TestedMedia = new List(); + SCSI.MultiMediaDevice.TestedMedia = []; foreach(TestedMedia media in medias) SCSI.MultiMediaDevice.TestedMedia.Add(ClearBinaries(media)); } diff --git a/Aaru.Filesystems/AmigaDOS/Info.cs b/Aaru.Filesystems/AmigaDOS/Info.cs index e6a5f92a1..ea79b1a04 100644 --- a/Aaru.Filesystems/AmigaDOS/Info.cs +++ b/Aaru.Filesystems/AmigaDOS/Info.cs @@ -96,12 +96,12 @@ public sealed partial class AmigaDOSPlugin } ulong[] rootPtrs = - { + [ bRootPtr + partition.Start, (partition.End - partition.Start + 1) / 2 + partition.Start - 2, (partition.End - partition.Start + 1) / 2 + partition.Start - 1, (partition.End - partition.Start + 1) / 2 + partition.Start, (partition.End - partition.Start + 1) / 2 + partition.Start + 4 - }; + ]; var rblk = new RootBlock(); @@ -182,12 +182,12 @@ public sealed partial class AmigaDOSPlugin } ulong[] rootPtrs = - { + [ bRootPtr + partition.Start, (partition.End - partition.Start + 1) / 2 + partition.Start - 2, (partition.End - partition.Start + 1) / 2 + partition.Start - 1, (partition.End - partition.Start + 1) / 2 + partition.Start, (partition.End - partition.Start + 1) / 2 + partition.Start + 4 - }; + ]; var rootBlk = new RootBlock(); byte[] rootBlockSector = null; diff --git a/Aaru.Filesystems/AppleDOS/Dir.cs b/Aaru.Filesystems/AppleDOS/Dir.cs index 90e6b82fb..dec465c62 100644 --- a/Aaru.Filesystems/AppleDOS/Dir.cs +++ b/Aaru.Filesystems/AppleDOS/Dir.cs @@ -121,7 +121,7 @@ public sealed partial class AppleDOS _totalFileEntries = 0; _catalogCache = new Dictionary(); _fileTypeCache = new Dictionary(); - _lockedFiles = new List(); + _lockedFiles = []; if(lba == 0 || lba > _device.Info.Sectors) return ErrorNumber.InvalidArgument; diff --git a/Aaru.Filesystems/AppleDOS/Xattr.cs b/Aaru.Filesystems/AppleDOS/Xattr.cs index 699bae414..6a80951df 100644 --- a/Aaru.Filesystems/AppleDOS/Xattr.cs +++ b/Aaru.Filesystems/AppleDOS/Xattr.cs @@ -59,7 +59,7 @@ public sealed partial class AppleDOS if(filename.Length > 30) return ErrorNumber.NameTooLong; - xattrs = new List(); + xattrs = []; if(_debug && (string.Compare(path, "$", StringComparison.InvariantCulture) == 0 || diff --git a/Aaru.Filesystems/AppleMFS/File.cs b/Aaru.Filesystems/AppleMFS/File.cs index 45fa93403..ea72dac05 100644 --- a/Aaru.Filesystems/AppleMFS/File.cs +++ b/Aaru.Filesystems/AppleMFS/File.cs @@ -297,7 +297,7 @@ public sealed partial class AppleMFS { if(entry.flRPyLen == 0) { - buf = Array.Empty(); + buf = []; return ErrorNumber.NoError; } @@ -308,7 +308,7 @@ public sealed partial class AppleMFS { if(entry.flPyLen == 0) { - buf = Array.Empty(); + buf = []; return ErrorNumber.NoError; } diff --git a/Aaru.Filesystems/AppleMFS/Xattr.cs b/Aaru.Filesystems/AppleMFS/Xattr.cs index 653850751..3c61e0fac 100644 --- a/Aaru.Filesystems/AppleMFS/Xattr.cs +++ b/Aaru.Filesystems/AppleMFS/Xattr.cs @@ -60,7 +60,7 @@ public sealed partial class AppleMFS path = pathElements[0]; - xattrs = new List(); + xattrs = []; if(_debug) { diff --git a/Aaru.Filesystems/CPM/Super.cs b/Aaru.Filesystems/CPM/Super.cs index b925afad3..b257f4c7c 100644 --- a/Aaru.Filesystems/CPM/Super.cs +++ b/Aaru.Filesystems/CPM/Super.cs @@ -167,9 +167,8 @@ public sealed partial class CPM if(errno != ErrorNumber.NoError) return errno; if(_workingDefinition.complement) - { - for(var b = 0; b < readSector.Length; b++) readSector[b] = (byte)(~readSector[b] & 0xFF); - } + for(var b = 0; b < readSector.Length; b++) + readSector[b] = (byte)(~readSector[b] & 0xFF); deinterleavedSectors.Add((ulong)p, readSector); } @@ -250,7 +249,7 @@ public sealed partial class CPM _statCache = new Dictionary(); _cpmStat = new FileSystemInfo(); var atime = false; - _dirList = new List(); + _dirList = []; _labelCreationDate = null; _labelUpdateDate = null; _passwordCache = new Dictionary(); @@ -325,7 +324,7 @@ public sealed partial class CPM if(extentBlocks.TryGetValue(entryNo, out List blocks)) extentBlocks.Remove(entryNo); else - blocks = new List(); + blocks = []; // Attributes if(hidden) fInfo.Attributes |= FileAttributes.Hidden; @@ -433,7 +432,7 @@ public sealed partial class CPM if(extentBlocks.TryGetValue(entryNo, out List blocks)) extentBlocks.Remove(entryNo); else - blocks = new List(); + blocks = []; // Attributes if(hidden) fInfo.Attributes |= FileAttributes.Hidden; diff --git a/Aaru.Filesystems/CPM/Xattr.cs b/Aaru.Filesystems/CPM/Xattr.cs index b35961807..bbbe9d531 100644 --- a/Aaru.Filesystems/CPM/Xattr.cs +++ b/Aaru.Filesystems/CPM/Xattr.cs @@ -56,9 +56,8 @@ public sealed partial class CPM if(!_fileCache.ContainsKey(pathElements[0].ToUpperInvariant())) return ErrorNumber.NoSuchFile; if(string.Compare(xattr, "com.caldera.cpm.password", StringComparison.InvariantCulture) == 0) - { - if(!_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf)) return ErrorNumber.NoError; - } + if(!_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf)) + return ErrorNumber.NoError; if(string.Compare(xattr, "com.caldera.cpm.password.text", StringComparison.InvariantCulture) != 0) return ErrorNumber.NoSuchExtendedAttribute; @@ -85,7 +84,7 @@ public sealed partial class CPM if(!_fileCache.ContainsKey(pathElements[0].ToUpperInvariant())) return ErrorNumber.NoSuchFile; - xattrs = new List(); + xattrs = []; if(_passwordCache.ContainsKey(pathElements[0].ToUpperInvariant())) xattrs.Add("com.caldera.cpm.password"); diff --git a/Aaru.Filesystems/FAT/Consts.cs b/Aaru.Filesystems/FAT/Consts.cs index c2e1531a2..750d5803e 100644 --- a/Aaru.Filesystems/FAT/Consts.cs +++ b/Aaru.Filesystems/FAT/Consts.cs @@ -83,7 +83,7 @@ public sealed partial class FAT const string FS_TYPE_FAT12 = "fat12"; readonly (string hash, string name)[] _knownBootHashes = - { + [ ("b639b4d5b25f63560e3b34a3a0feb732aa65486f", "Amstrad MS-DOS 3.20 (8-sector floppy)"), ("9311151f13f7611b1431593da05ddd3153370574", "Amstrad MS-DOS 3.20 (Spanish)"), ("55eda6a9b955f5199020e6b56a6954fa6fcb7dc6", "AT&T MS-DOS 2.11"), @@ -173,7 +173,7 @@ public sealed partial class FAT ("8524587ee91494cc51cc2c9d07453e84be0cdc33", "Hero Soft v1.10"), ("681a0d9d662ba368e6acb0d0bf602e1f56411144", "Human68k 2.00"), ("91e2b47c3cb46611249e4daa283a68ba21ba596a", "Human68k 2.00") - }; + ]; #region Nested type: BpbKind diff --git a/Aaru.Filesystems/FAT/Dir.cs b/Aaru.Filesystems/FAT/Dir.cs index 2cf498873..891c5ac43 100644 --- a/Aaru.Filesystems/FAT/Dir.cs +++ b/Aaru.Filesystems/FAT/Dir.cs @@ -129,7 +129,7 @@ public sealed partial class FAT { Path = path, Position = 0, - Entries = Array.Empty() + Entries = [] }; return ErrorNumber.NoError; diff --git a/Aaru.Filesystems/FAT/File.cs b/Aaru.Filesystems/FAT/File.cs index fafdd6460..b5a1ccf2b 100644 --- a/Aaru.Filesystems/FAT/File.cs +++ b/Aaru.Filesystems/FAT/File.cs @@ -208,11 +208,11 @@ public sealed partial class FAT uint[] GetClusters(uint startCluster) { - if(startCluster == 0) return Array.Empty(); + if(startCluster == 0) return []; if(startCluster >= Metadata.Clusters) return null; - List clusters = new(); + List clusters = []; uint nextCluster = startCluster; diff --git a/Aaru.Filesystems/FAT/Xattr.cs b/Aaru.Filesystems/FAT/Xattr.cs index 97ad7ef69..dbd41c9a3 100644 --- a/Aaru.Filesystems/FAT/Xattr.cs +++ b/Aaru.Filesystems/FAT/Xattr.cs @@ -65,7 +65,7 @@ public sealed partial class FAT if(err != ErrorNumber.NoError || entry is null) return err; - xattrs = new List(); + xattrs = []; if(!_fat32) { diff --git a/Aaru.Filesystems/FATX/File.cs b/Aaru.Filesystems/FATX/File.cs index d4fa84bc5..2220d39a3 100644 --- a/Aaru.Filesystems/FATX/File.cs +++ b/Aaru.Filesystems/FATX/File.cs @@ -220,7 +220,7 @@ public sealed partial class XboxFatPlugin } else if(startCluster >= _fat16.Length) return null; - List clusters = new(); + List clusters = []; uint nextCluster = startCluster; diff --git a/Aaru.Filesystems/FFS/Info.cs b/Aaru.Filesystems/FFS/Info.cs index 3e74b2b15..e6c08d86f 100644 --- a/Aaru.Filesystems/FFS/Info.cs +++ b/Aaru.Filesystems/FFS/Info.cs @@ -60,11 +60,11 @@ public sealed partial class FFSPlugin sbSizeInSectors = block_size / imagePlugin.Info.SectorSize; ulong[] locations = - { + [ sb_start_floppy, sb_start_boot, sb_start_long_boot, sb_start_piggy, sb_start_att_dsdd, 8192 / imagePlugin.Info.SectorSize, 65536 / imagePlugin.Info.SectorSize, 262144 / imagePlugin.Info.SectorSize - }; + ]; try { @@ -122,11 +122,11 @@ public sealed partial class FFSPlugin sb_size_in_sectors = block_size / imagePlugin.Info.SectorSize; ulong[] locations = - { + [ sb_start_floppy, sb_start_boot, sb_start_long_boot, sb_start_piggy, sb_start_att_dsdd, 8192 / imagePlugin.Info.SectorSize, 65536 / imagePlugin.Info.SectorSize, 262144 / imagePlugin.Info.SectorSize - }; + ]; ErrorNumber errno; diff --git a/Aaru.Filesystems/HPOFS/Consts.cs b/Aaru.Filesystems/HPOFS/Consts.cs index 357615f77..1b82eaf20 100644 --- a/Aaru.Filesystems/HPOFS/Consts.cs +++ b/Aaru.Filesystems/HPOFS/Consts.cs @@ -35,9 +35,6 @@ public sealed partial class HPOFS // Do not translate const string FS_TYPE = "hpofs"; readonly byte[] _medinfoSignature = "MEDINFO "u8.ToArray(); - readonly byte[] _type = - { - 0x48, 0x50, 0x4F, 0x46, 0x53, 0x00, 0x00, 0x00 - }; + readonly byte[] _type = [0x48, 0x50, 0x4F, 0x46, 0x53, 0x00, 0x00, 0x00]; readonly byte[] _volinfoSignature = "VOLINFO "u8.ToArray(); } \ No newline at end of file diff --git a/Aaru.Filesystems/ISO9660/Dir.cs b/Aaru.Filesystems/ISO9660/Dir.cs index 0bc8fb79c..694e6366f 100644 --- a/Aaru.Filesystems/ISO9660/Dir.cs +++ b/Aaru.Filesystems/ISO9660/Dir.cs @@ -242,7 +242,7 @@ public sealed partial class ISO9660 VolumeSequenceNumber = record.volume_sequence_number, Timestamp = DecodeHighSierraDateTime(record.date), XattrLength = record.xattr_len, - Extents = new List<(uint extent, uint size)>() + Extents = [] }; if(record.size != 0) entry.Extents.Add((record.start_lbn, record.size)); @@ -322,7 +322,7 @@ public sealed partial class ISO9660 Filename = _encoding.GetString(data, entryOff + _directoryRecordSize, record.name_len), Timestamp = DecodeHighSierraDateTime(record.date), XattrLength = record.xattr_len, - Extents = new List<(uint extent, uint size)>() + Extents = [] }; if(record.size != 0) entry.Extents.Add((record.extent, record.size)); @@ -396,7 +396,7 @@ public sealed partial class ISO9660 VolumeSequenceNumber = record.volume_sequence_number, Timestamp = DecodeIsoDateTime(record.date), XattrLength = record.xattr_len, - Extents = new List<(uint extent, uint size)>() + Extents = [] }; if(record.size != 0) entry.Extents.Add((record.extent, record.size)); @@ -479,7 +479,7 @@ public sealed partial class ISO9660 // Can appear after an associated file if(entries[entry.Filename].Extents is null) { - entries[entry.Filename].Extents = new List<(uint extent, uint size)>(); + entries[entry.Filename].Extents = []; entries[entry.Filename].Flags = entry.Flags; entries[entry.Filename].FileUnitSize = entry.FileUnitSize; entries[entry.Filename].Interleave = entry.Interleave; @@ -747,7 +747,7 @@ public sealed partial class ISO9660 if(amiga.flags.HasFlag(AmigaFlags.Comment)) { - entry.AmigaComment ??= Array.Empty(); + entry.AmigaComment ??= []; var newComment = new byte[entry.AmigaComment.Length + data[systemAreaOff + @@ -885,7 +885,7 @@ public sealed partial class ISO9660 Array.Copy(data, systemAreaOff + Marshal.SizeOf(), nm, 0, nm.Length); } - entry.RockRidgeAlternateName ??= Array.Empty(); + entry.RockRidgeAlternateName ??= []; var newNm = new byte[entry.RockRidgeAlternateName.Length + nm.Length]; Array.Copy(entry.RockRidgeAlternateName, 0, newNm, 0, entry.RockRidgeAlternateName.Length); @@ -935,10 +935,7 @@ public sealed partial class ISO9660 // As per RRIP 4.1.5.1, we leave name as in previous entry, substitute location with the one in // the CL, and replace all other fields with the ones found in the first entry of the child - entry.Extents = new List<(uint extent, uint size)> - { - (cl.child_dir_lba, childRecord.size) - }; + entry.Extents = [(cl.child_dir_lba, childRecord.size)]; entry.Size = childRecord.size; entry.Flags = childRecord.flags; @@ -1097,7 +1094,7 @@ public sealed partial class ISO9660 IEnumerable GetPathTableEntries(string path) { IEnumerable tableEntries; - List pathTableList = new(_pathTable); + List pathTableList = [.._pathTable]; if(path is "" or "/") tableEntries = _pathTable.Where(p => p.Parent == 1 && p != _pathTable[0]); @@ -1139,7 +1136,7 @@ public sealed partial class ISO9660 DecodedDirectoryEntry[] GetSubdirsFromCdiPathTable(string path) { IEnumerable tableEntries = GetPathTableEntries(path); - List entries = new(); + List entries = []; foreach(PathTableEntryInternal tEntry in tableEntries) { @@ -1161,7 +1158,7 @@ public sealed partial class ISO9660 VolumeSequenceNumber = record.volume_sequence_number, Timestamp = DecodeHighSierraDateTime(record.date), XattrLength = tEntry.XattrLength, - Extents = new List<(uint extent, uint size)>() + Extents = [] }; if(record.size != 0) entry.Extents.Add((record.start_lbn, record.size)); @@ -1187,7 +1184,7 @@ public sealed partial class ISO9660 DecodedDirectoryEntry[] GetSubdirsFromIsoPathTable(string path) { IEnumerable tableEntries = GetPathTableEntries(path); - List entries = new(); + List entries = []; foreach(PathTableEntryInternal tEntry in tableEntries) { @@ -1212,7 +1209,7 @@ public sealed partial class ISO9660 VolumeSequenceNumber = record.volume_sequence_number, Timestamp = DecodeIsoDateTime(record.date), XattrLength = tEntry.XattrLength, - Extents = new List<(uint extent, uint size)>() + Extents = [] }; if(record.size != 0) entry.Extents.Add((record.extent, record.size)); @@ -1237,7 +1234,7 @@ public sealed partial class ISO9660 DecodedDirectoryEntry[] GetSubdirsFromHighSierraPathTable(string path) { IEnumerable tableEntries = GetPathTableEntries(path); - List entries = new(); + List entries = []; foreach(PathTableEntryInternal tEntry in tableEntries) { @@ -1259,7 +1256,7 @@ public sealed partial class ISO9660 VolumeSequenceNumber = record.volume_sequence_number, Timestamp = DecodeHighSierraDateTime(record.date), XattrLength = tEntry.XattrLength, - Extents = new List<(uint extent, uint size)>() + Extents = [] }; if(record.size != 0) entry.Extents.Add((record.extent, record.size)); diff --git a/Aaru.Filesystems/ISO9660/File.cs b/Aaru.Filesystems/ISO9660/File.cs index dc2e2bd6e..44e5e2e16 100644 --- a/Aaru.Filesystems/ISO9660/File.cs +++ b/Aaru.Filesystems/ISO9660/File.cs @@ -466,10 +466,7 @@ public sealed partial class ISO9660 ErrorNumber ReadSingleExtent(long size, uint startingSector, out byte[] buffer, bool interleaved = false, byte fileNumber = 0) => ReadWithExtents(0, size, - new List<(uint extent, uint size)> - { - (startingSector, (uint)size) - }, + [(startingSector, (uint)size)], interleaved, fileNumber, out buffer); @@ -478,10 +475,7 @@ public sealed partial class ISO9660 ErrorNumber ReadSingleExtent(long offset, long size, uint startingSector, out byte[] buffer, bool interleaved = false, byte fileNumber = 0) => ReadWithExtents(offset, size, - new List<(uint extent, uint size)> - { - (startingSector, (uint)size) - }, + [(startingSector, (uint)size)], interleaved, fileNumber, out buffer); diff --git a/Aaru.Filesystems/ISO9660/Info.cs b/Aaru.Filesystems/ISO9660/Info.cs index 3b53c44d7..8c123c372 100644 --- a/Aaru.Filesystems/ISO9660/Info.cs +++ b/Aaru.Filesystems/ISO9660/Info.cs @@ -275,7 +275,7 @@ public sealed partial class ISO9660 } } - byte[] rootDir = Array.Empty(); + byte[] rootDir = []; var rootOff = 0; var xaExtensions = false; var apple = false; @@ -284,8 +284,8 @@ public sealed partial class ISO9660 var ziso = false; var amiga = false; var aaip = false; - List contareas = new(); - List refareas = new(); + List contareas = []; + List refareas = []; var suspInformation = new StringBuilder(); if(rootLocation + rootSize < imagePlugin.Info.Sectors) diff --git a/Aaru.Filesystems/ISO9660/PathTable.cs b/Aaru.Filesystems/ISO9660/PathTable.cs index 2ad33bdab..45fb276c7 100644 --- a/Aaru.Filesystems/ISO9660/PathTable.cs +++ b/Aaru.Filesystems/ISO9660/PathTable.cs @@ -38,7 +38,7 @@ public sealed partial class ISO9660 { if(data is null || data.Length == 0) return null; - List table = new(); + List table = []; var off = 0; @@ -81,7 +81,7 @@ public sealed partial class ISO9660 { if(data is null) return null; - List table = new(); + List table = []; var off = 0; diff --git a/Aaru.Filesystems/ISO9660/Super.cs b/Aaru.Filesystems/ISO9660/Super.cs index 052ca71e2..829211248 100644 --- a/Aaru.Filesystems/ISO9660/Super.cs +++ b/Aaru.Filesystems/ISO9660/Super.cs @@ -124,11 +124,11 @@ public sealed partial class ISO9660 if(_highSierra) hsOff = 8; _cdi = false; - List bvdSectors = new(); - List pvdSectors = new(); - List svdSectors = new(); - List evdSectors = new(); - List vpdSectors = new(); + List bvdSectors = []; + List pvdSectors = []; + List svdSectors = []; + List evdSectors = []; + List vpdSectors = []; while(true) { @@ -590,10 +590,7 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add("$", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { - (rootLocation, rootSize) - }, + Extents = [(rootLocation, rootSize)], Filename = "$", Size = rootSize, Timestamp = decodedVd.CreationTime @@ -604,10 +601,7 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add("$PATH_TABLE.LSB", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { - (pathTableLsbLocation, (uint)pathTableData.Length) - }, + Extents = [(pathTableLsbLocation, (uint)pathTableData.Length)], Filename = "$PATH_TABLE.LSB", Size = (uint)pathTableData.Length, Timestamp = decodedVd.CreationTime @@ -617,10 +611,7 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add("$PATH_TABLE.MSB", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { - (Swapping.Swap(pathTableMsbLocation), (uint)pathTableData.Length) - }, + Extents = [(Swapping.Swap(pathTableMsbLocation), (uint)pathTableData.Length)], Filename = "$PATH_TABLE.MSB", Size = (uint)pathTableData.Length, Timestamp = decodedVd.CreationTime @@ -631,10 +622,7 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add(i == 0 ? "$BOOT" : $"$BOOT_{i}", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { - ((uint)i, 2048) - }, + Extents = [((uint)i, 2048)], Filename = i == 0 ? "$BOOT" : $"$BOOT_{i}", Size = 2048, Timestamp = decodedVd.CreationTime @@ -646,10 +634,7 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add(i == 0 ? "$PVD" : $"$PVD{i}", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { - ((uint)i, 2048) - }, + Extents = [((uint)i, 2048)], Filename = i == 0 ? "$PVD" : $"PVD_{i}", Size = 2048, Timestamp = decodedVd.CreationTime @@ -661,10 +646,7 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add(i == 0 ? "$SVD" : $"$SVD_{i}", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { - ((uint)i, 2048) - }, + Extents = [((uint)i, 2048)], Filename = i == 0 ? "$SVD" : $"$SVD_{i}", Size = 2048, Timestamp = decodedVd.CreationTime @@ -676,10 +658,7 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add(i == 0 ? "$EVD" : $"$EVD_{i}", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { - ((uint)i, 2048) - }, + Extents = [((uint)i, 2048)], Filename = i == 0 ? "$EVD" : $"$EVD_{i}", Size = 2048, Timestamp = decodedVd.CreationTime @@ -691,10 +670,7 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add(i == 0 ? "$VPD" : $"$VPD_{i}", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { - ((uint)i, 2048) - }, + Extents = [((uint)i, 2048)], Filename = i == 0 ? "$VPD" : $"$VPD_{i}", Size = 2048, Timestamp = decodedVd.CreationTime @@ -706,10 +682,7 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add("$IP.BIN", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { - ((uint)partition.Start, (uint)Marshal.SizeOf()) - }, + Extents = [((uint)partition.Start, (uint)Marshal.SizeOf())], Filename = "$IP.BIN", Size = (uint)Marshal.SizeOf(), Timestamp = decodedVd.CreationTime @@ -721,10 +694,7 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add("$IP.BIN", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { - ((uint)partition.Start, (uint)Marshal.SizeOf()) - }, + Extents = [((uint)partition.Start, (uint)Marshal.SizeOf())], Filename = "$IP.BIN", Size = (uint)Marshal.SizeOf(), Timestamp = decodedVd.CreationTime @@ -736,10 +706,10 @@ public sealed partial class ISO9660 _rootDirectoryCache.Add("$IP.BIN", new DecodedDirectoryEntry { - Extents = new List<(uint extent, uint size)> - { + Extents = + [ ((uint)partition.Start, (uint)Marshal.SizeOf()) - }, + ], Filename = "$IP.BIN", Size = (uint)Marshal.SizeOf(), Timestamp = decodedVd.CreationTime diff --git a/Aaru.Filesystems/ISO9660/Xattr.cs b/Aaru.Filesystems/ISO9660/Xattr.cs index ab7a9213f..8d98ef87e 100644 --- a/Aaru.Filesystems/ISO9660/Xattr.cs +++ b/Aaru.Filesystems/ISO9660/Xattr.cs @@ -53,7 +53,7 @@ public sealed partial class ISO9660 if(err != ErrorNumber.NoError) return err; - xattrs = new List(); + xattrs = []; if(entry.XattrLength > 0) xattrs.Add("org.iso.9660.ea"); @@ -123,7 +123,7 @@ public sealed partial class ISO9660 out buf); } - buf = Array.Empty(); + buf = []; return ErrorNumber.NoError; @@ -156,7 +156,7 @@ public sealed partial class ISO9660 out buf); } - buf = Array.Empty(); + buf = []; return ErrorNumber.NoError; diff --git a/Aaru.Filesystems/LisaFS/Dir.cs b/Aaru.Filesystems/LisaFS/Dir.cs index ac832a82f..7b9efb24e 100644 --- a/Aaru.Filesystems/LisaFS/Dir.cs +++ b/Aaru.Filesystems/LisaFS/Dir.cs @@ -141,7 +141,7 @@ public sealed partial class LisaFS if(!_mounted) return ErrorNumber.AccessDenied; - _catalogCache = new List(); + _catalogCache = []; // Do differently for V1 and V2 if(_mddf.fsversion is LISA_V2 or LISA_V1) @@ -151,7 +151,7 @@ public sealed partial class LisaFS if(error != ErrorNumber.NoError) return error; var offset = 0; - List catalogV2 = new(); + List catalogV2 = []; // For each entry on the catalog while(offset + 54 < buf.Length) @@ -253,10 +253,7 @@ public sealed partial class LisaFS ulong nextCatalogPointer = BigEndianBitConverter.ToUInt32(firstCatalogBlock, 0x7FA); - List catalogBlocks = new() - { - firstCatalogBlock - }; + List catalogBlocks = [firstCatalogBlock]; // Traverse double-linked list to read full catalog while(nextCatalogPointer != 0xFFFFFFFF) diff --git a/Aaru.Filesystems/LisaFS/Super.cs b/Aaru.Filesystems/LisaFS/Super.cs index c2a4a63d1..b27cd8cd0 100644 --- a/Aaru.Filesystems/LisaFS/Super.cs +++ b/Aaru.Filesystems/LisaFS/Super.cs @@ -229,7 +229,7 @@ public sealed partial class LisaFS if(options.TryGetValue("debug", out string debugString)) bool.TryParse(debugString, out _debug); - if(_debug) _printedExtents = new List(); + if(_debug) _printedExtents = []; // Read the S-Records file ErrorNumber error = ReadSRecords(); diff --git a/Aaru.Filesystems/LisaFS/Xattr.cs b/Aaru.Filesystems/LisaFS/Xattr.cs index a6aed8e8b..2c6e4118e 100644 --- a/Aaru.Filesystems/LisaFS/Xattr.cs +++ b/Aaru.Filesystems/LisaFS/Xattr.cs @@ -82,7 +82,7 @@ public sealed partial class LisaFS { if(!_debug || fileId == 0) return ErrorNumber.InvalidArgument; - xattrs = new List(); + xattrs = []; // Only MDDF contains an extended attributes if(fileId == FILEID_MDDF) @@ -100,7 +100,7 @@ public sealed partial class LisaFS if(error != ErrorNumber.NoError) return error; - xattrs = new List(); + xattrs = []; // Password field is never emptied, check if valid if(file.password_valid > 0) xattrs.Add("com.apple.lisa.password"); diff --git a/Aaru.Filesystems/Nintendo/Info.cs b/Aaru.Filesystems/Nintendo/Info.cs index e0a7e1711..a9d390897 100644 --- a/Aaru.Filesystems/Nintendo/Info.cs +++ b/Aaru.Filesystems/Nintendo/Info.cs @@ -172,10 +172,10 @@ public sealed partial class NintendoPlugin } else { - fields.FirstPartitions = Array.Empty(); - fields.SecondPartitions = Array.Empty(); - fields.ThirdPartitions = Array.Empty(); - fields.FourthPartitions = Array.Empty(); + fields.FirstPartitions = []; + fields.SecondPartitions = []; + fields.ThirdPartitions = []; + fields.FourthPartitions = []; } AaruConsole.DebugWriteLine(MODULE_NAME, "discType = {0}", fields.DiscType); diff --git a/Aaru.Filesystems/QNX4/Consts.cs b/Aaru.Filesystems/QNX4/Consts.cs index ba1bac524..0a6a73d91 100644 --- a/Aaru.Filesystems/QNX4/Consts.cs +++ b/Aaru.Filesystems/QNX4/Consts.cs @@ -37,7 +37,7 @@ public sealed partial class QNX4 { const string FS_TYPE = "qnx4"; readonly byte[] _rootDirFname = - { + [ 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; + ]; } \ No newline at end of file diff --git a/Aaru.Filesystems/ReFS/Consts.cs b/Aaru.Filesystems/ReFS/Consts.cs index a8311cc55..35dd85e3d 100644 --- a/Aaru.Filesystems/ReFS/Consts.cs +++ b/Aaru.Filesystems/ReFS/Consts.cs @@ -34,9 +34,6 @@ public sealed partial class ReFS { const uint FSRS = 0x53525346; - const string FS_TYPE = "refs"; - readonly byte[] _signature = - { - 0x52, 0x65, 0x46, 0x53, 0x00, 0x00, 0x00, 0x00 - }; + const string FS_TYPE = "refs"; + readonly byte[] _signature = [0x52, 0x65, 0x46, 0x53, 0x00, 0x00, 0x00, 0x00]; } \ No newline at end of file diff --git a/Aaru.Filesystems/Reiser/Consts.cs b/Aaru.Filesystems/Reiser/Consts.cs index 7e788c50b..8fded4a00 100644 --- a/Aaru.Filesystems/Reiser/Consts.cs +++ b/Aaru.Filesystems/Reiser/Consts.cs @@ -36,16 +36,7 @@ public sealed partial class Reiser const string FS_TYPE = "reiserfs"; - readonly byte[] _magic35 = - { - 0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x46, 0x73, 0x00, 0x00 - }; - readonly byte[] _magic36 = - { - 0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x32, 0x46, 0x73, 0x00 - }; - readonly byte[] _magicJr = - { - 0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x33, 0x46, 0x73, 0x00 - }; + readonly byte[] _magic35 = [0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x46, 0x73, 0x00, 0x00]; + readonly byte[] _magic36 = [0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x32, 0x46, 0x73, 0x00]; + readonly byte[] _magicJr = [0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x33, 0x46, 0x73, 0x00]; } \ No newline at end of file diff --git a/Aaru.Filesystems/Reiser4/Consts.cs b/Aaru.Filesystems/Reiser4/Consts.cs index 3e4499c40..9257234e5 100644 --- a/Aaru.Filesystems/Reiser4/Consts.cs +++ b/Aaru.Filesystems/Reiser4/Consts.cs @@ -37,7 +37,7 @@ public sealed partial class Reiser4 const string FS_TYPE = "reiser4"; readonly byte[] _magic = - { + [ 0x52, 0x65, 0x49, 0x73, 0x45, 0x72, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; + ]; } \ No newline at end of file diff --git a/Aaru.Filesystems/SysV/Info.cs b/Aaru.Filesystems/SysV/Info.cs index ab71d5ada..3fe27dcbc 100644 --- a/Aaru.Filesystems/SysV/Info.cs +++ b/Aaru.Filesystems/SysV/Info.cs @@ -74,12 +74,12 @@ public sealed partial class SysVfs // Superblock can start on 0x000, 0x200, 0x600 and 0x800, not aligned, so we assume 16 (128 bytes/sector) sectors as a safe value int[] locations = - { + [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, // Superblock can also skip one cylinder (for boot) spc - }; + ]; foreach(int i in locations.TakeWhile(i => (ulong)i + partition.Start + sb_size_in_sectors < imagePlugin.Info.Sectors)) @@ -175,12 +175,12 @@ public sealed partial class SysVfs // Superblock can start on 0x000, 0x200, 0x600 and 0x800, not aligned, so we assume 16 (128 bytes/sector) sectors as a safe value int[] locations = - { + [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, // Superblock can also skip one cylinder (for boot) spc - }; + ]; ErrorNumber errno; diff --git a/Aaru.Filesystems/UCSDPascal/Super.cs b/Aaru.Filesystems/UCSDPascal/Super.cs index 874e71f78..58cd2c926 100644 --- a/Aaru.Filesystems/UCSDPascal/Super.cs +++ b/Aaru.Filesystems/UCSDPascal/Super.cs @@ -102,7 +102,7 @@ public sealed partial class PascalPlugin var offset = 26; - _fileEntries = new List(); + _fileEntries = []; while(offset + 26 < _catalogBlocks.Length) { diff --git a/Aaru.Filesystems/UDF/Consts.cs b/Aaru.Filesystems/UDF/Consts.cs index 037bb6ee8..ee92395a6 100644 --- a/Aaru.Filesystems/UDF/Consts.cs +++ b/Aaru.Filesystems/UDF/Consts.cs @@ -38,8 +38,8 @@ public sealed partial class UDF { const string FS_TYPE = "udf"; readonly byte[] _magic = - { + [ 0x2A, 0x4F, 0x53, 0x54, 0x41, 0x20, 0x55, 0x44, 0x46, 0x20, 0x43, 0x6F, 0x6D, 0x70, 0x6C, 0x69, 0x61, 0x6E, 0x74, 0x00, 0x00, 0x00, 0x00 - }; + ]; } \ No newline at end of file diff --git a/Aaru.Filesystems/UDF/Info.cs b/Aaru.Filesystems/UDF/Info.cs index 7935e7374..749527b38 100644 --- a/Aaru.Filesystems/UDF/Info.cs +++ b/Aaru.Filesystems/UDF/Info.cs @@ -60,40 +60,10 @@ public sealed partial class UDF // All positions where anchor may reside, with the ratio between 512 and 2048bps ulong[][] positions = - { - new ulong[] - { - 256, 1 - }, - new ulong[] - { - 512, 1 - }, - new ulong[] - { - partition.End - 256, 1 - }, - new ulong[] - { - partition.End, 1 - }, - new ulong[] - { - 1024, 4 - }, - new ulong[] - { - 2048, 4 - }, - new ulong[] - { - partition.End - 1024, 4 - }, - new ulong[] - { - partition.End - 4, 4 - } - }; + [ + [256, 1], [512, 1], [partition.End - 256, 1], [partition.End, 1], [1024, 4], [2048, 4], + [partition.End - 1024, 4], [partition.End - 4, 4] + ]; var anchorFound = false; uint ratio = 1; @@ -218,40 +188,10 @@ public sealed partial class UDF // All positions where anchor may reside, with the ratio between 512 and 2048bps ulong[][] positions = - { - new ulong[] - { - 256, 1 - }, - new ulong[] - { - 512, 1 - }, - new ulong[] - { - partition.End - 256, 1 - }, - new ulong[] - { - partition.End, 1 - }, - new ulong[] - { - 1024, 4 - }, - new ulong[] - { - 2048, 4 - }, - new ulong[] - { - partition.End - 1024, 4 - }, - new ulong[] - { - partition.End - 4, 4 - } - }; + [ + [256, 1], [512, 1], [partition.End - 256, 1], [partition.End, 1], [1024, 4], [2048, 4], + [partition.End - 1024, 4], [partition.End - 4, 4] + ]; uint ratio = 1; diff --git a/Aaru.Generators/PluginRegisterGenerator.cs b/Aaru.Generators/PluginRegisterGenerator.cs index 5cfe20b52..6bfa6d162 100644 --- a/Aaru.Generators/PluginRegisterGenerator.cs +++ b/Aaru.Generators/PluginRegisterGenerator.cs @@ -280,17 +280,17 @@ public class PluginRegisterGenerator : ISourceGenerator sealed class PluginFinder : ISyntaxReceiver { - public List Archives { get; } = new(); - public List Checksums { get; } = new(); - public List FileSystems { get; } = new(); - public List Filters { get; } = new(); - public List FloppyImagePlugins { get; } = new(); - public List MediaImagePlugins { get; } = new(); - public List PartitionPlugins { get; } = new(); - public List ReadOnlyFileSystems { get; } = new(); - public List WritableFloppyImagePlugins { get; } = new(); - public List WritableImagePlugins { get; } = new(); - public List ByteAddressableImagePlugins { get; } = new(); + public List Archives { get; } = []; + public List Checksums { get; } = []; + public List FileSystems { get; } = []; + public List Filters { get; } = []; + public List FloppyImagePlugins { get; } = []; + public List MediaImagePlugins { get; } = []; + public List PartitionPlugins { get; } = []; + public List ReadOnlyFileSystems { get; } = []; + public List WritableFloppyImagePlugins { get; } = []; + public List WritableImagePlugins { get; } = []; + public List ByteAddressableImagePlugins { get; } = []; public ClassDeclarationSyntax Register { get; private set; } #region ISyntaxReceiver Members @@ -309,41 +309,36 @@ public class PluginRegisterGenerator : ISourceGenerator .ValueText == "IArchive") == true) - { - if(!Archives.Contains(plugin.Identifier.Text)) Archives.Add(plugin.Identifier.Text); - } + if(!Archives.Contains(plugin.Identifier.Text)) + Archives.Add(plugin.Identifier.Text); if(plugin.BaseList?.Types.Any(t => ((t as SimpleBaseTypeSyntax)?.Type as IdentifierNameSyntax)?.Identifier .ValueText == "IChecksum") == true) - { - if(!Checksums.Contains(plugin.Identifier.Text)) Checksums.Add(plugin.Identifier.Text); - } + if(!Checksums.Contains(plugin.Identifier.Text)) + Checksums.Add(plugin.Identifier.Text); if(plugin.BaseList?.Types.Any(t => ((t as SimpleBaseTypeSyntax)?.Type as IdentifierNameSyntax)?.Identifier .ValueText == "IFilesystem") == true) - { - if(!FileSystems.Contains(plugin.Identifier.Text)) FileSystems.Add(plugin.Identifier.Text); - } + if(!FileSystems.Contains(plugin.Identifier.Text)) + FileSystems.Add(plugin.Identifier.Text); if(plugin.BaseList?.Types.Any(t => ((t as SimpleBaseTypeSyntax)?.Type as IdentifierNameSyntax)?.Identifier .ValueText == "IFilter") == true) - { - if(!Filters.Contains(plugin.Identifier.Text)) Filters.Add(plugin.Identifier.Text); - } + if(!Filters.Contains(plugin.Identifier.Text)) + Filters.Add(plugin.Identifier.Text); if(plugin.BaseList?.Types.Any(t => ((t as SimpleBaseTypeSyntax)?.Type as IdentifierNameSyntax)?.Identifier .ValueText == "IFloppyImage") == true) - { - if(!FloppyImagePlugins.Contains(plugin.Identifier.Text)) FloppyImagePlugins.Add(plugin.Identifier.Text); - } + if(!FloppyImagePlugins.Contains(plugin.Identifier.Text)) + FloppyImagePlugins.Add(plugin.Identifier.Text); if(plugin.BaseList?.Types.Any(t => ((t as SimpleBaseTypeSyntax)?.Type as IdentifierNameSyntax)?.Identifier .ValueText is "IMediaImage" @@ -351,17 +346,15 @@ public class PluginRegisterGenerator : ISourceGenerator or "IFloppyImage" or "ITapeImage") == true) - { - if(!MediaImagePlugins.Contains(plugin.Identifier.Text)) MediaImagePlugins.Add(plugin.Identifier.Text); - } + if(!MediaImagePlugins.Contains(plugin.Identifier.Text)) + MediaImagePlugins.Add(plugin.Identifier.Text); if(plugin.BaseList?.Types.Any(t => ((t as SimpleBaseTypeSyntax)?.Type as IdentifierNameSyntax)?.Identifier .ValueText == "IPartition") == true) - { - if(!PartitionPlugins.Contains(plugin.Identifier.Text)) PartitionPlugins.Add(plugin.Identifier.Text); - } + if(!PartitionPlugins.Contains(plugin.Identifier.Text)) + PartitionPlugins.Add(plugin.Identifier.Text); if(plugin.BaseList?.Types.Any(t => ((t as SimpleBaseTypeSyntax)?.Type as IdentifierNameSyntax)?.Identifier .ValueText == diff --git a/Aaru.Gui/ConsoleHandler.cs b/Aaru.Gui/ConsoleHandler.cs index 956e0a284..960eee961 100644 --- a/Aaru.Gui/ConsoleHandler.cs +++ b/Aaru.Gui/ConsoleHandler.cs @@ -65,7 +65,7 @@ static class ConsoleHandler } } - public static ObservableCollection Entries { get; } = new(); + public static ObservableCollection Entries { get; } = []; static void OnWriteExceptionEvent([NotNull] Exception ex) => Entries.Add(new LogEntry { diff --git a/Aaru.Gui/Models/DeviceModel.cs b/Aaru.Gui/Models/DeviceModel.cs index 70677b42b..c7e69964a 100644 --- a/Aaru.Gui/Models/DeviceModel.cs +++ b/Aaru.Gui/Models/DeviceModel.cs @@ -38,7 +38,7 @@ namespace Aaru.Gui.Models; public sealed class DeviceModel { - public DeviceModel() => Media = new ObservableCollection(); + public DeviceModel() => Media = []; public Bitmap Icon { get; set; } public string Name { get; set; } diff --git a/Aaru.Gui/Models/DevicesRootModel.cs b/Aaru.Gui/Models/DevicesRootModel.cs index 36c6d4fed..8ad2cdbae 100644 --- a/Aaru.Gui/Models/DevicesRootModel.cs +++ b/Aaru.Gui/Models/DevicesRootModel.cs @@ -36,7 +36,7 @@ namespace Aaru.Gui.Models; public sealed class DevicesRootModel : RootModel { - public DevicesRootModel() => Devices = new ObservableCollection(); + public DevicesRootModel() => Devices = []; public ObservableCollection Devices { get; } } \ No newline at end of file diff --git a/Aaru.Gui/Models/FileSystemModel.cs b/Aaru.Gui/Models/FileSystemModel.cs index d3e6055b8..2a535463f 100644 --- a/Aaru.Gui/Models/FileSystemModel.cs +++ b/Aaru.Gui/Models/FileSystemModel.cs @@ -38,7 +38,7 @@ namespace Aaru.Gui.Models; public sealed class FileSystemModel : RootModel { - public FileSystemModel() => Roots = new ObservableCollection(); + public FileSystemModel() => Roots = []; public string VolumeName { get; set; } public IFilesystem Filesystem { get; set; } diff --git a/Aaru.Gui/Models/ImageModel.cs b/Aaru.Gui/Models/ImageModel.cs index 78cef2628..7537dc295 100644 --- a/Aaru.Gui/Models/ImageModel.cs +++ b/Aaru.Gui/Models/ImageModel.cs @@ -39,7 +39,7 @@ namespace Aaru.Gui.Models; public sealed class ImageModel { - public ImageModel() => PartitionSchemesOrFileSystems = new ObservableCollection(); + public ImageModel() => PartitionSchemesOrFileSystems = []; public string Path { get; set; } public string FileName { get; set; } diff --git a/Aaru.Gui/Models/ImagesRootModel.cs b/Aaru.Gui/Models/ImagesRootModel.cs index cdd1e7ee8..e981f63bd 100644 --- a/Aaru.Gui/Models/ImagesRootModel.cs +++ b/Aaru.Gui/Models/ImagesRootModel.cs @@ -36,7 +36,7 @@ namespace Aaru.Gui.Models; public sealed class ImagesRootModel : RootModel { - public ImagesRootModel() => Images = new ObservableCollection(); + public ImagesRootModel() => Images = []; public ObservableCollection Images { get; } } \ No newline at end of file diff --git a/Aaru.Gui/Models/PartitionModel.cs b/Aaru.Gui/Models/PartitionModel.cs index 0b08c1603..213967aba 100644 --- a/Aaru.Gui/Models/PartitionModel.cs +++ b/Aaru.Gui/Models/PartitionModel.cs @@ -39,7 +39,7 @@ namespace Aaru.Gui.Models; public sealed class PartitionModel { - public PartitionModel() => FileSystems = new ObservableCollection(); + public PartitionModel() => FileSystems = []; public string Name { get; set; } public Bitmap Icon { get; set; } diff --git a/Aaru.Gui/Models/PartitionSchemeModel.cs b/Aaru.Gui/Models/PartitionSchemeModel.cs index b9469dd96..4d4532c26 100644 --- a/Aaru.Gui/Models/PartitionSchemeModel.cs +++ b/Aaru.Gui/Models/PartitionSchemeModel.cs @@ -37,7 +37,7 @@ namespace Aaru.Gui.Models; public sealed class PartitionSchemeModel : RootModel { - public PartitionSchemeModel() => Partitions = new ObservableCollection(); + public PartitionSchemeModel() => Partitions = []; public Bitmap Icon { get; set; } public ObservableCollection Partitions { get; } diff --git a/Aaru.Gui/Models/SubdirectoryModel.cs b/Aaru.Gui/Models/SubdirectoryModel.cs index 0d1ffc076..ee77fea7b 100644 --- a/Aaru.Gui/Models/SubdirectoryModel.cs +++ b/Aaru.Gui/Models/SubdirectoryModel.cs @@ -37,7 +37,7 @@ namespace Aaru.Gui.Models; public sealed class SubdirectoryModel { - public SubdirectoryModel() => Subdirectories = new ObservableCollection(); + public SubdirectoryModel() => Subdirectories = []; public string Name { get; set; } public string Path { get; set; } diff --git a/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs index 827f139d6..cc6dd1a75 100644 --- a/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs +++ b/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs @@ -63,7 +63,7 @@ public sealed class AboutViewModel : ViewModelBase LicenseCommand = ReactiveCommand.Create(ExecuteLicenseCommand); CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand); - Assemblies = new ObservableCollection(); + Assemblies = []; Task.Run(() => { diff --git a/Aaru.Gui/ViewModels/Dialogs/ConsoleViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/ConsoleViewModel.cs index de4198b8b..e6580c07f 100644 --- a/Aaru.Gui/ViewModels/Dialogs/ConsoleViewModel.cs +++ b/Aaru.Gui/ViewModels/Dialogs/ConsoleViewModel.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Reactive; @@ -99,10 +98,13 @@ public sealed class ConsoleViewModel : ViewModelBase dlgSave.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "log" - }), + Extensions = + [ + ..new[] + { + "log" + } + ], Name = UI.Dialog_Log_files }); diff --git a/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs index 380fc51eb..625abe84d 100644 --- a/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs +++ b/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs @@ -50,7 +50,7 @@ public sealed class EncodingsViewModel : ViewModelBase public EncodingsViewModel(Encodings view) { _view = view; - Encodings = new ObservableCollection(); + Encodings = []; CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand); Task.Run(() => diff --git a/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs index fb7184593..c57ad7249 100644 --- a/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs +++ b/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs @@ -50,14 +50,14 @@ public sealed class PluginsViewModel : ViewModelBase public PluginsViewModel(PluginsDialog view) { _view = view; - Filters = new ObservableCollection(); - PartitionSchemes = new ObservableCollection(); - Filesystems = new ObservableCollection(); - ReadOnlyFilesystems = new ObservableCollection(); - Images = new ObservableCollection(); - WritableImages = new ObservableCollection(); - FloppyImages = new ObservableCollection(); - WritableFloppyImages = new ObservableCollection(); + Filters = []; + PartitionSchemes = []; + Filesystems = []; + ReadOnlyFilesystems = []; + Images = []; + WritableImages = []; + FloppyImages = []; + WritableFloppyImages = []; CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand); // TODO: Takes too much time diff --git a/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs index 767a75a64..f9ac406ac 100644 --- a/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs +++ b/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs @@ -90,12 +90,12 @@ public sealed class StatisticsViewModel : ViewModelBase public StatisticsViewModel(StatisticsDialog view) { _view = view; - Filters = new ObservableCollection(); - Formats = new ObservableCollection(); - Partitions = new ObservableCollection(); - Filesystems = new ObservableCollection(); - Devices = new ObservableCollection(); - Medias = new ObservableCollection(); + Filters = []; + Formats = []; + Partitions = []; + Filesystems = []; + Devices = []; + Medias = []; CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand); using var ctx = AaruContext.Create(Settings.Settings.LocalDbPath); diff --git a/Aaru.Gui/ViewModels/Panels/DeviceInfoViewModel.cs b/Aaru.Gui/ViewModels/Panels/DeviceInfoViewModel.cs index 081b6a8b2..fca3d0b8f 100644 --- a/Aaru.Gui/ViewModels/Panels/DeviceInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Panels/DeviceInfoViewModel.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using System.IO; using System.Reactive; using System.Threading.Tasks; @@ -1023,10 +1022,13 @@ public sealed class DeviceInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); diff --git a/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs b/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs index 5aa78b367..86c8a8cdf 100644 --- a/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs @@ -81,11 +81,11 @@ public sealed class ImageInfoViewModel : ViewModelBase _imagePath = imagePath; _filter = filter; _imageFormat = imageFormat; - MediaTagsList = new ObservableCollection(); - SectorTagsList = new ObservableCollection(); - Sessions = new ObservableCollection(); - Tracks = new ObservableCollection(); - DumpHardwareList = new ObservableCollection(); + MediaTagsList = []; + SectorTagsList = []; + Sessions = []; + Tracks = []; + DumpHardwareList = []; EntropyCommand = ReactiveCommand.Create(ExecuteEntropyCommand); VerifyCommand = ReactiveCommand.Create(ExecuteVerifyCommand); ChecksumCommand = ReactiveCommand.Create(ExecuteChecksumCommand); @@ -694,9 +694,8 @@ public sealed class ImageInfoViewModel : ViewModelBase try { if(opticalMediaImage.Sessions is { Count: > 0 }) - { - foreach(Session session in opticalMediaImage.Sessions) Sessions.Add(session); - } + foreach(Session session in opticalMediaImage.Sessions) + Sessions.Add(session); } catch { @@ -706,9 +705,8 @@ public sealed class ImageInfoViewModel : ViewModelBase try { if(opticalMediaImage.Tracks is { Count: > 0 }) - { - foreach(Track track in opticalMediaImage.Tracks) Tracks.Add(track); - } + foreach(Track track in opticalMediaImage.Tracks) + Tracks.Add(track); } catch { diff --git a/Aaru.Gui/ViewModels/Panels/MediaInfoViewModel.cs b/Aaru.Gui/ViewModels/Panels/MediaInfoViewModel.cs index 7273eb249..5f2aec40f 100644 --- a/Aaru.Gui/ViewModels/Panels/MediaInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Panels/MediaInfoViewModel.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using System.IO; using System.Reactive; using System.Text; @@ -393,10 +392,13 @@ public sealed class MediaInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); diff --git a/Aaru.Gui/ViewModels/Panels/SubdirectoryViewModel.cs b/Aaru.Gui/ViewModels/Panels/SubdirectoryViewModel.cs index b34d3b1d0..3056afa2c 100644 --- a/Aaru.Gui/ViewModels/Panels/SubdirectoryViewModel.cs +++ b/Aaru.Gui/ViewModels/Panels/SubdirectoryViewModel.cs @@ -61,8 +61,8 @@ public sealed class SubdirectoryViewModel public SubdirectoryViewModel([NotNull] SubdirectoryModel model, Window view) { - Entries = new ObservableCollection(); - SelectedEntries = new List(); + Entries = []; + SelectedEntries = []; ExtractFilesCommand = ReactiveCommand.Create(ExecuteExtractFilesCommand); _model = model; _view = view; diff --git a/Aaru.Gui/ViewModels/Tabs/AtaInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/AtaInfoViewModel.cs index 7f9a6c25e..b4a7e5db1 100644 --- a/Aaru.Gui/ViewModels/Tabs/AtaInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/AtaInfoViewModel.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; using System.Reactive; using System.Threading.Tasks; @@ -117,10 +116,13 @@ public sealed class AtaInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -143,10 +145,13 @@ public sealed class AtaInfoViewModel : ViewModelBase dlgSaveText.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.txt" - }), + Extensions = + [ + ..new[] + { + "*.txt" + } + ], Name = UI.Dialog_Text_files }); diff --git a/Aaru.Gui/ViewModels/Tabs/BlurayInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/BlurayInfoViewModel.cs index 1316d30b8..87dd35109 100644 --- a/Aaru.Gui/ViewModels/Tabs/BlurayInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/BlurayInfoViewModel.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; using System.Reactive; using System.Threading.Tasks; @@ -179,10 +178,13 @@ public sealed class BlurayInfoViewModel dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); diff --git a/Aaru.Gui/ViewModels/Tabs/CompactDiscInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/CompactDiscInfoViewModel.cs index b3b62bb89..e9e5fbc54 100644 --- a/Aaru.Gui/ViewModels/Tabs/CompactDiscInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/CompactDiscInfoViewModel.cs @@ -70,7 +70,7 @@ public sealed class CompactDiscInfoViewModel : ViewModelBase _pmaData = pma; _cdTextLeadInData = cdTextLeadIn; _view = view; - IsrcList = new ObservableCollection(); + IsrcList = []; SaveCdInformationCommand = ReactiveCommand.Create(ExecuteSaveCdInformationCommand); SaveCdTocCommand = ReactiveCommand.Create(ExecuteSaveCdTocCommand); SaveCdFullTocCommand = ReactiveCommand.Create(ExecuteSaveCdFullTocCommand); @@ -153,10 +153,13 @@ public sealed class CompactDiscInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -176,10 +179,13 @@ public sealed class CompactDiscInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -199,10 +205,13 @@ public sealed class CompactDiscInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -222,10 +231,13 @@ public sealed class CompactDiscInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -245,10 +257,13 @@ public sealed class CompactDiscInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -268,10 +283,13 @@ public sealed class CompactDiscInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -291,10 +309,13 @@ public sealed class CompactDiscInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); diff --git a/Aaru.Gui/ViewModels/Tabs/DvdInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/DvdInfoViewModel.cs index 70d02b730..88e43b78f 100644 --- a/Aaru.Gui/ViewModels/Tabs/DvdInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/DvdInfoViewModel.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; using System.Reactive; using System.Threading.Tasks; @@ -129,10 +128,13 @@ public sealed class DvdInfoViewModel dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); diff --git a/Aaru.Gui/ViewModels/Tabs/DvdWritableInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/DvdWritableInfoViewModel.cs index 3b40ea72b..4b9b87fe0 100644 --- a/Aaru.Gui/ViewModels/Tabs/DvdWritableInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/DvdWritableInfoViewModel.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; using System.Reactive; using System.Threading.Tasks; @@ -255,10 +254,13 @@ public sealed class DvdWritableInfoViewModel dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); diff --git a/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs index 847252b9f..eb25de710 100644 --- a/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Reactive; @@ -58,7 +57,7 @@ public class PcmciaInfoViewModel : ViewModelBase if(pcmciaCis == null) return; _cis = pcmciaCis; - CisList = new ObservableCollection(); + CisList = []; SavePcmciaCisCommand = ReactiveCommand.Create(ExecuteSavePcmciaCisCommand); _view = view; @@ -180,10 +179,13 @@ public class PcmciaInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); diff --git a/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs index 2647da77f..a266e1ae0 100644 --- a/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs @@ -72,9 +72,9 @@ public sealed class ScsiInfoViewModel : ViewModelBase _scsiModeSense10 = scsiModeSense10; _configuration = mmcConfiguration; _view = view; - ModeSensePages = new ObservableCollection(); - EvpdPages = new ObservableCollection(); - MmcFeatures = new ObservableCollection(); + ModeSensePages = []; + EvpdPages = []; + MmcFeatures = []; SaveInquiryBinaryCommand = ReactiveCommand.Create(ExecuteSaveInquiryBinaryCommand); SaveInquiryTextCommand = ReactiveCommand.Create(ExecuteSaveInquiryTextCommand); SaveModeSense6Command = ReactiveCommand.Create(ExecuteSaveModeSense6Command); @@ -805,10 +805,13 @@ public sealed class ScsiInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -828,10 +831,13 @@ public sealed class ScsiInfoViewModel : ViewModelBase dlgSaveText.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.txt" - }), + Extensions = + [ + ..new[] + { + "*.txt" + } + ], Name = UI.Dialog_Text_files }); @@ -851,10 +857,13 @@ public sealed class ScsiInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -874,10 +883,13 @@ public sealed class ScsiInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -899,10 +911,13 @@ public sealed class ScsiInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); @@ -922,10 +937,13 @@ public sealed class ScsiInfoViewModel : ViewModelBase dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); diff --git a/Aaru.Gui/ViewModels/Tabs/XboxInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/XboxInfoViewModel.cs index 0ab4744c4..83a980b41 100644 --- a/Aaru.Gui/ViewModels/Tabs/XboxInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/XboxInfoViewModel.cs @@ -30,7 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; using System.Reactive; using System.Threading.Tasks; @@ -106,10 +105,13 @@ public sealed class XboxInfoViewModel dlgSaveBinary.Filters?.Add(new FileDialogFilter { - Extensions = new List(new[] - { - "*.bin" - }), + Extensions = + [ + ..new[] + { + "*.bin" + } + ], Name = UI.Dialog_Binary_files }); diff --git a/Aaru.Gui/ViewModels/Windows/DecodeMediaTagsViewModel.cs b/Aaru.Gui/ViewModels/Windows/DecodeMediaTagsViewModel.cs index edd40c1c0..19d953bd2 100644 --- a/Aaru.Gui/ViewModels/Windows/DecodeMediaTagsViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/DecodeMediaTagsViewModel.cs @@ -68,7 +68,7 @@ public sealed class DecodeMediaTagsViewModel : ViewModelBase public DecodeMediaTagsViewModel([NotNull] IMediaImage inputFormat) { - TagsList = new ObservableCollection(); + TagsList = []; _mediaType = inputFormat.Info.MediaType; diff --git a/Aaru.Gui/ViewModels/Windows/ImageChecksumViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageChecksumViewModel.cs index e41263839..d65c7761d 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageChecksumViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageChecksumViewModel.cs @@ -107,8 +107,8 @@ public sealed class ImageChecksumViewModel : ViewModelBase Md5Checked = true; Sha1Checked = true; SpamsumChecked = true; - TrackChecksums = new ObservableCollection(); - MediaChecksums = new ObservableCollection(); + TrackChecksums = []; + MediaChecksums = []; StartCommand = ReactiveCommand.Create(ExecuteStartCommand); CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand); StopCommand = ReactiveCommand.Create(ExecuteStopCommand); diff --git a/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs index 48a8d7abb..174df27a4 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs @@ -1145,7 +1145,7 @@ public sealed class ImageConvertViewModel : ViewModelBase Dictionary isrcs = new(); Dictionary trackFlags = new(); string mcn = null; - HashSet subchannelExtents = new(); + HashSet subchannelExtents = []; Dictionary smallestPregapLbaPerTrack = new(); foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags.Where(t => t == SectorTagType.CdTrackIsrc) @@ -1436,12 +1436,7 @@ public sealed class ImageConvertViewModel : ViewModelBase { foreach(KeyValuePair flags in trackFlags) { - outputOptical.WriteSectorTag(new[] - { - flags.Value - }, - flags.Key, - SectorTagType.CdTrackFlags); + outputOptical.WriteSectorTag([flags.Value], flags.Key, SectorTagType.CdTrackFlags); } } @@ -2130,10 +2125,13 @@ public sealed class ImageConvertViewModel : ViewModelBase dlgMetadata.Filters?.Add(new FileDialogFilter { Name = UI.Dialog_Aaru_Metadata, - Extensions = new List(new[] - { - ".json" - }) + Extensions = + [ + ..new[] + { + ".json" + } + ] }); string[] result = await dlgMetadata.ShowAsync(_view); @@ -2178,10 +2176,13 @@ public sealed class ImageConvertViewModel : ViewModelBase dlgMetadata.Filters?.Add(new FileDialogFilter { Name = UI.Dialog_Choose_existing_resume_file, - Extensions = new List(new[] - { - ".json" - }) + Extensions = + [ + ..new[] + { + ".json" + } + ] }); string[] result = await dlgMetadata.ShowAsync(_view); diff --git a/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs index dd150ae86..194b654e1 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs @@ -86,7 +86,7 @@ public sealed class ImageEntropyViewModel : ViewModelBase { _inputFormat = inputFormat; _view = view; - TrackEntropy = new ObservableCollection(); + TrackEntropy = []; StartCommand = ReactiveCommand.Create(ExecuteStartCommand); CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand); StopCommand = ReactiveCommand.Create(ExecuteStopCommand); diff --git a/Aaru.Gui/ViewModels/Windows/ImageSidecarViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageSidecarViewModel.cs index e530fd5df..730291913 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageSidecarViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageSidecarViewModel.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Reactive; @@ -331,10 +330,13 @@ public sealed class ImageSidecarViewModel : ViewModelBase dlgDestination.Filters?.Add(new FileDialogFilter { Name = UI.Dialog_Aaru_Metadata, - Extensions = new List(new[] - { - "*.json" - }) + Extensions = + [ + ..new[] + { + "*.json" + } + ] }); string result = await dlgDestination.ShowAsync(_view); diff --git a/Aaru.Gui/ViewModels/Windows/ImageVerifyViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageVerifyViewModel.cs index 52e335619..0bcbe48a1 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageVerifyViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageVerifyViewModel.cs @@ -100,8 +100,8 @@ public sealed class ImageVerifyViewModel : ViewModelBase StopCommand = ReactiveCommand.Create(ExecuteStopCommand); _inputFormat = inputFormat; _cancel = false; - ErrorList = new ObservableCollection(); - UnknownList = new ObservableCollection(); + ErrorList = []; + UnknownList = []; VerifyImageEnabled = true; VerifySectorsEnabled = true; CloseVisible = true; @@ -447,8 +447,8 @@ public sealed class ImageVerifyViewModel : ViewModelBase if(VerifySectorsChecked) { var chkStopwatch = new Stopwatch(); - List failingLbas = new(); - List unknownLbas = new(); + List failingLbas = []; + List unknownLbas = []; await Dispatcher.UIThread.InvokeAsync(() => { diff --git a/Aaru.Gui/ViewModels/Windows/MainWindowViewModel.cs b/Aaru.Gui/ViewModels/Windows/MainWindowViewModel.cs index 59b9b47a7..ec9e01b5c 100644 --- a/Aaru.Gui/ViewModels/Windows/MainWindowViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/MainWindowViewModel.cs @@ -108,7 +108,7 @@ public sealed class MainWindowViewModel : ViewModelBase DecodeImageMediaTagsCommand = ReactiveCommand.Create(ExecuteDecodeImageMediaTagsCommand); RefreshDevicesCommand = ReactiveCommand.Create(ExecuteRefreshDevicesCommand); _view = view; - TreeRoot = new ObservableCollection(); + TreeRoot = []; ContentPanel = Greeting; _imagesRoot = new ImagesRootModel diff --git a/Aaru.Gui/ViewModels/Windows/MediaDumpViewModel.cs b/Aaru.Gui/ViewModels/Windows/MediaDumpViewModel.cs index 0e0030b1d..92c598608 100644 --- a/Aaru.Gui/ViewModels/Windows/MediaDumpViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/MediaDumpViewModel.cs @@ -125,8 +125,8 @@ public sealed class MediaDumpViewModel : ViewModelBase CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand); StopCommand = ReactiveCommand.Create(ExecuteStopCommand); DestinationCommand = ReactiveCommand.Create(ExecuteDestinationCommand); - PluginsList = new ObservableCollection(); - Encodings = new ObservableCollection(); + PluginsList = []; + Encodings = []; // Defaults StopOnError = false; @@ -519,10 +519,13 @@ public sealed class MediaDumpViewModel : ViewModelBase dlgMetadata.Filters?.Add(new FileDialogFilter { Name = UI.Dialog_Aaru_Metadata, - Extensions = new List(new[] - { - ".json" - }) + Extensions = + [ + ..new[] + { + ".json" + } + ] }); string[] result = dlgMetadata.ShowAsync(_view).Result; diff --git a/Aaru.Gui/ViewModels/Windows/MediaScanViewModel.cs b/Aaru.Gui/ViewModels/Windows/MediaScanViewModel.cs index 6a7e3f64c..175d64408 100644 --- a/Aaru.Gui/ViewModels/Windows/MediaScanViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/MediaScanViewModel.cs @@ -108,7 +108,7 @@ public sealed class MediaScanViewModel : ViewModelBase StopCommand = ReactiveCommand.Create(ExecuteStopCommand); StartVisible = true; CloseVisible = true; - BlockMapList = new ObservableCollection<(ulong block, double duration)>(); + BlockMapList = []; // ChartPoints = new ObservableCollection(); StepsX = double.NaN; diff --git a/Aaru.Helpers/ArrayFill.cs b/Aaru.Helpers/ArrayFill.cs index 99aec08d6..94b136909 100644 --- a/Aaru.Helpers/ArrayFill.cs +++ b/Aaru.Helpers/ArrayFill.cs @@ -35,11 +35,7 @@ public static partial class ArrayHelpers /// Array /// Value /// Array type - public static void ArrayFill(T[] destinationArray, T value) => ArrayFill(destinationArray, - new[] - { - value - }); + public static void ArrayFill(T[] destinationArray, T value) => ArrayFill(destinationArray, [value]); /// Fills an array with the contents of the specified array /// Array diff --git a/Aaru.Helpers/Marshal.cs b/Aaru.Helpers/Marshal.cs index 9f113712b..e6fe94e75 100644 --- a/Aaru.Helpers/Marshal.cs +++ b/Aaru.Helpers/Marshal.cs @@ -328,12 +328,7 @@ public static class Marshal var flt = (float)(fi.GetValue(str) ?? default(float)); byte[] flt_b = BitConverter.GetBytes(flt); - fi.SetValue(str, - BitConverter.ToSingle(new[] - { - flt_b[3], flt_b[2], flt_b[1], flt_b[0] - }, - 0)); + fi.SetValue(str, BitConverter.ToSingle([flt_b[3], flt_b[2], flt_b[1], flt_b[0]], 0)); } else if(fi.FieldType == typeof(double)) { @@ -341,11 +336,10 @@ public static class Marshal byte[] dbl_b = BitConverter.GetBytes(dbl); fi.SetValue(str, - BitConverter.ToDouble(new[] - { + BitConverter.ToDouble([ dbl_b[7], dbl_b[6], dbl_b[5], dbl_b[4], dbl_b[3], dbl_b[2], dbl_b[1], dbl_b[0] - }, + ], 0)); } else if(fi.FieldType == typeof(byte) || fi.FieldType == typeof(sbyte)) diff --git a/Aaru.Images/A2R/A2R.cs b/Aaru.Images/A2R/A2R.cs index bddd0df76..1a2ad5fa3 100644 --- a/Aaru.Images/A2R/A2R.cs +++ b/Aaru.Images/A2R/A2R.cs @@ -36,7 +36,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -67,8 +66,8 @@ public sealed partial class A2R : IFluxImage, IMediaImage, IWritableImage, IWrit public A2R() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/A2R/Constants.cs b/Aaru.Images/A2R/Constants.cs index 26c41afc7..e4134e782 100644 --- a/Aaru.Images/A2R/Constants.cs +++ b/Aaru.Images/A2R/Constants.cs @@ -38,37 +38,37 @@ namespace Aaru.Images; public sealed partial class A2R { readonly byte[] _a2Rv2Signature = - { + [ 0x41, 0x32, 0x52, 0x32 // A2R2 - }; + ]; readonly byte[] _a2Rv3Signature = - { + [ 0x41, 0x32, 0x52, 0x33 // A2R3 - }; + ]; readonly byte[] _infoChunkSignature = - { + [ 0x49, 0x4E, 0x46, 0x4F // INFO - }; + ]; readonly byte[] _metaChunkSignature = - { + [ 0x4D, 0x45, 0x54, 0x41 // META - }; + ]; readonly byte[] _rwcpChunkSignature = - { + [ 0x52, 0x57, 0x43, 0x50 // RWCP - }; + ]; readonly byte[] _slvdChunkSignature = - { + [ 0x53, 0x4C, 0x56, 0x44 // SLVD - }; + ]; readonly byte[] _strmChunkSignature = - { + [ 0x53, 0x54, 0x52, 0x4D // STRM - }; + ]; } \ No newline at end of file diff --git a/Aaru.Images/A2R/Helpers.cs b/Aaru.Images/A2R/Helpers.cs index 8484c9639..a664c1c93 100644 --- a/Aaru.Images/A2R/Helpers.cs +++ b/Aaru.Images/A2R/Helpers.cs @@ -112,10 +112,7 @@ public sealed partial class A2R if(over == 0) { - return new[] - { - (byte)ticks - }; + return [(byte)ticks]; } var expanded = new byte[over + 1]; @@ -134,7 +131,7 @@ public sealed partial class A2R /// The uint flux representation static List FluxRepresentationsToUInt32List(IEnumerable flux) { - List scpData = new(); + List scpData = []; uint tick = 0; foreach(byte b in flux) diff --git a/Aaru.Images/A2R/Read.cs b/Aaru.Images/A2R/Read.cs index 855eb6aa7..dd476d1ba 100644 --- a/Aaru.Images/A2R/Read.cs +++ b/Aaru.Images/A2R/Read.cs @@ -214,7 +214,7 @@ public sealed partial class A2R } } - _a2RCaptures = new List(); + _a2RCaptures = []; while(_a2RStream.Position < _a2RStream.Length) { @@ -416,11 +416,7 @@ public sealed partial class A2R { buffer = null; - List tmpBuffer = new() - { - // A2R always starts at index signal - 0 - }; + List tmpBuffer = [0]; StreamCapture capture = StreamCaptureAtIndex(head, track, subTrack, captureIndex); diff --git a/Aaru.Images/A2R/Write.cs b/Aaru.Images/A2R/Write.cs index 250395472..2fe888039 100644 --- a/Aaru.Images/A2R/Write.cs +++ b/Aaru.Images/A2R/Write.cs @@ -273,10 +273,7 @@ public sealed partial class A2R _writingStream.WriteByte(1); _writingStream.Write(BitConverter.GetBytes(_currentResolution), 0, 4); - byte[] reserved = - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; + byte[] reserved = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; _writingStream.Write(reserved, 0, 11); diff --git a/Aaru.Images/AaruFormat/AaruFormat.cs b/Aaru.Images/AaruFormat/AaruFormat.cs index 151ea2e32..3fa839fa0 100644 --- a/Aaru.Images/AaruFormat/AaruFormat.cs +++ b/Aaru.Images/AaruFormat/AaruFormat.cs @@ -167,8 +167,8 @@ public sealed partial class AaruFormat : IWritableOpticalImage, IVerifiableImage public AaruFormat() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/AaruFormat/Read.cs b/Aaru.Images/AaruFormat/Read.cs index 165532c3f..750d16c58 100644 --- a/Aaru.Images/AaruFormat/Read.cs +++ b/Aaru.Images/AaruFormat/Read.cs @@ -122,7 +122,7 @@ public sealed partial class AaruFormat AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Memory_snapshot_0_bytes, GC.GetTotalMemory(false)); // Fill in-memory index - _index = new List(); + _index = []; for(ulong i = 0; i < idxHeader2.entries; i++) { @@ -149,7 +149,7 @@ public sealed partial class AaruFormat AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Memory_snapshot_0_bytes, GC.GetTotalMemory(false)); // Fill in-memory index - _index = new List(); + _index = []; for(ushort i = 0; i < idxHeader.entries; i++) { @@ -899,7 +899,7 @@ public sealed partial class AaruFormat _imageStream.Position -= _structureBytes.Length; - Tracks = new List(); + Tracks = []; _trackFlags = new Dictionary(); _trackIsrcs = new Dictionary(); @@ -1084,7 +1084,7 @@ public sealed partial class AaruFormat _imageStream.Position -= _structureBytes.Length; - DumpHardware = new List(); + DumpHardware = []; for(ushort i = 0; i < dumpBlock.entries; i++) { @@ -1097,7 +1097,7 @@ public sealed partial class AaruFormat var dump = new DumpHardware { Software = new Software(), - Extents = new List() + Extents = [] }; byte[] tmp; @@ -1212,7 +1212,7 @@ public sealed partial class AaruFormat Span tapePartitions = MemoryMarshal.Cast(tapePartitionBytes); - TapePartitions = new List(); + TapePartitions = []; foreach(TapePartitionEntry tapePartition in tapePartitions) { @@ -1244,7 +1244,7 @@ public sealed partial class AaruFormat var tapeFileBytes = new byte[fileHeader.length]; _imageStream.EnsureRead(tapeFileBytes, 0, tapeFileBytes.Length); Span tapeFiles = MemoryMarshal.Cast(tapeFileBytes); - Files = new List(); + Files = []; foreach(TapeFileEntry file in tapeFiles) { @@ -1296,7 +1296,7 @@ public sealed partial class AaruFormat _imageStream.Position -= _structureBytes.Length; - compactDiscIndexes = new List(); + compactDiscIndexes = []; AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Found_0_compact_disc_indexes_at_position_1, @@ -1475,9 +1475,9 @@ public sealed partial class AaruFormat if(Tracks == null || Tracks.Count == 0) { - Tracks = new List - { - new() + Tracks = + [ + new Track { BytesPerSector = (int)_imageInfo.SectorSize, EndSector = _imageInfo.Sectors - 1, @@ -1489,7 +1489,7 @@ public sealed partial class AaruFormat Sequence = 1, Type = TrackType.Data } - }; + ]; _trackFlags = new Dictionary { @@ -1503,7 +1503,7 @@ public sealed partial class AaruFormat AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Memory_snapshot_0_bytes, GC.GetTotalMemory(false)); - Sessions = new List(); + Sessions = []; for(var i = 1; i <= Tracks.Max(t => t.Session); i++) { @@ -1547,7 +1547,7 @@ public sealed partial class AaruFormat } ulong currentTrackOffset = 0; - Partitions = new List(); + Partitions = []; foreach(Track track in Tracks.OrderBy(t => t.StartSector)) { @@ -1896,10 +1896,7 @@ public sealed partial class AaruFormat case SectorTagType.CdTrackFlags: if(!_trackFlags.TryGetValue((byte)sectorAddress, out byte flags)) return ErrorNumber.NoData; - buffer = new[] - { - flags - }; + buffer = [flags]; return ErrorNumber.NoError; case SectorTagType.CdTrackIsrc: diff --git a/Aaru.Images/AaruFormat/Tape.cs b/Aaru.Images/AaruFormat/Tape.cs index 4c28c7ed9..f02e3154f 100644 --- a/Aaru.Images/AaruFormat/Tape.cs +++ b/Aaru.Images/AaruFormat/Tape.cs @@ -80,8 +80,8 @@ public sealed partial class AaruFormat /// public bool SetTape() { - Files = new List(); - TapePartitions = new List(); + Files = []; + TapePartitions = []; return IsTape = true; } diff --git a/Aaru.Images/AaruFormat/Verify.cs b/Aaru.Images/AaruFormat/Verify.cs index e96e26fa3..f25095c55 100644 --- a/Aaru.Images/AaruFormat/Verify.cs +++ b/Aaru.Images/AaruFormat/Verify.cs @@ -83,7 +83,7 @@ public sealed partial class AaruFormat _imageStream.Position -= _structureBytes.Length; - List vrIndex = new(); + List vrIndex = []; for(ushort i = 0; i < idxHeader.entries; i++) { @@ -241,8 +241,8 @@ public sealed partial class AaruFormat public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; // Right now only CompactDisc sectors are verifiable if(_imageInfo.MetadataMediaType != MetadataMediaType.OpticalDisc) @@ -258,8 +258,8 @@ public sealed partial class AaruFormat var bps = (int)(buffer.Length / length); var sector = new byte[bps]; - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; for(var i = 0; i < length; i++) { @@ -291,16 +291,16 @@ public sealed partial class AaruFormat // Right now only CompactDisc sectors are verifiable if(_imageInfo.MetadataMediaType != MetadataMediaType.OpticalDisc) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; for(ulong i = sectorAddress; i < sectorAddress + length; i++) unknownLbas.Add(i); return null; } - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); diff --git a/Aaru.Images/AaruFormat/Write.cs b/Aaru.Images/AaruFormat/Write.cs index 3d7c95f21..7c3a52b25 100644 --- a/Aaru.Images/AaruFormat/Write.cs +++ b/Aaru.Images/AaruFormat/Write.cs @@ -296,13 +296,13 @@ public sealed partial class AaruFormat _header.applicationMinorVersion = (byte)typeof(AaruFormat).Assembly.GetName().Version.Minor; // Initialize tables - _index = new List(); + _index = []; _mediaTags = new Dictionary(); _checksumProvider = SHA256.Create(); _deduplicationTable = new Dictionary(); _trackIsrcs = new Dictionary(); _trackFlags = new Dictionary(); - _imageInfo.ReadableSectorTags = new List(); + _imageInfo.ReadableSectorTags = []; // If there exists an index, we are appending, so read index if(_header.indexOffset > 0) @@ -1091,7 +1091,7 @@ public sealed partial class AaruFormat _imageStream.Position -= _structureBytes.Length; - Tracks = new List(); + Tracks = []; _trackFlags = new Dictionary(); _trackIsrcs = new Dictionary(); @@ -1262,7 +1262,7 @@ public sealed partial class AaruFormat _imageStream.Position -= _structureBytes.Length; - DumpHardware = new List(); + DumpHardware = []; for(ushort i = 0; i < dumpBlock.entries; i++) { @@ -1275,7 +1275,7 @@ public sealed partial class AaruFormat var dump = new DumpHardware { Software = new Software(), - Extents = new List() + Extents = [] }; byte[] tmp; @@ -1386,7 +1386,7 @@ public sealed partial class AaruFormat Span tapePartitions = MemoryMarshal.Cast(tapePartitionBytes); - TapePartitions = new List(); + TapePartitions = []; foreach(TapePartitionEntry tapePartition in tapePartitions) { @@ -1419,7 +1419,7 @@ public sealed partial class AaruFormat var tapeFileBytes = new byte[fileHeader.length]; _imageStream.EnsureRead(tapeFileBytes, 0, tapeFileBytes.Length); Span tapeFiles = MemoryMarshal.Cast(tapeFileBytes); - Files = new List(); + Files = []; foreach(TapeFileEntry file in tapeFiles) { @@ -1471,7 +1471,7 @@ public sealed partial class AaruFormat _imageStream.Position -= _structureBytes.Length; - compactDiscIndexes = new List(); + compactDiscIndexes = []; AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Found_0_compact_disc_indexes_at_position_1, @@ -1597,9 +1597,9 @@ public sealed partial class AaruFormat if(Tracks == null || Tracks.Count == 0) { - Tracks = new List - { - new() + Tracks = + [ + new Track { BytesPerSector = (int)_imageInfo.SectorSize, EndSector = _imageInfo.Sectors - 1, @@ -1609,7 +1609,7 @@ public sealed partial class AaruFormat Sequence = 1, Type = TrackType.Data } - }; + ]; _trackFlags = new Dictionary { @@ -1623,7 +1623,7 @@ public sealed partial class AaruFormat AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Memory_snapshot_0_bytes, GC.GetTotalMemory(false)); - Sessions = new List(); + Sessions = []; for(var i = 1; i <= Tracks.Max(t => t.Session); i++) { @@ -1660,7 +1660,7 @@ public sealed partial class AaruFormat } ulong currentTrackOffset = 0; - Partitions = new List(); + Partitions = []; foreach(Track track in Tracks.OrderBy(t => t.StartSector)) { @@ -1908,7 +1908,7 @@ public sealed partial class AaruFormat var cmpCrc64Context = new Crc64Context(); - byte[] lzmaProperties = Array.Empty(); + byte[] lzmaProperties = []; var compressedLength = 0; switch(_currentBlockHeader.compression) @@ -2702,7 +2702,7 @@ public sealed partial class AaruFormat var cmpCrc64Context = new Crc64Context(); - byte[] lzmaProperties = Array.Empty(); + byte[] lzmaProperties = []; var compressedLength = 0; switch(_currentBlockHeader.compression) @@ -3748,7 +3748,7 @@ public sealed partial class AaruFormat var cmpBuffer = new byte[ddtEntries.Length + 262144]; int cmpLen; - byte[] lzmaProperties = Array.Empty(); + byte[] lzmaProperties = []; switch(_compressionAlgorithm) { @@ -4820,8 +4820,8 @@ public sealed partial class AaruFormat blockStream.Close(); } - List trackEntries = new(); - List compactDiscIndexEntries = new(); + List trackEntries = []; + List compactDiscIndexEntries = []; foreach(Track track in Tracks) { @@ -5126,12 +5126,7 @@ public sealed partial class AaruFormat metadataBlock.creatorLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.Comments)) @@ -5142,12 +5137,7 @@ public sealed partial class AaruFormat metadataBlock.commentsLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.MediaTitle)) @@ -5158,12 +5148,7 @@ public sealed partial class AaruFormat metadataBlock.mediaTitleLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.MediaManufacturer)) @@ -5174,12 +5159,7 @@ public sealed partial class AaruFormat metadataBlock.mediaManufacturerLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.MediaModel)) @@ -5190,12 +5170,7 @@ public sealed partial class AaruFormat metadataBlock.mediaModelLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.MediaSerialNumber)) @@ -5206,12 +5181,7 @@ public sealed partial class AaruFormat metadataBlock.mediaSerialNumberLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.MediaBarcode)) @@ -5222,12 +5192,7 @@ public sealed partial class AaruFormat metadataBlock.mediaBarcodeLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.MediaPartNumber)) @@ -5238,12 +5203,7 @@ public sealed partial class AaruFormat metadataBlock.mediaPartNumberLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.DriveManufacturer)) @@ -5254,12 +5214,7 @@ public sealed partial class AaruFormat metadataBlock.driveManufacturerLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.DriveModel)) @@ -5270,12 +5225,7 @@ public sealed partial class AaruFormat metadataBlock.driveModelLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.DriveSerialNumber)) @@ -5286,12 +5236,7 @@ public sealed partial class AaruFormat metadataBlock.driveSerialNumberLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } if(!string.IsNullOrWhiteSpace(_imageInfo.DriveFirmwareRevision)) @@ -5302,12 +5247,7 @@ public sealed partial class AaruFormat metadataBlock.driveFirmwareRevisionLength = (uint)(tmpUtf16Le.Length + 2); blockStream.Write(tmpUtf16Le, 0, tmpUtf16Le.Length); - blockStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + blockStream.Write([0, 0], 0, 2); } // Check if we set up any metadata earlier, then write its block diff --git a/Aaru.Images/Alcohol120/Alcohol120.cs b/Aaru.Images/Alcohol120/Alcohol120.cs index 871445c54..f99b30ee6 100644 --- a/Aaru.Images/Alcohol120/Alcohol120.cs +++ b/Aaru.Images/Alcohol120/Alcohol120.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -64,8 +63,8 @@ public sealed partial class Alcohol120 : IWritableOpticalImage public Alcohol120() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = true, HasSessions = true, Version = null, diff --git a/Aaru.Images/Alcohol120/Properties.cs b/Aaru.Images/Alcohol120/Properties.cs index 65e8eab09..81800a35f 100644 --- a/Aaru.Images/Alcohol120/Properties.cs +++ b/Aaru.Images/Alcohol120/Properties.cs @@ -86,7 +86,7 @@ public sealed partial class Alcohol120 { if(_writingTracks != null && _alcTracks == null) return _writingTracks; - List tracks = new(); + List tracks = []; _alcTracks ??= new Dictionary(); foreach(Track alcTrack in _alcTracks.Values) diff --git a/Aaru.Images/Alcohol120/Read.cs b/Aaru.Images/Alcohol120/Read.cs index d45837958..29ef1a10b 100644 --- a/Aaru.Images/Alcohol120/Read.cs +++ b/Aaru.Images/Alcohol120/Read.cs @@ -387,7 +387,7 @@ public sealed partial class Alcohol120 _imageInfo.MediaType = MediumTypeToMediaType(_header.type); - Sessions = new List(); + Sessions = []; foreach(Session alcSes in _alcSessions.Values) { @@ -531,7 +531,7 @@ public sealed partial class Alcohol120 AaruConsole.DebugWriteLine(MODULE_NAME, "ImageInfo.mediaType = {0}", _imageInfo.MediaType); - Partitions = new List(); + Partitions = []; _offsetMap = new Dictionary(); foreach(Track trk in _alcTracks.Values) @@ -678,12 +678,7 @@ public sealed partial class Alcohol120 byte lastSession = 0; var tocMs = new MemoryStream(); - tocMs.Write(new byte[] - { - 0, 0 - }, - 0, - 2); // Reserved for TOC session numbers + tocMs.Write([0, 0], 0, 2); // Reserved for TOC session numbers foreach(KeyValuePair> sessionToc in _alcToc) { @@ -985,10 +980,7 @@ public sealed partial class Alcohol120 case SectorTagType.CdSectorSync: break; case SectorTagType.CdTrackFlags: - buffer = new[] - { - (byte)(alcTrack.adrCtl & 0x0F) - }; + buffer = [(byte)(alcTrack.adrCtl & 0x0F)]; return ErrorNumber.NoError; default: @@ -1485,7 +1477,7 @@ public sealed partial class Alcohol120 /// public List GetSessionTracks(ushort session) { - List tracks = new(); + List tracks = []; foreach(Track alcTrack in _alcTracks.Values) { diff --git a/Aaru.Images/Alcohol120/Verify.cs b/Aaru.Images/Alcohol120/Verify.cs index 234bcc76b..beb1e88cf 100644 --- a/Aaru.Images/Alcohol120/Verify.cs +++ b/Aaru.Images/Alcohol120/Verify.cs @@ -53,8 +53,8 @@ public sealed partial class Alcohol120 public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; @@ -89,8 +89,8 @@ public sealed partial class Alcohol120 public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; diff --git a/Aaru.Images/Alcohol120/Write.cs b/Aaru.Images/Alcohol120/Write.cs index 877be3607..b4a203360 100644 --- a/Aaru.Images/Alcohol120/Write.cs +++ b/Aaru.Images/Alcohol120/Write.cs @@ -441,7 +441,7 @@ public sealed partial class Alcohol120 { ulong currentDataOffset = 0; - _writingTracks = new List(); + _writingTracks = []; if(!_isDvd) { @@ -518,11 +518,8 @@ public sealed partial class Alcohol120 var header = new Header { - signature = _alcoholSignature, - version = new byte[] - { - 1, 5 - }, + signature = _alcoholSignature, + version = [1, 5], type = MediaTypeToMediumType(_imageInfo.MediaType), sessions = sessions, structuresOffset = (uint)(_pfi == null ? 0 : 96), @@ -806,11 +803,11 @@ public sealed partial class Alcohol120 // Alcohol seems to set that for all CD tracks // Daemon Tools expect it to be like this - alcTrk.unknown = new byte[] - { - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00 - }; + alcTrk.unknown = + [ + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00 + ]; alcTrk.unknown2 = new byte[24]; @@ -945,12 +942,7 @@ public sealed partial class Alcohol120 break; case 2048: - _descriptorStream.Write(new byte[] - { - 0x08, 0x02, 0x00, 0x00 - }, - 0, - 4); + _descriptorStream.Write([0x08, 0x02, 0x00, 0x00], 0, 4); _descriptorStream.Write(_dmi, 0, 2048); @@ -1041,12 +1033,7 @@ public sealed partial class Alcohol120 _descriptorStream.Write(filename, 0, filename.Length); // Write filename null termination - _descriptorStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + _descriptorStream.Write([0, 0], 0, 2); _descriptorStream.Flush(); _descriptorStream.Close(); diff --git a/Aaru.Images/Anex86/Anex86.cs b/Aaru.Images/Anex86/Anex86.cs index 1a23f1660..1db5397cd 100644 --- a/Aaru.Images/Anex86/Anex86.cs +++ b/Aaru.Images/Anex86/Anex86.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -50,8 +48,8 @@ public sealed partial class Anex86 : IWritableImage public Anex86() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/Apple2MG/Apple2MG.cs b/Aaru.Images/Apple2MG/Apple2MG.cs index 5e62e31bd..4e0cedfb2 100644 --- a/Aaru.Images/Apple2MG/Apple2MG.cs +++ b/Aaru.Images/Apple2MG/Apple2MG.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -51,8 +49,8 @@ public sealed partial class Apple2Mg : IWritableImage public Apple2Mg() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/Apple2MG/Constants.cs b/Aaru.Images/Apple2MG/Constants.cs index 6655a5355..48bcda9b0 100644 --- a/Aaru.Images/Apple2MG/Constants.cs +++ b/Aaru.Images/Apple2MG/Constants.cs @@ -58,15 +58,9 @@ public sealed partial class Apple2Mg /// Disk image created by Aaru, "aaru" const uint CREATOR_AARU = 0x75726161; - const uint LOCKED_DISK = 0x80000000; - const uint VALID_VOLUME_NUMBER = 0x00000100; - const uint VOLUME_NUMBER_MASK = 0x000000FF; - readonly int[] _deinterleave = - { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 - }; - readonly int[] _interleave = - { - 0, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15 - }; + const uint LOCKED_DISK = 0x80000000; + const uint VALID_VOLUME_NUMBER = 0x00000100; + const uint VOLUME_NUMBER_MASK = 0x000000FF; + readonly int[] _deinterleave = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + readonly int[] _interleave = [0, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15]; } \ No newline at end of file diff --git a/Aaru.Images/AppleDOS/AppleDOS.cs b/Aaru.Images/AppleDOS/AppleDOS.cs index 7a08cd6f8..88b307866 100644 --- a/Aaru.Images/AppleDOS/AppleDOS.cs +++ b/Aaru.Images/AppleDOS/AppleDOS.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -50,8 +48,8 @@ public sealed partial class AppleDos : IWritableImage public AppleDos() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/AppleDOS/Constants.cs b/Aaru.Images/AppleDOS/Constants.cs index 657ba0e53..55f028df5 100644 --- a/Aaru.Images/AppleDOS/Constants.cs +++ b/Aaru.Images/AppleDOS/Constants.cs @@ -34,12 +34,6 @@ namespace Aaru.Images; public sealed partial class AppleDos { - readonly int[] _deinterleave = - { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 - }; - readonly int[] _interleave = - { - 0, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15 - }; + readonly int[] _deinterleave = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]; + readonly int[] _interleave = [0, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15]; } \ No newline at end of file diff --git a/Aaru.Images/AppleNIB/AppleNIB.cs b/Aaru.Images/AppleNIB/AppleNIB.cs index bfe20c439..d2cfc37cc 100644 --- a/Aaru.Images/AppleNIB/AppleNIB.cs +++ b/Aaru.Images/AppleNIB/AppleNIB.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System.Collections.Generic; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -50,8 +49,8 @@ public sealed partial class AppleNib : IMediaImage public AppleNib() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/AppleNIB/Constants.cs b/Aaru.Images/AppleNIB/Constants.cs index f72b9c769..ffacabee6 100644 --- a/Aaru.Images/AppleNIB/Constants.cs +++ b/Aaru.Images/AppleNIB/Constants.cs @@ -37,39 +37,15 @@ namespace Aaru.Images; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class AppleNib { - readonly byte[] _apple3Sign = - { - 0x8D, 0xD0, 0x03, 0x4C, 0xC7, 0xA4 - }; - readonly byte[] _cpmSign = - { - 0xA2, 0x55, 0xA9, 0x00, 0x9D, 0x00, 0x0D, 0xCA - }; - readonly byte[] _dosSign = - { - 0xA2, 0x02, 0x8E, 0x52 - }; - readonly ulong[] _dosSkewing = - { - 0, 7, 14, 6, 13, 5, 12, 4, 11, 3, 10, 2, 9, 1, 8, 15 - }; - readonly byte[] _driString = "COPYRIGHT (C) 1979, DIGITAL RESEARCH"u8.ToArray(); - readonly byte[] _pascal2Sign = - { - 0xFF, 0xA2, 0x00, 0x8E - }; - readonly byte[] _pascalSign = - { - 0x08, 0xA5, 0x0F, 0x29 - }; - readonly byte[] _pascalString = "SYSTE.APPLE"u8.ToArray(); - readonly ulong[] _proDosSkewing = - { - 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15 - }; - readonly byte[] _prodosString = "PRODOS"u8.ToArray(); - readonly byte[] _sosSign = - { - 0xC9, 0x20, 0xF0, 0x3E - }; + readonly byte[] _apple3Sign = [0x8D, 0xD0, 0x03, 0x4C, 0xC7, 0xA4]; + readonly byte[] _cpmSign = [0xA2, 0x55, 0xA9, 0x00, 0x9D, 0x00, 0x0D, 0xCA]; + readonly byte[] _dosSign = [0xA2, 0x02, 0x8E, 0x52]; + readonly ulong[] _dosSkewing = [0, 7, 14, 6, 13, 5, 12, 4, 11, 3, 10, 2, 9, 1, 8, 15]; + readonly byte[] _driString = "COPYRIGHT (C) 1979, DIGITAL RESEARCH"u8.ToArray(); + readonly byte[] _pascal2Sign = [0xFF, 0xA2, 0x00, 0x8E]; + readonly byte[] _pascalSign = [0x08, 0xA5, 0x0F, 0x29]; + readonly byte[] _pascalString = "SYSTE.APPLE"u8.ToArray(); + readonly ulong[] _proDosSkewing = [0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15]; + readonly byte[] _prodosString = "PRODOS"u8.ToArray(); + readonly byte[] _sosSign = [0xC9, 0x20, 0xF0, 0x3E]; } \ No newline at end of file diff --git a/Aaru.Images/Apridisk/Apridisk.cs b/Aaru.Images/Apridisk/Apridisk.cs index a83cdc7cd..1a5571b76 100644 --- a/Aaru.Images/Apridisk/Apridisk.cs +++ b/Aaru.Images/Apridisk/Apridisk.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -52,8 +50,8 @@ public sealed partial class Apridisk : IWritableImage public Apridisk() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/Apridisk/Constants.cs b/Aaru.Images/Apridisk/Constants.cs index 1ae5f570c..e80352587 100644 --- a/Aaru.Images/Apridisk/Constants.cs +++ b/Aaru.Images/Apridisk/Constants.cs @@ -35,7 +35,7 @@ namespace Aaru.Images; public sealed partial class Apridisk { readonly byte[] _signature = - { + [ 0x41, 0x43, 0x54, 0x20, 0x41, 0x70, 0x72, 0x69, 0x63, 0x6F, 0x74, 0x20, 0x64, 0x69, 0x73, 0x6B, 0x20, 0x69, 0x6D, 0x61, 0x67, 0x65, 0x1A, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -44,5 +44,5 @@ public sealed partial class Apridisk 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; + ]; } \ No newline at end of file diff --git a/Aaru.Images/BLU/BLU.cs b/Aaru.Images/BLU/BLU.cs index a54fc874d..8da336a11 100644 --- a/Aaru.Images/BLU/BLU.cs +++ b/Aaru.Images/BLU/BLU.cs @@ -30,10 +30,8 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -53,8 +51,8 @@ public sealed partial class Blu : IWritableImage, IVerifiableSectorsImage public Blu() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/BLU/Verify.cs b/Aaru.Images/BLU/Verify.cs index 1990a1305..c5312309b 100644 --- a/Aaru.Images/BLU/Verify.cs +++ b/Aaru.Images/BLU/Verify.cs @@ -48,8 +48,8 @@ public sealed partial class Blu public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; for(ulong i = sectorAddress; i < sectorAddress + length; i++) unknownLbas.Add(i); diff --git a/Aaru.Images/BlindWrite4/BlindWrite4.cs b/Aaru.Images/BlindWrite4/BlindWrite4.cs index 77fff161c..903561ba4 100644 --- a/Aaru.Images/BlindWrite4/BlindWrite4.cs +++ b/Aaru.Images/BlindWrite4/BlindWrite4.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -54,8 +53,8 @@ public sealed partial class BlindWrite4 : IOpticalMediaImage public BlindWrite4() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = true, HasSessions = true, Version = null, diff --git a/Aaru.Images/BlindWrite4/Read.cs b/Aaru.Images/BlindWrite4/Read.cs index 9f62c8881..1de537c40 100644 --- a/Aaru.Images/BlindWrite4/Read.cs +++ b/Aaru.Images/BlindWrite4/Read.cs @@ -149,7 +149,7 @@ public sealed partial class BlindWrite4 AaruConsole.DebugWriteLine(MODULE_NAME, "header.unknown3 = {0}", _header.Unknown3); AaruConsole.DebugWriteLine(MODULE_NAME, "header.unknown4.Length = {0}", _header.Unknown4.Length); - _bwTracks = new List(); + _bwTracks = []; for(var i = 0; i < _header.TrackDescriptors; i++) { @@ -488,8 +488,8 @@ public sealed partial class BlindWrite4 .ToUpper(CultureInfo.CurrentCulture))); } - Tracks = new List(); - Partitions = new List(); + Tracks = []; + Partitions = []; _offsetMap = new Dictionary(); _trackFlags = new Dictionary(); ushort maxSession = 0; @@ -717,7 +717,7 @@ public sealed partial class BlindWrite4 } } - Sessions = new List(); + Sessions = []; for(ushort i = 1; i <= maxSession; i++) { @@ -744,9 +744,8 @@ public sealed partial class BlindWrite4 // As long as subchannel is written for any track, it is present for all tracks if(Tracks.Any(t => t.SubchannelType == TrackSubchannelType.Packed)) - { - foreach(Track track in Tracks) track.SubchannelType = TrackSubchannelType.Packed; - } + foreach(Track track in Tracks) + track.SubchannelType = TrackSubchannelType.Packed; _imageInfo.MediaType = MediaType.CD; @@ -1003,10 +1002,7 @@ public sealed partial class BlindWrite4 case SectorTagType.CdTrackFlags: if(!_trackFlags.TryGetValue((uint)sectorAddress, out byte flag)) return ErrorNumber.NoData; - buffer = new[] - { - flag - }; + buffer = [flag]; return ErrorNumber.NoError; default: diff --git a/Aaru.Images/BlindWrite4/Verify.cs b/Aaru.Images/BlindWrite4/Verify.cs index 5432aec45..6df71e8b0 100644 --- a/Aaru.Images/BlindWrite4/Verify.cs +++ b/Aaru.Images/BlindWrite4/Verify.cs @@ -53,8 +53,8 @@ public sealed partial class BlindWrite4 public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; @@ -89,8 +89,8 @@ public sealed partial class BlindWrite4 public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; diff --git a/Aaru.Images/BlindWrite5/BlindWrite5.cs b/Aaru.Images/BlindWrite5/BlindWrite5.cs index b11e95c63..e580bb38b 100644 --- a/Aaru.Images/BlindWrite5/BlindWrite5.cs +++ b/Aaru.Images/BlindWrite5/BlindWrite5.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -67,8 +66,8 @@ public sealed partial class BlindWrite5 : IOpticalMediaImage public BlindWrite5() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = true, HasSessions = true, Version = null, diff --git a/Aaru.Images/BlindWrite5/Read.cs b/Aaru.Images/BlindWrite5/Read.cs index 52f41a80b..11a7c917a 100644 --- a/Aaru.Images/BlindWrite5/Read.cs +++ b/Aaru.Images/BlindWrite5/Read.cs @@ -255,7 +255,7 @@ public sealed partial class BlindWrite5 _dataPath = Encoding.Unicode.GetString(dataPathBytes); AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Data_path_0, _dataPath); - _dataFiles = new List(); + _dataFiles = []; for(var cD = 0; cD < dataBlockCount; cD++) { @@ -311,7 +311,7 @@ public sealed partial class BlindWrite5 AaruConsole.DebugWriteLine(MODULE_NAME, "dataFile.unknown3 = {0}", dataFile.Unknown3); } - _bwSessions = new List(); + _bwSessions = []; for(var ses = 0; ses < _header.sessions; ses++) { @@ -542,7 +542,7 @@ public sealed partial class BlindWrite5 .BlindWrite5_image_ends_after_expected_position_Probably_new_version_with_different_data_Errors_may_occur); } - _filePaths = new List(); + _filePaths = []; foreach(DataFile dataFile in _dataFiles) { @@ -706,17 +706,12 @@ public sealed partial class BlindWrite5 _filePaths.Add(chars); } - Sessions = new List(); - Tracks = new List(); - Partitions = new List(); + Sessions = []; + Tracks = []; + Partitions = []; var fullTocStream = new MemoryStream(); - fullTocStream.Write(new byte[] - { - 0, 0 - }, - 0, - 2); + fullTocStream.Write([0, 0], 0, 2); ulong offsetBytes = 0; _offsetMap = new Dictionary(); @@ -1684,10 +1679,7 @@ public sealed partial class BlindWrite5 case SectorTagType.CdTrackFlags: if(!_trackFlags.TryGetValue((uint)sectorAddress, out byte flag)) return ErrorNumber.NoData; - buffer = new[] - { - flag - }; + buffer = [flag]; return ErrorNumber.NoError; default: diff --git a/Aaru.Images/BlindWrite5/Verify.cs b/Aaru.Images/BlindWrite5/Verify.cs index 12b5e64d4..0ded988e8 100644 --- a/Aaru.Images/BlindWrite5/Verify.cs +++ b/Aaru.Images/BlindWrite5/Verify.cs @@ -53,8 +53,8 @@ public sealed partial class BlindWrite5 public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; @@ -89,8 +89,8 @@ public sealed partial class BlindWrite5 public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; diff --git a/Aaru.Images/ByteAddressable/AtariLynx.cs b/Aaru.Images/ByteAddressable/AtariLynx.cs index a4a083a48..bd2f01dad 100644 --- a/Aaru.Images/ByteAddressable/AtariLynx.cs +++ b/Aaru.Images/ByteAddressable/AtariLynx.cs @@ -298,8 +298,8 @@ public class AtariLynx : IByteAddressableImage mappings = new LinearMemoryMap { - Devices = new[] - { + Devices = + [ new LinearMemoryDevice { Type = LinearMemoryType.ROM, @@ -309,7 +309,7 @@ public class AtariLynx : IByteAddressableImage Length = (ulong)_data.Length } } - } + ] }; return ErrorNumber.NoError; diff --git a/Aaru.Images/ByteAddressable/GameBoy.cs b/Aaru.Images/ByteAddressable/GameBoy.cs index 410e31033..d136d4050 100644 --- a/Aaru.Images/ByteAddressable/GameBoy.cs +++ b/Aaru.Images/ByteAddressable/GameBoy.cs @@ -422,8 +422,8 @@ public class GameBoy : IByteAddressableImage case 0xFC: // Pocket Camera mappings = new LinearMemoryMap { - Devices = new[] - { + Devices = + [ new LinearMemoryDevice { Location = "U1", @@ -458,7 +458,7 @@ public class GameBoy : IByteAddressableImage Length = DecodeSaveRamSize(header.SramSize) } } - } + ] }; return ErrorNumber.NoError; diff --git a/Aaru.Images/ByteAddressable/GameBoyAdvance.cs b/Aaru.Images/ByteAddressable/GameBoyAdvance.cs index 826be91d3..0eb137fb3 100644 --- a/Aaru.Images/ByteAddressable/GameBoyAdvance.cs +++ b/Aaru.Images/ByteAddressable/GameBoyAdvance.cs @@ -246,8 +246,8 @@ public class GameBoyAdvance : IByteAddressableImage mappings = new LinearMemoryMap { - Devices = new[] - { + Devices = + [ new LinearMemoryDevice { Type = LinearMemoryType.ROM, @@ -257,7 +257,7 @@ public class GameBoyAdvance : IByteAddressableImage Length = (ulong)_data.Length } } - } + ] }; return ErrorNumber.NoError; diff --git a/Aaru.Images/ByteAddressable/MasterSystem.cs b/Aaru.Images/ByteAddressable/MasterSystem.cs index ed486e64c..53442426c 100644 --- a/Aaru.Images/ByteAddressable/MasterSystem.cs +++ b/Aaru.Images/ByteAddressable/MasterSystem.cs @@ -349,8 +349,8 @@ public class MasterSystem : IByteAddressableImage mappings = new LinearMemoryMap { - Devices = new[] - { + Devices = + [ new LinearMemoryDevice { Type = LinearMemoryType.ROM, @@ -360,7 +360,7 @@ public class MasterSystem : IByteAddressableImage Length = (ulong)_romSize } } - } + ] }; return ErrorNumber.NoError; diff --git a/Aaru.Images/ByteAddressable/NES.cs b/Aaru.Images/ByteAddressable/NES.cs index bc4be0689..de9d4ab70 100644 --- a/Aaru.Images/ByteAddressable/NES.cs +++ b/Aaru.Images/ByteAddressable/NES.cs @@ -462,8 +462,8 @@ public class Nes : IByteAddressableImage return ErrorNumber.NotOpened; } - List devices = new() - { + List devices = + [ new LinearMemoryDevice { Type = LinearMemoryType.ROM, @@ -472,7 +472,7 @@ public class Nes : IByteAddressableImage Length = (ulong)_prgLen } } - }; + ]; if(_chrLen > 0) { diff --git a/Aaru.Images/CDRDAO/CDRDAO.cs b/Aaru.Images/CDRDAO/CDRDAO.cs index dc8bd1de2..29d92ba4e 100644 --- a/Aaru.Images/CDRDAO/CDRDAO.cs +++ b/Aaru.Images/CDRDAO/CDRDAO.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Decoders.CD; @@ -64,8 +63,8 @@ public sealed partial class Cdrdao : IWritableOpticalImage public Cdrdao() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = true, HasSessions = true, Version = null, diff --git a/Aaru.Images/CDRDAO/Properties.cs b/Aaru.Images/CDRDAO/Properties.cs index 8e85285ee..b7d42cdbb 100644 --- a/Aaru.Images/CDRDAO/Properties.cs +++ b/Aaru.Images/CDRDAO/Properties.cs @@ -87,9 +87,9 @@ public sealed partial class Cdrdao Track firstTrack = Tracks.First(t => t.Sequence == Tracks.Min(m => m.Sequence)); Track lastTrack = Tracks.First(t => t.Sequence == Tracks.Max(m => m.Sequence)); - return new List - { - new() + return + [ + new Session { Sequence = 1, StartSector = firstTrack.StartSector, @@ -97,7 +97,7 @@ public sealed partial class Cdrdao StartTrack = firstTrack.Sequence, EndTrack = lastTrack.Sequence } - }; + ]; } } @@ -106,7 +106,7 @@ public sealed partial class Cdrdao { get { - List tracks = new(); + List tracks = []; foreach(CdrdaoTrack cdrTrack in _discimage.Tracks) { diff --git a/Aaru.Images/CDRDAO/Read.cs b/Aaru.Images/CDRDAO/Read.cs index 4aa0aee1c..bad78bed1 100644 --- a/Aaru.Images/CDRDAO/Read.cs +++ b/Aaru.Images/CDRDAO/Read.cs @@ -100,7 +100,7 @@ public sealed partial class Cdrdao // Initialize disc _discimage = new CdrdaoDisc { - Tracks = new List(), + Tracks = [], Comment = "" }; @@ -779,7 +779,7 @@ public sealed partial class Cdrdao AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Building_offset_map); - Partitions = new List(); + Partitions = []; _offsetmap = new Dictionary(); ulong byteOffset = 0; @@ -1236,10 +1236,7 @@ public sealed partial class Cdrdao if(aaruTrack.Flag4Ch) flags |= CdFlags.FourChannel; - buffer = new[] - { - (byte)flags - }; + buffer = [(byte)flags]; return ErrorNumber.NoError; } diff --git a/Aaru.Images/CDRDAO/Verify.cs b/Aaru.Images/CDRDAO/Verify.cs index cc91c8876..859f8721f 100644 --- a/Aaru.Images/CDRDAO/Verify.cs +++ b/Aaru.Images/CDRDAO/Verify.cs @@ -53,8 +53,8 @@ public sealed partial class Cdrdao public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; @@ -89,8 +89,8 @@ public sealed partial class Cdrdao public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; diff --git a/Aaru.Images/CDRDAO/Write.cs b/Aaru.Images/CDRDAO/Write.cs index 32959996f..d2977b1bb 100644 --- a/Aaru.Images/CDRDAO/Write.cs +++ b/Aaru.Images/CDRDAO/Write.cs @@ -107,7 +107,7 @@ public sealed partial class Cdrdao _discimage = new CdrdaoDisc { Disktype = mediaType, - Tracks = new List() + Tracks = [] }; _trackFlags = new Dictionary(); @@ -458,12 +458,11 @@ public sealed partial class Cdrdao } if(_writingTracks != null && _writingStreams != null) - { - foreach(FileStream oldTrack in _writingStreams.Select(t => t.Value).Distinct()) oldTrack.Close(); - } + foreach(FileStream oldTrack in _writingStreams.Select(t => t.Value).Distinct()) + oldTrack.Close(); ulong currentOffset = 0; - _writingTracks = new List(); + _writingTracks = []; foreach(Track track in tracks.OrderBy(t => t.Sequence)) { diff --git a/Aaru.Images/CDRWin/CDRWin.cs b/Aaru.Images/CDRWin/CDRWin.cs index bc1a10c15..fe1b4a53b 100644 --- a/Aaru.Images/CDRWin/CDRWin.cs +++ b/Aaru.Images/CDRWin/CDRWin.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Decoders.CD; @@ -66,8 +65,8 @@ public sealed partial class CdrWin : IWritableOpticalImage, IVerifiableImage public CdrWin() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = true, HasSessions = true, Version = null, diff --git a/Aaru.Images/CDRWin/Properties.cs b/Aaru.Images/CDRWin/Properties.cs index af7bc851d..194d07a3c 100644 --- a/Aaru.Images/CDRWin/Properties.cs +++ b/Aaru.Images/CDRWin/Properties.cs @@ -86,7 +86,7 @@ public sealed partial class CdrWin { get { - List tracks = new(); + List tracks = []; ulong previousStartSector = 0; const ulong gdRomSession2Offset = 45000; diff --git a/Aaru.Images/CDRWin/Read.cs b/Aaru.Images/CDRWin/Read.cs index c77fcb2b6..aef414c66 100644 --- a/Aaru.Images/CDRWin/Read.cs +++ b/Aaru.Images/CDRWin/Read.cs @@ -115,8 +115,8 @@ public sealed partial class CdrWin // Initialize disc _discImage = new CdrWinDisc { - Sessions = new List(), - Tracks = new List(), + Sessions = [], + Tracks = [], Comment = "", DiscHashes = new Dictionary() }; @@ -300,7 +300,7 @@ public sealed partial class CdrWin Localization.Found_REM_METADATA_DUMP_EXTENT_at_line_0, lineNumber); - DumpHardware ??= new List(); + DumpHardware ??= []; DumpHardware existingDump = DumpHardware.FirstOrDefault(d => @@ -319,14 +319,14 @@ public sealed partial class CdrWin { DumpHardware.Add(new DumpHardware { - Extents = new List - { - new() + Extents = + [ + new Extent { Start = extentStart, End = extentEnd } - }, + ], Firmware = matchDumpExtent.Groups["firmware"].Value, Manufacturer = matchDumpExtent.Groups["manufacturer"].Value, Model = matchDumpExtent.Groups["model"].Value, @@ -1426,7 +1426,7 @@ public sealed partial class CdrWin AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Building_offset_map); - Partitions = new List(); + Partitions = []; ulong partitionSequence = 0; @@ -1990,10 +1990,7 @@ public sealed partial class CdrWin if(aaruTrack.Flag4Ch) flags |= CdFlags.FourChannel; - buffer = new[] - { - (byte)flags - }; + buffer = [(byte)flags]; return ErrorNumber.NoError; } diff --git a/Aaru.Images/CDRWin/Verify.cs b/Aaru.Images/CDRWin/Verify.cs index e49abdc0d..e115bd1f2 100644 --- a/Aaru.Images/CDRWin/Verify.cs +++ b/Aaru.Images/CDRWin/Verify.cs @@ -167,8 +167,8 @@ public sealed partial class CdrWin public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; @@ -203,8 +203,8 @@ public sealed partial class CdrWin public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; diff --git a/Aaru.Images/CDRWin/Write.cs b/Aaru.Images/CDRWin/Write.cs index 56c21c4e7..fca7e550c 100644 --- a/Aaru.Images/CDRWin/Write.cs +++ b/Aaru.Images/CDRWin/Write.cs @@ -106,8 +106,8 @@ public sealed partial class CdrWin _discImage = new CdrWinDisc { MediaType = mediaType, - Sessions = new List(), - Tracks = new List() + Sessions = [], + Tracks = [] }; var mediaTypeAsInt = (int)_discImage.MediaType; @@ -393,11 +393,10 @@ public sealed partial class CdrWin } if(_writingTracks != null && _writingStreams != null) - { - foreach(FileStream oldTrack in _writingStreams.Select(t => t.Value).Distinct()) oldTrack.Close(); - } + foreach(FileStream oldTrack in _writingStreams.Select(t => t.Value).Distinct()) + oldTrack.Close(); - _writingTracks = new List(); + _writingTracks = []; foreach(Track track in tracks.OrderBy(t => t.Sequence)) { diff --git a/Aaru.Images/CHD/CHD.cs b/Aaru.Images/CHD/CHD.cs index e609918c6..95bd2ee2d 100644 --- a/Aaru.Images/CHD/CHD.cs +++ b/Aaru.Images/CHD/CHD.cs @@ -34,7 +34,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using Aaru.CommonTypes; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Decoders.CD; @@ -81,8 +80,8 @@ public sealed partial class Chd : IOpticalMediaImage, IVerifiableImage public Chd() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Application = "MAME", diff --git a/Aaru.Images/CHD/Read.cs b/Aaru.Images/CHD/Read.cs index 2efa15689..34f5763cf 100644 --- a/Aaru.Images/CHD/Read.cs +++ b/Aaru.Images/CHD/Read.cs @@ -1254,7 +1254,7 @@ public sealed partial class Chd if(_isCdrom || _isGdrom) { _offsetmap = new Dictionary(); - _partitions = new List(); + _partitions = []; ulong partPos = 0; foreach(Track aaruTrack in _tracks.Values) diff --git a/Aaru.Images/CHD/Verify.cs b/Aaru.Images/CHD/Verify.cs index 1766c10d0..96f155169 100644 --- a/Aaru.Images/CHD/Verify.cs +++ b/Aaru.Images/CHD/Verify.cs @@ -56,8 +56,8 @@ public sealed partial class Chd public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - unknownLbas = new List(); - failingLbas = new List(); + unknownLbas = []; + failingLbas = []; if(_isHdd) return null; @@ -95,8 +95,8 @@ public sealed partial class Chd public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { - unknownLbas = new List(); - failingLbas = new List(); + unknownLbas = []; + failingLbas = []; if(_isHdd) return null; diff --git a/Aaru.Images/CPCDSK/CPCDSK.cs b/Aaru.Images/CPCDSK/CPCDSK.cs index 1631ceb2f..c390d035c 100644 --- a/Aaru.Images/CPCDSK/CPCDSK.cs +++ b/Aaru.Images/CPCDSK/CPCDSK.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System.Collections.Generic; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -49,8 +48,8 @@ public sealed partial class Cpcdsk : IMediaImage public Cpcdsk() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/CisCopy/CisCopy.cs b/Aaru.Images/CisCopy/CisCopy.cs index 8f500ce69..753c8cc1b 100644 --- a/Aaru.Images/CisCopy/CisCopy.cs +++ b/Aaru.Images/CisCopy/CisCopy.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -64,8 +62,8 @@ public sealed partial class CisCopy : IWritableImage public CisCopy() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/CloneCD/CloneCD.cs b/Aaru.Images/CloneCD/CloneCD.cs index fc0161480..a964651dc 100644 --- a/Aaru.Images/CloneCD/CloneCD.cs +++ b/Aaru.Images/CloneCD/CloneCD.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -62,8 +61,8 @@ public sealed partial class CloneCd : IWritableOpticalImage public CloneCd() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = true, HasSessions = true, Version = null, diff --git a/Aaru.Images/CloneCD/Read.cs b/Aaru.Images/CloneCD/Read.cs index d832a4f8e..adf8396cf 100644 --- a/Aaru.Images/CloneCD/Read.cs +++ b/Aaru.Images/CloneCD/Read.cs @@ -109,7 +109,7 @@ public sealed partial class CloneCd byte currentTrackEntry = 0; Dictionary trackModes = new(); Dictionary> trackIndexes = new(); - List entries = new(); + List entries = []; _scrambled = false; _catalog = null; @@ -439,7 +439,7 @@ public sealed partial class CloneCd var curSessionNo = 0; var currentTrack = new Track(); var firstTrackInSession = true; - Tracks = new List(); + Tracks = []; ulong leadOutStart = 0; _dataStream = _dataFilter.GetDataForkStream(); @@ -784,7 +784,7 @@ public sealed partial class CloneCd _imageInfo.ReadableSectorTags.Add(SectorTagType.CdTrackFlags); - Sessions = new List(); + Sessions = []; var currentSession = new Session { @@ -793,7 +793,7 @@ public sealed partial class CloneCd Sequence = 1 }; - Partitions = new List(); + Partitions = []; _offsetMap = new Dictionary(); foreach(Track track in Tracks) @@ -1096,10 +1096,7 @@ public sealed partial class CloneCd case SectorTagType.CdTrackFlags: if(!_trackFlags.TryGetValue((byte)aaruTrack.Sequence, out byte flags)) return ErrorNumber.NoData; - buffer = new[] - { - flags - }; + buffer = [flags]; return ErrorNumber.NoError; case SectorTagType.CdSectorSubchannel: diff --git a/Aaru.Images/CloneCD/Verify.cs b/Aaru.Images/CloneCD/Verify.cs index c6f9baa17..eaed0c10b 100644 --- a/Aaru.Images/CloneCD/Verify.cs +++ b/Aaru.Images/CloneCD/Verify.cs @@ -53,8 +53,8 @@ public sealed partial class CloneCd public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; @@ -89,8 +89,8 @@ public sealed partial class CloneCd public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; diff --git a/Aaru.Images/CloneCD/Write.cs b/Aaru.Images/CloneCD/Write.cs index e461f53a1..12a972a56 100644 --- a/Aaru.Images/CloneCD/Write.cs +++ b/Aaru.Images/CloneCD/Write.cs @@ -240,7 +240,7 @@ public sealed partial class CloneCd ulong currentDataOffset = 0; ulong currentSubchannelOffset = 0; - Tracks = new List(); + Tracks = []; foreach(Track track in tracks.OrderBy(t => t.Sequence)) { diff --git a/Aaru.Images/CopyQM/Constants.cs b/Aaru.Images/CopyQM/Constants.cs index 8130436f5..066cdfa94 100644 --- a/Aaru.Images/CopyQM/Constants.cs +++ b/Aaru.Images/CopyQM/Constants.cs @@ -49,7 +49,7 @@ public sealed partial class CopyQm const byte COPYQM_35_ED = 6; readonly uint[] _copyQmCrcTable = - { + [ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, 0x646BA8C0, 0xFD62F97A, @@ -79,5 +79,5 @@ public sealed partial class CopyQm 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D - }; + ]; } \ No newline at end of file diff --git a/Aaru.Images/CopyQM/CopyQM.cs b/Aaru.Images/CopyQM/CopyQM.cs index 802f659f3..96664803a 100644 --- a/Aaru.Images/CopyQM/CopyQM.cs +++ b/Aaru.Images/CopyQM/CopyQM.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -52,8 +50,8 @@ public sealed partial class CopyQm : IMediaImage, IVerifiableImage public CopyQm() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/CopyTape/Read.cs b/Aaru.Images/CopyTape/Read.cs index cf5549f9b..b022d5c12 100644 --- a/Aaru.Images/CopyTape/Read.cs +++ b/Aaru.Images/CopyTape/Read.cs @@ -50,7 +50,7 @@ public sealed partial class CopyTape /// public ErrorNumber Open(IFilter imageFilter) { - List blockPositions = new(); + List blockPositions = []; var partialBlockRx = new Regex(PARTIAL_BLOCK_REGEX); var blockRx = new Regex(BLOCK_REGEX); var filemarkRx = new Regex(FILEMARK_REGEX); @@ -68,7 +68,7 @@ public sealed partial class CopyTape ulong currentFileStart = 0; var inFile = false; - Files = new List(); + Files = []; while(_imageStream.Position + 9 < _imageStream.Length) { @@ -166,15 +166,15 @@ public sealed partial class CopyTape _blockPositionCache = blockPositions.ToArray(); - TapePartitions = new List - { - new() + TapePartitions = + [ + new TapePartition { FirstBlock = 0, LastBlock = currentBlock - 1, Number = 0 } - }; + ]; _imageInfo.Sectors = (ulong)_blockPositionCache.LongLength; _imageInfo.MediaType = MediaType.UnknownTape; diff --git a/Aaru.Images/D88/Constants.cs b/Aaru.Images/D88/Constants.cs index 39cb4b820..ccfd1eb3b 100644 --- a/Aaru.Images/D88/Constants.cs +++ b/Aaru.Images/D88/Constants.cs @@ -37,9 +37,6 @@ namespace Aaru.Images; [SuppressMessage("ReSharper", "UnusedMember.Local")] public sealed partial class D88 { - const byte READ_ONLY = 0x10; - readonly byte[] _reservedEmpty = - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; + const byte READ_ONLY = 0x10; + readonly byte[] _reservedEmpty = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; } \ No newline at end of file diff --git a/Aaru.Images/D88/D88.cs b/Aaru.Images/D88/D88.cs index a69c522fc..f4f8ca106 100644 --- a/Aaru.Images/D88/D88.cs +++ b/Aaru.Images/D88/D88.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System.Collections.Generic; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -50,8 +49,8 @@ public sealed partial class D88 : IMediaImage public D88() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/D88/Read.cs b/Aaru.Images/D88/Read.cs index 7e392ea8c..4df2e0678 100644 --- a/Aaru.Images/D88/Read.cs +++ b/Aaru.Images/D88/Read.cs @@ -113,7 +113,7 @@ public sealed partial class D88 short spt = sechdr.spt; IBMSectorSizeCode bps = sechdr.n; var allEqual = true; - _sectorsData = new List(); + _sectorsData = []; for(var i = 0; i < trkCounter; i++) { diff --git a/Aaru.Images/DART/DART.cs b/Aaru.Images/DART/DART.cs index 255d6abb5..3f238b5cd 100644 --- a/Aaru.Images/DART/DART.cs +++ b/Aaru.Images/DART/DART.cs @@ -30,8 +30,6 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -52,8 +50,8 @@ public sealed partial class Dart : IMediaImage public Dart() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/DIM/DIM.cs b/Aaru.Images/DIM/DIM.cs index 989b92480..5646ddd0e 100644 --- a/Aaru.Images/DIM/DIM.cs +++ b/Aaru.Images/DIM/DIM.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -52,8 +50,8 @@ public sealed partial class Dim : IMediaImage public Dim() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/DiscFerret/DiscFerret.cs b/Aaru.Images/DiscFerret/DiscFerret.cs index cf69f6650..40eb09a50 100644 --- a/Aaru.Images/DiscFerret/DiscFerret.cs +++ b/Aaru.Images/DiscFerret/DiscFerret.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System.Collections.Generic; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -50,8 +49,8 @@ public sealed partial class DiscFerret : IMediaImage, IVerifiableSectorsImage public DiscFerret() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/DiscJuggler/DiscJuggler.cs b/Aaru.Images/DiscJuggler/DiscJuggler.cs index ab5268bb0..8f2b0b850 100644 --- a/Aaru.Images/DiscJuggler/DiscJuggler.cs +++ b/Aaru.Images/DiscJuggler/DiscJuggler.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Decoders.CD; @@ -56,8 +55,8 @@ public sealed partial class DiscJuggler : IOpticalMediaImage public DiscJuggler() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = true, HasSessions = true, Version = null, diff --git a/Aaru.Images/DiscJuggler/Read.cs b/Aaru.Images/DiscJuggler/Read.cs index 4feaf66cc..5dcd349a7 100644 --- a/Aaru.Images/DiscJuggler/Read.cs +++ b/Aaru.Images/DiscJuggler/Read.cs @@ -73,9 +73,9 @@ public sealed partial class DiscJuggler var position = 1; ushort sessionSequence = 0; - Sessions = new List(); - Tracks = new List(); - Partitions = new List(); + Sessions = []; + Tracks = []; + Partitions = []; _offsetMap = new Dictionary(); _trackFlags = new Dictionary(); ushort mediumType; @@ -993,10 +993,7 @@ public sealed partial class DiscJuggler case SectorTagType.CdTrackFlags: if(!_trackFlags.TryGetValue(track, out byte flag)) return ErrorNumber.NoData; - buffer = new[] - { - flag - }; + buffer = [flag]; return ErrorNumber.NoError; default: diff --git a/Aaru.Images/DiscJuggler/Verify.cs b/Aaru.Images/DiscJuggler/Verify.cs index 36d3ab89b..bd79b17be 100644 --- a/Aaru.Images/DiscJuggler/Verify.cs +++ b/Aaru.Images/DiscJuggler/Verify.cs @@ -53,8 +53,8 @@ public sealed partial class DiscJuggler public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; @@ -89,8 +89,8 @@ public sealed partial class DiscJuggler public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; diff --git a/Aaru.Images/DiskCopy42/DiskCopy42.cs b/Aaru.Images/DiskCopy42/DiskCopy42.cs index d4353f95f..2257f7f91 100644 --- a/Aaru.Images/DiskCopy42/DiskCopy42.cs +++ b/Aaru.Images/DiskCopy42/DiskCopy42.cs @@ -30,10 +30,8 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -64,8 +62,8 @@ public sealed partial class DiskCopy42 : IWritableImage, IVerifiableImage public DiskCopy42() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = "4.2", diff --git a/Aaru.Images/DiskDupe/Constants.cs b/Aaru.Images/DiskDupe/Constants.cs index 59c93a96c..76a3998a1 100644 --- a/Aaru.Images/DiskDupe/Constants.cs +++ b/Aaru.Images/DiskDupe/Constants.cs @@ -39,8 +39,5 @@ public sealed partial class DiskDupe const uint TRACKMAP_OFFSET = 100; /// The header identification string - readonly byte[] _headerMagic = - { - 0x49, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; + readonly byte[] _headerMagic = [0x49, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; } \ No newline at end of file diff --git a/Aaru.Images/DiskDupe/DiskDupe.cs b/Aaru.Images/DiskDupe/DiskDupe.cs index 62429ac20..cc0153e23 100644 --- a/Aaru.Images/DiskDupe/DiskDupe.cs +++ b/Aaru.Images/DiskDupe/DiskDupe.cs @@ -57,8 +57,6 @@ // ReSharper disable NotAccessedField.Local -using System.Collections.Generic; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -84,8 +82,8 @@ public sealed partial class DiskDupe : IMediaImage public DiskDupe() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/DiskDupe/Structs.cs b/Aaru.Images/DiskDupe/Structs.cs index 46cf15c0a..eceea8e6d 100644 --- a/Aaru.Images/DiskDupe/Structs.cs +++ b/Aaru.Images/DiskDupe/Structs.cs @@ -40,38 +40,38 @@ namespace Aaru.Images; public sealed partial class DiskDupe { readonly DiskType[] _diskTypes = - { - new() + [ + new DiskType { cyl = 0, hd = 0, spt = 0 }, // Type 0 - invalid - new() + new DiskType { cyl = 40, hd = 2, spt = 9 }, // Type 1 - 360k - new() + new DiskType { cyl = 80, hd = 2, spt = 15 }, // Type 2 - 1.2m - new() + new DiskType { cyl = 80, hd = 2, spt = 9 }, // Type 3 - 720k - new() + new DiskType { cyl = 80, hd = 2, spt = 18 } // Type 4 - 1.44m - }; + ]; #region Nested type: DiskType diff --git a/Aaru.Images/DriDiskCopy/DriDiskCopy.cs b/Aaru.Images/DriDiskCopy/DriDiskCopy.cs index c9061b3ef..b2e8c5407 100644 --- a/Aaru.Images/DriDiskCopy/DriDiskCopy.cs +++ b/Aaru.Images/DriDiskCopy/DriDiskCopy.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -53,8 +51,8 @@ public sealed partial class DriDiskCopy : IWritableImage public DriDiskCopy() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Application = "DiskCopy", diff --git a/Aaru.Images/GDI/GDI.cs b/Aaru.Images/GDI/GDI.cs index cac97f9c9..bd9394e5c 100644 --- a/Aaru.Images/GDI/GDI.cs +++ b/Aaru.Images/GDI/GDI.cs @@ -33,7 +33,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Decoders.CD; @@ -59,8 +58,8 @@ public sealed partial class Gdi : IOpticalMediaImage public Gdi() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = true, HasSessions = true, Version = null, diff --git a/Aaru.Images/GDI/Properties.cs b/Aaru.Images/GDI/Properties.cs index 311df767d..0a2f3fa2b 100644 --- a/Aaru.Images/GDI/Properties.cs +++ b/Aaru.Images/GDI/Properties.cs @@ -72,7 +72,7 @@ public sealed partial class Gdi { get { - List tracks = new(); + List tracks = []; foreach(GdiTrack gdiTrack in _discImage.Tracks) { diff --git a/Aaru.Images/GDI/Read.cs b/Aaru.Images/GDI/Read.cs index f02f81d71..3194b0566 100644 --- a/Aaru.Images/GDI/Read.cs +++ b/Aaru.Images/GDI/Read.cs @@ -71,8 +71,8 @@ public sealed partial class Gdi // Initialize disc _discImage = new GdiDisc { - Sessions = new List(), - Tracks = new List() + Sessions = [], + Tracks = [] }; ulong currentStart = 0; @@ -283,7 +283,7 @@ public sealed partial class Gdi AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Building_offset_map); - Partitions = new List(); + Partitions = []; ulong byteOffset = 0; for(var i = 0; i < _discImage.Tracks.Count; i++) @@ -549,10 +549,7 @@ public sealed partial class Gdi if(tag != SectorTagType.CdTrackFlags) return ErrorNumber.NotSupported; - buffer = new byte[] - { - 0x00 - }; + buffer = [0x00]; return ErrorNumber.NoError; } @@ -894,7 +891,7 @@ public sealed partial class Gdi /// public List GetSessionTracks(ushort session) { - List tracks = new(); + List tracks = []; bool expectedDensity; switch(session) diff --git a/Aaru.Images/GDI/Verify.cs b/Aaru.Images/GDI/Verify.cs index 61525474a..5c131fd88 100644 --- a/Aaru.Images/GDI/Verify.cs +++ b/Aaru.Images/GDI/Verify.cs @@ -55,8 +55,8 @@ public sealed partial class Gdi public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; @@ -91,8 +91,8 @@ public sealed partial class Gdi public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; diff --git a/Aaru.Images/HDCopy/HDCopy.cs b/Aaru.Images/HDCopy/HDCopy.cs index ff6820135..939560e93 100644 --- a/Aaru.Images/HDCopy/HDCopy.cs +++ b/Aaru.Images/HDCopy/HDCopy.cs @@ -66,7 +66,6 @@ // ReSharper disable NotAccessedField.Local using System.Collections.Generic; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -91,8 +90,8 @@ public sealed partial class HdCopy : IMediaImage public HdCopy() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/IMD/IMD.cs b/Aaru.Images/IMD/IMD.cs index af470481e..0c6faa360 100644 --- a/Aaru.Images/IMD/IMD.cs +++ b/Aaru.Images/IMD/IMD.cs @@ -31,7 +31,6 @@ // ****************************************************************************/ using System.Collections.Generic; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -46,8 +45,8 @@ public sealed partial class Imd : IMediaImage public Imd() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/IMD/Read.cs b/Aaru.Images/IMD/Read.cs index 468fea497..48d3c2b32 100644 --- a/Aaru.Images/IMD/Read.cs +++ b/Aaru.Images/IMD/Read.cs @@ -64,7 +64,7 @@ public sealed partial class Imd } _imageInfo.Comments = StringHandlers.CToString(cmt.ToArray()); - _sectorsData = new List(); + _sectorsData = []; byte currentCylinder = 0; _imageInfo.Cylinders = 1; @@ -108,9 +108,8 @@ public sealed partial class Imd for(var i = 0; i < spt; i++) bps[i] = BitConverter.ToUInt16(bpsbytes, i * 2); } else - { - for(var i = 0; i < spt; i++) bps[i] = (ushort)(128 << n); - } + for(var i = 0; i < spt; i++) + bps[i] = (ushort)(128 << n); if(spt > _imageInfo.SectorsPerTrack) _imageInfo.SectorsPerTrack = spt; diff --git a/Aaru.Images/KryoFlux/KryoFlux.cs b/Aaru.Images/KryoFlux/KryoFlux.cs index 0383195fb..9721d4cb6 100644 --- a/Aaru.Images/KryoFlux/KryoFlux.cs +++ b/Aaru.Images/KryoFlux/KryoFlux.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -50,8 +49,8 @@ public sealed partial class KryoFlux : IMediaImage, IVerifiableSectorsImage public KryoFlux() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/MaxiDisk/MaxiDisk.cs b/Aaru.Images/MaxiDisk/MaxiDisk.cs index 2d2783d27..6d825cb5f 100644 --- a/Aaru.Images/MaxiDisk/MaxiDisk.cs +++ b/Aaru.Images/MaxiDisk/MaxiDisk.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -50,8 +48,8 @@ public sealed partial class MaxiDisk : IWritableImage public MaxiDisk() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Application = "MAXI Disk", diff --git a/Aaru.Images/NDIF/NDIF.cs b/Aaru.Images/NDIF/NDIF.cs index 633f16f5f..fd55faaee 100644 --- a/Aaru.Images/NDIF/NDIF.cs +++ b/Aaru.Images/NDIF/NDIF.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -58,8 +57,8 @@ public sealed partial class Ndif : IMediaImage public Ndif() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/NHDr0/Constants.cs b/Aaru.Images/NHDr0/Constants.cs index cb39508bc..28ccd016a 100644 --- a/Aaru.Images/NHDr0/Constants.cs +++ b/Aaru.Images/NHDr0/Constants.cs @@ -35,7 +35,7 @@ namespace Aaru.Images; public sealed partial class Nhdr0 { readonly byte[] _signature = - { + [ 0x54, 0x39, 0x38, 0x48, 0x44, 0x44, 0x49, 0x4D, 0x41, 0x47, 0x45, 0x2E, 0x52, 0x30, 0x00 - }; + ]; } \ No newline at end of file diff --git a/Aaru.Images/NHDr0/NHDr0.cs b/Aaru.Images/NHDr0/NHDr0.cs index 183edaa19..cbe48389c 100644 --- a/Aaru.Images/NHDr0/NHDr0.cs +++ b/Aaru.Images/NHDr0/NHDr0.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -51,8 +49,8 @@ public sealed partial class Nhdr0 : IWritableImage public Nhdr0() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/Nero/Nero.cs b/Aaru.Images/Nero/Nero.cs index 829d3ea28..1778f6d99 100644 --- a/Aaru.Images/Nero/Nero.cs +++ b/Aaru.Images/Nero/Nero.cs @@ -33,8 +33,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; -using Aaru.CommonTypes; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Decoders.CD; @@ -82,14 +80,14 @@ public sealed partial class Nero : IOpticalMediaImage _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List() + ReadableSectorTags = [], + ReadableMediaTags = [] }; _neroSessions = new Dictionary(); _neroTracks = new Dictionary(); _offsetmap = new Dictionary(); - Sessions = new List(); - Partitions = new List(); + Sessions = []; + Partitions = []; } } \ No newline at end of file diff --git a/Aaru.Images/Nero/Read.cs b/Aaru.Images/Nero/Read.cs index 35609ed84..a66ab7f20 100644 --- a/Aaru.Images/Nero/Read.cs +++ b/Aaru.Images/Nero/Read.cs @@ -109,7 +109,7 @@ public sealed partial class Nero ushort currentSession = 1; uint currentTrack = 1; - Tracks = new List(); + Tracks = []; _trackIsrCs = new Dictionary(); _imageInfo.MediaType = CommonTypes.MediaType.CD; @@ -147,7 +147,7 @@ public sealed partial class Nero { ChunkId = chunkId, ChunkSize = chunkLength, - Entries = new List() + Entries = [] }; var tmpBuffer = new byte[8]; @@ -223,7 +223,7 @@ public sealed partial class Nero { ChunkId = chunkId, ChunkSize = chunkLength, - Entries = new List() + Entries = [] }; var tmpBuffer = new byte[8]; @@ -296,7 +296,7 @@ public sealed partial class Nero _neroDaov1.TocType = BigEndianBitConverter.ToUInt16(tmpBuffer, 18); _neroDaov1.FirstTrack = tmpBuffer[20]; _neroDaov1.LastTrack = tmpBuffer[21]; - _neroDaov1.Tracks = new List(); + _neroDaov1.Tracks = []; AaruConsole.DebugWriteLine(MODULE_NAME, "neroDAOV1.ChunkSizeLe = {0} bytes", @@ -431,7 +431,7 @@ public sealed partial class Nero _neroDaov2.TocType = BigEndianBitConverter.ToUInt16(tmpBuffer, 18); _neroDaov2.FirstTrack = tmpBuffer[20]; _neroDaov2.LastTrack = tmpBuffer[21]; - _neroDaov2.Tracks = new List(); + _neroDaov2.Tracks = []; _upc = _neroDaov2.Upc; @@ -557,7 +557,7 @@ public sealed partial class Nero { ChunkId = chunkId, ChunkSize = chunkLength, - Packs = new List() + Packs = [] }; var tmpBuffer = new byte[18]; @@ -625,7 +625,7 @@ public sealed partial class Nero { ChunkId = chunkId, ChunkSize = chunkLength, - Tracks = new List() + Tracks = [] }; var tmpBuffer = new byte[12]; @@ -696,7 +696,7 @@ public sealed partial class Nero { ChunkId = chunkId, ChunkSize = chunkLength, - Tracks = new List() + Tracks = [] }; var tmpBuffer = new byte[20]; @@ -778,7 +778,7 @@ public sealed partial class Nero { ChunkId = chunkId, ChunkSize = chunkLength, - Tracks = new List() + Tracks = [] }; var tmpBuffer = new byte[32]; @@ -1911,10 +1911,7 @@ public sealed partial class Nero case SectorTagType.CdTrackFlags: if(!_trackFlags.TryGetValue(track, out byte flag)) return ErrorNumber.NoData; - buffer = new[] - { - flag - }; + buffer = [flag]; return ErrorNumber.NoError; case SectorTagType.CdTrackIsrc: diff --git a/Aaru.Images/Nero/Verify.cs b/Aaru.Images/Nero/Verify.cs index 1a26fe14b..9b394d0db 100644 --- a/Aaru.Images/Nero/Verify.cs +++ b/Aaru.Images/Nero/Verify.cs @@ -53,8 +53,8 @@ public sealed partial class Nero public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; @@ -89,8 +89,8 @@ public sealed partial class Nero public bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; diff --git a/Aaru.Images/Parallels/Parallels.cs b/Aaru.Images/Parallels/Parallels.cs index 6fafcd4aa..3190bce3e 100644 --- a/Aaru.Images/Parallels/Parallels.cs +++ b/Aaru.Images/Parallels/Parallels.cs @@ -34,7 +34,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -59,8 +58,8 @@ public sealed partial class Parallels : IWritableImage public Parallels() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = "2", diff --git a/Aaru.Images/PartClone/PartClone.cs b/Aaru.Images/PartClone/PartClone.cs index 08c8aba38..b4d347a0f 100644 --- a/Aaru.Images/PartClone/PartClone.cs +++ b/Aaru.Images/PartClone/PartClone.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Extents; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -58,8 +57,8 @@ public sealed partial class PartClone : IMediaImage, IVerifiableImage public PartClone() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Application = "PartClone", diff --git a/Aaru.Images/Partimage/Constants.cs b/Aaru.Images/Partimage/Constants.cs index 521410e7a..99619846f 100644 --- a/Aaru.Images/Partimage/Constants.cs +++ b/Aaru.Images/Partimage/Constants.cs @@ -67,8 +67,8 @@ public sealed partial class Partimage const uint MAX_CACHE_SIZE = 16777216; const uint MAX_CACHED_SECTORS = MAX_CACHE_SIZE / 512; readonly byte[] _partimageMagic = - { + [ 0x50, 0x61, 0x52, 0x74, 0x49, 0x6D, 0x41, 0x67, 0x45, 0x2D, 0x56, 0x6F, 0x4C, 0x75, 0x4D, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; + ]; } \ No newline at end of file diff --git a/Aaru.Images/Partimage/Partimage.cs b/Aaru.Images/Partimage/Partimage.cs index 88a9abb94..c23cc59b7 100644 --- a/Aaru.Images/Partimage/Partimage.cs +++ b/Aaru.Images/Partimage/Partimage.cs @@ -33,7 +33,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Extents; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -60,8 +59,8 @@ public sealed partial class Partimage : IMediaImage, IVerifiableImage public Partimage() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Application = "Partimage", diff --git a/Aaru.Images/QCOW/QCOW.cs b/Aaru.Images/QCOW/QCOW.cs index e95de5be0..ef91ca331 100644 --- a/Aaru.Images/QCOW/QCOW.cs +++ b/Aaru.Images/QCOW/QCOW.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -64,8 +63,8 @@ public sealed partial class Qcow : IWritableImage public Qcow() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = "1", diff --git a/Aaru.Images/QCOW2/QCOW2.cs b/Aaru.Images/QCOW2/QCOW2.cs index e7358dd5a..4795f8b72 100644 --- a/Aaru.Images/QCOW2/QCOW2.cs +++ b/Aaru.Images/QCOW2/QCOW2.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -65,8 +64,8 @@ public sealed partial class Qcow2 : IWritableImage public Qcow2() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/QCOW2/Write.cs b/Aaru.Images/QCOW2/Write.cs index 7d772a2ff..ae180ce9e 100644 --- a/Aaru.Images/QCOW2/Write.cs +++ b/Aaru.Images/QCOW2/Write.cs @@ -266,12 +266,7 @@ public sealed partial class Qcow2 _writingStream.Seek((long)(refBlockOffset + refCountBlockIndex), SeekOrigin.Begin); - _writingStream.Write(new byte[] - { - 0, 1 - }, - 0, - 2); + _writingStream.Write([0, 1], 0, 2); ErrorMessage = ""; diff --git a/Aaru.Images/QED/QED.cs b/Aaru.Images/QED/QED.cs index c7a3ac767..de7cbcd84 100644 --- a/Aaru.Images/QED/QED.cs +++ b/Aaru.Images/QED/QED.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -63,8 +62,8 @@ public sealed partial class Qed : IWritableImage public Qed() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = "1", diff --git a/Aaru.Images/RayDIM/RayDIM.cs b/Aaru.Images/RayDIM/RayDIM.cs index d95377f9a..b0d328931 100644 --- a/Aaru.Images/RayDIM/RayDIM.cs +++ b/Aaru.Images/RayDIM/RayDIM.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -49,8 +47,8 @@ public sealed partial class RayDim : IWritableImage public RayDim() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Application = "Ray Arachelian's Disk IMage", diff --git a/Aaru.Images/RsIde/Constants.cs b/Aaru.Images/RsIde/Constants.cs index 28b2e3349..1f4230dd5 100644 --- a/Aaru.Images/RsIde/Constants.cs +++ b/Aaru.Images/RsIde/Constants.cs @@ -34,8 +34,5 @@ namespace Aaru.Images; public sealed partial class RsIde { - readonly byte[] _signature = - { - 0x52, 0x53, 0x2D, 0x49, 0x44, 0x45, 0x1A - }; + readonly byte[] _signature = [0x52, 0x53, 0x2D, 0x49, 0x44, 0x45, 0x1A]; } \ No newline at end of file diff --git a/Aaru.Images/RsIde/RsIde.cs b/Aaru.Images/RsIde/RsIde.cs index 4a3a25acd..59144a0dc 100644 --- a/Aaru.Images/RsIde/RsIde.cs +++ b/Aaru.Images/RsIde/RsIde.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -50,8 +48,8 @@ public sealed partial class RsIde : IWritableImage public RsIde() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/SaveDskF/SaveDskF.cs b/Aaru.Images/SaveDskF/SaveDskF.cs index 9ed03a6ce..5cec4cffd 100644 --- a/Aaru.Images/SaveDskF/SaveDskF.cs +++ b/Aaru.Images/SaveDskF/SaveDskF.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -51,8 +49,8 @@ public sealed partial class SaveDskF : IWritableImage, IVerifiableImage public SaveDskF() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/SuperCardPro/Helpers.cs b/Aaru.Images/SuperCardPro/Helpers.cs index db89b9d1b..4ce18512c 100644 --- a/Aaru.Images/SuperCardPro/Helpers.cs +++ b/Aaru.Images/SuperCardPro/Helpers.cs @@ -77,10 +77,7 @@ public sealed partial class SuperCardPro if(over == 0) { - return new[] - { - (byte)ticks - }; + return [(byte)ticks]; } var expanded = new byte[over + 1]; @@ -95,7 +92,7 @@ public sealed partial class SuperCardPro static List FluxRepresentationsToUInt32List(IEnumerable flux) { - List scpData = new(); + List scpData = []; uint tick = 0; foreach(byte b in flux) @@ -116,10 +113,10 @@ public sealed partial class SuperCardPro static List FluxRepresentationsToUInt16List(IEnumerable flux, IReadOnlyList indices, out uint[] trackLengths) { - List scpData = new(); + List scpData = []; ushort tick = 0; - List revolutionLength = new(); + List revolutionLength = []; uint revolutionTicks = 0; uint revolutionCells = 0; ushort index = 0; diff --git a/Aaru.Images/SuperCardPro/Read.cs b/Aaru.Images/SuperCardPro/Read.cs index b0b55046e..3e21a266d 100644 --- a/Aaru.Images/SuperCardPro/Read.cs +++ b/Aaru.Images/SuperCardPro/Read.cs @@ -507,7 +507,7 @@ public sealed partial class SuperCardPro if(captureIndex > 0) return ErrorNumber.OutOfRange; - List tmpBuffer = new(); + List tmpBuffer = []; if(Header.flags.HasFlag(ScpFlags.StartsAtIndex)) tmpBuffer.Add(0); @@ -538,7 +538,7 @@ public sealed partial class SuperCardPro Stream stream = _scpFilter.GetDataForkStream(); var br = new BinaryReader(stream); - List tmpBuffer = new(); + List tmpBuffer = []; for(var i = 0; i < Header.revolutions; i++) { diff --git a/Aaru.Images/SuperCardPro/SuperCardPro.cs b/Aaru.Images/SuperCardPro/SuperCardPro.cs index 861ebea03..f4ce12a68 100644 --- a/Aaru.Images/SuperCardPro/SuperCardPro.cs +++ b/Aaru.Images/SuperCardPro/SuperCardPro.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -60,8 +59,8 @@ public sealed partial class SuperCardPro : IFluxImage, public SuperCardPro() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/T98/T98.cs b/Aaru.Images/T98/T98.cs index bf94712e4..ddc087311 100644 --- a/Aaru.Images/T98/T98.cs +++ b/Aaru.Images/T98/T98.cs @@ -30,10 +30,8 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -51,8 +49,8 @@ public sealed partial class T98 : IWritableImage public T98() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/TeleDisk/TeleDisk.cs b/Aaru.Images/TeleDisk/TeleDisk.cs index 98fbba057..d00591a5c 100644 --- a/Aaru.Images/TeleDisk/TeleDisk.cs +++ b/Aaru.Images/TeleDisk/TeleDisk.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -64,8 +63,8 @@ public sealed partial class TeleDisk : IMediaImage, IVerifiableImage, IVerifiabl { _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Application = "Sydex TeleDisk", @@ -85,6 +84,6 @@ public sealed partial class TeleDisk : IMediaImage, IVerifiableImage, IVerifiabl }; _aDiskCrcHasFailed = false; - _sectorsWhereCrcHasFailed = new List(); + _sectorsWhereCrcHasFailed = []; } } \ No newline at end of file diff --git a/Aaru.Images/TeleDisk/Verify.cs b/Aaru.Images/TeleDisk/Verify.cs index c6e243021..5038470ee 100644 --- a/Aaru.Images/TeleDisk/Verify.cs +++ b/Aaru.Images/TeleDisk/Verify.cs @@ -52,13 +52,12 @@ public sealed partial class TeleDisk public bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; for(ulong i = sectorAddress; i < sectorAddress + length; i++) - { - if(_sectorsWhereCrcHasFailed.Contains(sectorAddress)) failingLbas.Add(sectorAddress); - } + if(_sectorsWhereCrcHasFailed.Contains(sectorAddress)) + failingLbas.Add(sectorAddress); return failingLbas.Count <= 0; } diff --git a/Aaru.Images/UDIF/Read.cs b/Aaru.Images/UDIF/Read.cs index 4ccdbb0b9..f7a50788e 100644 --- a/Aaru.Images/UDIF/Read.cs +++ b/Aaru.Images/UDIF/Read.cs @@ -125,7 +125,7 @@ public sealed partial class Udif ArrayHelpers.ArrayIsNullOrEmpty(_footer.reserved4)); // Block chunks and headers - List blkxList = new(); + List blkxList = []; _chunks = new Dictionary(); byte[] vers = null; diff --git a/Aaru.Images/UDIF/UDIF.cs b/Aaru.Images/UDIF/UDIF.cs index 8a68a1b8e..8dc2666c3 100644 --- a/Aaru.Images/UDIF/UDIF.cs +++ b/Aaru.Images/UDIF/UDIF.cs @@ -33,7 +33,6 @@ using System.Collections.Generic; using System.IO; using Aaru.Checksums; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -62,8 +61,8 @@ public sealed partial class Udif : IWritableImage public Udif() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/UkvFdi/UkvFdi.cs b/Aaru.Images/UkvFdi/UkvFdi.cs index 9e3a04b3c..3dead42c5 100644 --- a/Aaru.Images/UkvFdi/UkvFdi.cs +++ b/Aaru.Images/UkvFdi/UkvFdi.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -51,8 +49,8 @@ public sealed partial class UkvFdi : IMediaImage public UkvFdi() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/VDI/VDI.cs b/Aaru.Images/VDI/VDI.cs index 6aa4469bc..d730db3ba 100644 --- a/Aaru.Images/VDI/VDI.cs +++ b/Aaru.Images/VDI/VDI.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -55,8 +54,8 @@ public sealed partial class Vdi : IWritableImage public Vdi() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/VHD/VHD.cs b/Aaru.Images/VHD/VHD.cs index cad6d3b37..1f6b1bdc8 100644 --- a/Aaru.Images/VHD/VHD.cs +++ b/Aaru.Images/VHD/VHD.cs @@ -31,9 +31,7 @@ // ****************************************************************************/ using System; -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -69,8 +67,8 @@ public sealed partial class Vhd : IWritableImage public Vhd() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/VHDX/VHDX.cs b/Aaru.Images/VHDX/VHDX.cs index 88b85b5ce..93212f8cd 100644 --- a/Aaru.Images/VHDX/VHDX.cs +++ b/Aaru.Images/VHDX/VHDX.cs @@ -35,7 +35,6 @@ using System; using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -77,8 +76,8 @@ public sealed partial class Vhdx : IMediaImage public Vhdx() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/VMware/VMware.cs b/Aaru.Images/VMware/VMware.cs index 1c0ca5fc2..962c1532d 100644 --- a/Aaru.Images/VMware/VMware.cs +++ b/Aaru.Images/VMware/VMware.cs @@ -32,7 +32,6 @@ using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -68,8 +67,8 @@ public sealed partial class VMware : IWritableImage public VMware() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/Virtual98/Constants.cs b/Aaru.Images/Virtual98/Constants.cs index 2dafb78b0..98c54424e 100644 --- a/Aaru.Images/Virtual98/Constants.cs +++ b/Aaru.Images/Virtual98/Constants.cs @@ -34,8 +34,5 @@ namespace Aaru.Images; public sealed partial class Virtual98 { - readonly byte[] _signature = - { - 0x56, 0x48, 0x44, 0x31, 0x2E, 0x30, 0x30, 0x00 - }; + readonly byte[] _signature = [0x56, 0x48, 0x44, 0x31, 0x2E, 0x30, 0x30, 0x00]; } \ No newline at end of file diff --git a/Aaru.Images/Virtual98/Virtual98.cs b/Aaru.Images/Virtual98/Virtual98.cs index dbd0ebeab..bdd5ee58d 100644 --- a/Aaru.Images/Virtual98/Virtual98.cs +++ b/Aaru.Images/Virtual98/Virtual98.cs @@ -30,9 +30,7 @@ // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ -using System.Collections.Generic; using System.IO; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -51,8 +49,8 @@ public sealed partial class Virtual98 : IWritableImage public Virtual98() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/WCDiskImage/WCDiskImage.cs b/Aaru.Images/WCDiskImage/WCDiskImage.cs index 862987349..f8735601e 100644 --- a/Aaru.Images/WCDiskImage/WCDiskImage.cs +++ b/Aaru.Images/WCDiskImage/WCDiskImage.cs @@ -33,7 +33,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; @@ -61,8 +60,8 @@ public sealed partial class WCDiskImage : IMediaImage /// Manages floppy disk images created with d2f by DataPackRat public WCDiskImage() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Images/ZZZRawImage/Constants.cs b/Aaru.Images/ZZZRawImage/Constants.cs index 9e8a061be..4edfe67f9 100644 --- a/Aaru.Images/ZZZRawImage/Constants.cs +++ b/Aaru.Images/ZZZRawImage/Constants.cs @@ -36,12 +36,9 @@ namespace Aaru.Images; public sealed partial class ZZZRawImage { - readonly byte[] _cdSync = - { - 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 - }; + readonly byte[] _cdSync = [0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00]; readonly (MediaTagType tag, string name)[] _readWriteSidecars = - { + [ (MediaTagType.ATA_IDENTIFY, ".identify.bin"), (MediaTagType.BD_DI, ".di.bin"), (MediaTagType.CD_ATIP, ".atip.bin"), (MediaTagType.CD_FullTOC, ".toc.bin"), (MediaTagType.CD_FirstTrackPregap, ".leadin.bin"), (MediaTagType.CD_PMA, ".pma.bin"), @@ -58,13 +55,13 @@ public sealed partial class ZZZRawImage (MediaTagType.SD_SCR, ".scr.bin"), (MediaTagType.USB_Descriptors, ".usbdescriptors.bin"), (MediaTagType.Xbox_DMI, ".xboxdmi.bin"), (MediaTagType.Xbox_PFI, ".xboxpfi.bin"), (MediaTagType.Xbox_SecuritySector, ".ss.bin") - }; + ]; readonly (MediaTagType tag, string name)[] _writeOnlySidecars = - { + [ (MediaTagType.ATAPI_IDENTIFY, ".identify.bin"), (MediaTagType.BD_BCA, ".bca.bin"), (MediaTagType.BD_DDS, ".dds.bin"), (MediaTagType.BD_DI, ".di.bin"), (MediaTagType.BD_SpareArea, ".sai.bin"), (MediaTagType.CD_LeadOut, ".leadout.bin"), (MediaTagType.MMC_CID, ".cid.bin"), (MediaTagType.MMC_CSD, ".csd.bin"), (MediaTagType.MMC_OCR, ".ocr.bin") - }; + ]; } \ No newline at end of file diff --git a/Aaru.Images/ZZZRawImage/Properties.cs b/Aaru.Images/ZZZRawImage/Properties.cs index 59ff47ac4..d8b8e1825 100644 --- a/Aaru.Images/ZZZRawImage/Properties.cs +++ b/Aaru.Images/ZZZRawImage/Properties.cs @@ -104,10 +104,7 @@ public sealed partial class ZZZRawImage if(trk.Type == TrackType.Data) trk.Type = TrackType.CdMode1; } - List lst = new() - { - trk - }; + List lst = [trk]; return lst; } @@ -129,10 +126,7 @@ public sealed partial class ZZZRawImage StartTrack = 1 }; - List lst = new() - { - sess - }; + List lst = [sess]; return lst; } @@ -145,7 +139,7 @@ public sealed partial class ZZZRawImage { if(_imageInfo.MetadataMediaType != MetadataMediaType.OpticalDisc) return null; - List parts = new(); + List parts = []; var part = new Partition { @@ -187,7 +181,7 @@ public sealed partial class ZZZRawImage { get { - List types = new(); + List types = []; foreach(MediaType type in Enum.GetValues(typeof(MediaType))) { diff --git a/Aaru.Images/ZZZRawImage/Read.cs b/Aaru.Images/ZZZRawImage/Read.cs index efb8b50b1..a9d814821 100644 --- a/Aaru.Images/ZZZRawImage/Read.cs +++ b/Aaru.Images/ZZZRawImage/Read.cs @@ -1190,7 +1190,7 @@ public sealed partial class ZZZRawImage // Do nothing. } - _imageInfo.ReadableMediaTags = new List(_mediaTags.Keys); + _imageInfo.ReadableMediaTags = [.._mediaTags.Keys]; if(_rawDvd) { @@ -1378,10 +1378,7 @@ public sealed partial class ZZZRawImage Session = 1 }; - List lst = new() - { - trk - }; + List lst = [trk]; return lst; } @@ -1409,10 +1406,7 @@ public sealed partial class ZZZRawImage Session = 1 }; - List lst = new() - { - trk - }; + List lst = [trk]; return lst; } @@ -1480,10 +1474,7 @@ public sealed partial class ZZZRawImage if(tag == SectorTagType.CdTrackFlags) { - buffer = new byte[] - { - 4 - }; + buffer = [4]; return ErrorNumber.NoError; } diff --git a/Aaru.Images/ZZZRawImage/Verify.cs b/Aaru.Images/ZZZRawImage/Verify.cs index 18ce4b11a..7f1c5a6b5 100644 --- a/Aaru.Images/ZZZRawImage/Verify.cs +++ b/Aaru.Images/ZZZRawImage/Verify.cs @@ -57,16 +57,16 @@ public sealed partial class ZZZRawImage { if(!_rawCompactDisc) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; for(ulong i = sectorAddress; i < sectorAddress + length; i++) unknownLbas.Add(i); return null; } - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; @@ -103,16 +103,16 @@ public sealed partial class ZZZRawImage { if(!_rawCompactDisc) { - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; for(ulong i = sectorAddress; i < sectorAddress + length; i++) unknownLbas.Add(i); return null; } - failingLbas = new List(); - unknownLbas = new List(); + failingLbas = []; + unknownLbas = []; ErrorNumber errno = ReadSectorsLong(sectorAddress, length, track, out byte[] buffer); if(errno != ErrorNumber.NoError) return null; diff --git a/Aaru.Images/ZZZRawImage/ZZZRawImage.cs b/Aaru.Images/ZZZRawImage/ZZZRawImage.cs index eed59d2dc..fbb6faae9 100644 --- a/Aaru.Images/ZZZRawImage/ZZZRawImage.cs +++ b/Aaru.Images/ZZZRawImage/ZZZRawImage.cs @@ -63,8 +63,8 @@ public sealed partial class ZZZRawImage : IWritableOpticalImage /// Implements reading and writing raw (sector by sector) images public ZZZRawImage() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), - ReadableMediaTags = new List(), + ReadableSectorTags = [], + ReadableMediaTags = [], HasPartitions = false, HasSessions = false, Version = null, diff --git a/Aaru.Partitions/Acorn.cs b/Aaru.Partitions/Acorn.cs index 16727ed80..1d912076b 100644 --- a/Aaru.Partitions/Acorn.cs +++ b/Aaru.Partitions/Acorn.cs @@ -71,7 +71,7 @@ public sealed class Acorn : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; ulong counter = 0; diff --git a/Aaru.Partitions/AppleMap.cs b/Aaru.Partitions/AppleMap.cs index b8aefdf26..8988c462d 100644 --- a/Aaru.Partitions/AppleMap.cs +++ b/Aaru.Partitions/AppleMap.cs @@ -77,7 +77,7 @@ public sealed class AppleMap : IPartition { uint sectorSize = imagePlugin.Info.SectorSize is 2352 or 2448 ? 2048 : imagePlugin.Info.SectorSize; - partitions = new List(); + partitions = []; if(sectorOffset + 2 >= imagePlugin.Info.Sectors) return false; diff --git a/Aaru.Partitions/Apricot.cs b/Aaru.Partitions/Apricot.cs index 83e313fb6..21d135289 100644 --- a/Aaru.Partitions/Apricot.cs +++ b/Aaru.Partitions/Apricot.cs @@ -46,45 +46,30 @@ namespace Aaru.Partitions; /// Implements decoding of Apricot partitions public sealed class Apricot : IPartition { - const string MODULE_NAME = "Apricot partitions plugin"; - readonly int[] _baudRates = - { - 50, 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 19200 - }; + const string MODULE_NAME = "Apricot partitions plugin"; + readonly int[] _baudRates = [50, 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 19200]; readonly string[] _bootTypeCodes = - { + [ Localization.Non_bootable, Localization.Apricot_XI_RAM_BIOS, Localization.Generic_ROM_BIOS, Localization.Apricot_XI_ROM_BIOS, Localization.Apricot_Portable_ROM_BIOS, Localization.Apricot_F1_ROM_BIOS - }; + ]; readonly string[] _diskTypeCodes = - { + [ Localization.MF1DD_70_track, "MF1DD", "MF2DD", "Winchester 5M", "Winchester 10M", "Winchester 20M" - }; - readonly int[] _lineModes = - { - 256, 200 - }; - readonly int[] _lineWidths = - { - 80, 40 - }; + ]; + readonly int[] _lineModes = [256, 200]; + readonly int[] _lineWidths = [80, 40]; readonly string[] _operatingSystemCodes = - { + [ Localization.Invalid_operating_system, "MS-DOS", "UCSD Pascal", Localization.CPM, "Concurrent CP/M" - }; + ]; readonly string[] _parityTypes = - { + [ Localization.None_parity, Localization.Odd_parity, Localization.Even_parity, Localization.Mark_parity, Localization.Space_parity - }; - readonly string[] _printDevices = - { - Localization.Parallel_print_device, Localization.Serial_print_device - }; - readonly double[] _stopBits = - { - 1, 1.5, 2 - }; + ]; + readonly string[] _printDevices = [Localization.Parallel_print_device, Localization.Serial_print_device]; + readonly double[] _stopBits = [1, 1.5, 2]; #region IPartition Members @@ -100,7 +85,7 @@ public sealed class Apricot : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; // I think Apricot can't chain partitions so. if(sectorOffset != 0) return false; diff --git a/Aaru.Partitions/Atari.cs b/Aaru.Partitions/Atari.cs index 20076d482..1e016eae1 100644 --- a/Aaru.Partitions/Atari.cs +++ b/Aaru.Partitions/Atari.cs @@ -75,7 +75,7 @@ public sealed class AtariPartitions : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; ErrorNumber errno = imagePlugin.ReadSector(sectorOffset, out byte[] sector); diff --git a/Aaru.Partitions/BSD.cs b/Aaru.Partitions/BSD.cs index 5a8ead986..ec23c1941 100644 --- a/Aaru.Partitions/BSD.cs +++ b/Aaru.Partitions/BSD.cs @@ -55,15 +55,9 @@ public sealed class BSD : IPartition const uint MAX_LABEL_SIZE = 500; const string MODULE_NAME = "BSD disklabel plugin"; /// Known sector locations for BSD disklabel - readonly ulong[] _labelLocations = - { - 0, 1, 2, 9 - }; + readonly ulong[] _labelLocations = [0, 1, 2, 9]; /// Known byte offsets for BSD disklabel - readonly uint[] _labelOffsets = - { - 0, 9, 64, 128, 516 - }; + readonly uint[] _labelOffsets = [0, 9, 64, 128, 516]; #region IPartition Members @@ -79,7 +73,7 @@ public sealed class BSD : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; uint run = (MAX_LABEL_SIZE + _labelOffsets.Last()) / imagePlugin.Info.SectorSize; if((MAX_LABEL_SIZE + _labelOffsets.Last()) % imagePlugin.Info.SectorSize > 0) run++; diff --git a/Aaru.Partitions/DEC.cs b/Aaru.Partitions/DEC.cs index 2068467ee..3aa7ac7a6 100644 --- a/Aaru.Partitions/DEC.cs +++ b/Aaru.Partitions/DEC.cs @@ -61,7 +61,7 @@ public sealed class DEC : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; if(31 + sectorOffset >= imagePlugin.Info.Sectors) return false; diff --git a/Aaru.Partitions/DragonFlyBSD.cs b/Aaru.Partitions/DragonFlyBSD.cs index 343cb4893..6a0f44271 100644 --- a/Aaru.Partitions/DragonFlyBSD.cs +++ b/Aaru.Partitions/DragonFlyBSD.cs @@ -62,7 +62,7 @@ public sealed class DragonFlyBSD : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; uint nSectors = 2048 / imagePlugin.Info.SectorSize; if(2048 % imagePlugin.Info.SectorSize > 0) nSectors++; diff --git a/Aaru.Partitions/GPT.cs b/Aaru.Partitions/GPT.cs index eebfe0c17..7e18b3f1b 100644 --- a/Aaru.Partitions/GPT.cs +++ b/Aaru.Partitions/GPT.cs @@ -66,7 +66,7 @@ public sealed class GuidPartitionTable : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; if(sectorOffset + 2 >= imagePlugin.Info.Sectors) return false; @@ -159,7 +159,7 @@ public sealed class GuidPartitionTable : IPartition var entriesBytes = new byte[temp.Length - modulo * 512]; Array.Copy(temp, modulo * 512, entriesBytes, 0, entriesBytes.Length); - List entries = new(); + List entries = []; for(var i = 0; i < hdr.entries; i++) { diff --git a/Aaru.Partitions/Human68k.cs b/Aaru.Partitions/Human68k.cs index 32cbd4d9a..5b5bce90c 100644 --- a/Aaru.Partitions/Human68k.cs +++ b/Aaru.Partitions/Human68k.cs @@ -65,7 +65,7 @@ public sealed class Human68K : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; byte[] sector; ulong sectsPerUnit; diff --git a/Aaru.Partitions/MBR.cs b/Aaru.Partitions/MBR.cs index 251e602d4..423b5ebcb 100644 --- a/Aaru.Partitions/MBR.cs +++ b/Aaru.Partitions/MBR.cs @@ -57,7 +57,7 @@ public sealed class MBR : IPartition [SuppressMessage("ReSharper", "StringLiteralTypo")] static readonly string[] _mbrTypes = - { + [ // 0x00 Localization.Empty, Localization.FAT12, Localization.XENIX_root, Localization.XENIX_usr, @@ -301,7 +301,7 @@ public sealed class MBR : IPartition // 0xFC Localization.VMWare_VMKCORE, Localization.Linux_RAID_FreeDOS, Localization.SpeedStor_LANStep_PS2_IML, Localization.Xenix_bad_block - }; + ]; #region IPartition Members @@ -320,7 +320,7 @@ public sealed class MBR : IPartition { ulong counter = 0; - partitions = new List(); + partitions = []; if(imagePlugin.Info.SectorSize < 512) return false; @@ -656,7 +656,7 @@ public sealed class MBR : IPartition static bool GetMinix(IMediaImage imagePlugin, ulong start, ulong divider, ulong sectorOffset, uint sectorSize, out List partitions) { - partitions = new List(); + partitions = []; ErrorNumber errno = imagePlugin.ReadSector(start, out byte[] sector); diff --git a/Aaru.Partitions/NeXT.cs b/Aaru.Partitions/NeXT.cs index ab8d7ebd6..dcf0fd7a1 100644 --- a/Aaru.Partitions/NeXT.cs +++ b/Aaru.Partitions/NeXT.cs @@ -84,7 +84,7 @@ public sealed class NeXTDisklabel : IPartition uint sectorSize = imagePlugin.Info.SectorSize is 2352 or 2448 ? 2048 : imagePlugin.Info.SectorSize; - partitions = new List(); + partitions = []; ulong labelPosition = 0; ErrorNumber errno; diff --git a/Aaru.Partitions/PC98.cs b/Aaru.Partitions/PC98.cs index 688ebd749..63b1e7fb4 100644 --- a/Aaru.Partitions/PC98.cs +++ b/Aaru.Partitions/PC98.cs @@ -62,7 +62,7 @@ public sealed class PC98 : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; if(sectorOffset != 0) return false; diff --git a/Aaru.Partitions/Plan9.cs b/Aaru.Partitions/Plan9.cs index 4d36b03d6..7ef00e024 100644 --- a/Aaru.Partitions/Plan9.cs +++ b/Aaru.Partitions/Plan9.cs @@ -63,7 +63,7 @@ public sealed class Plan9 : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; if(sectorOffset + 2 >= imagePlugin.Info.Sectors) return false; diff --git a/Aaru.Partitions/RDB.cs b/Aaru.Partitions/RDB.cs index 55326ce40..15db30459 100644 --- a/Aaru.Partitions/RDB.cs +++ b/Aaru.Partitions/RDB.cs @@ -192,7 +192,7 @@ public sealed class AmigaRigidDiskBlock : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; ulong rdbBlock = 0; var foundRdb = false; ErrorNumber errno; @@ -367,7 +367,7 @@ public sealed class AmigaRigidDiskBlock : IPartition AaruConsole.DebugWriteLine(MODULE_NAME, "RDB.reserved25 = 0x{0:X8}", rdb.Reserved25); // Reading BadBlock list - List badBlockChain = new(); + List badBlockChain = []; ulong nextBlock = rdb.BadblockPtr; while(nextBlock != 0xFFFFFFFF) @@ -428,7 +428,7 @@ public sealed class AmigaRigidDiskBlock : IPartition } // Reading BadBlock list - List partitionEntries = new(); + List partitionEntries = []; nextBlock = rdb.PartitionPtr; while(nextBlock != 0xFFFFFFFF) @@ -610,8 +610,8 @@ public sealed class AmigaRigidDiskBlock : IPartition } // Reading BadBlock list - List fshdEntries = new(); - List segmentEntries = new(); + List fshdEntries = []; + List segmentEntries = []; nextBlock = rdb.FsheaderPtr; while(nextBlock != 0xFFFFFFFF) diff --git a/Aaru.Partitions/SGI.cs b/Aaru.Partitions/SGI.cs index 67f84a57a..2d5772b9a 100644 --- a/Aaru.Partitions/SGI.cs +++ b/Aaru.Partitions/SGI.cs @@ -67,7 +67,7 @@ public sealed class SGI : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; ErrorNumber errno = imagePlugin.ReadSector(sectorOffset, out byte[] sector); diff --git a/Aaru.Partitions/Sun.cs b/Aaru.Partitions/Sun.cs index e1997bd78..93fa07ada 100644 --- a/Aaru.Partitions/Sun.cs +++ b/Aaru.Partitions/Sun.cs @@ -97,7 +97,7 @@ public sealed class SunDisklabel : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; if(imagePlugin.Info.SectorSize < 512) return false; diff --git a/Aaru.Partitions/UNIX.cs b/Aaru.Partitions/UNIX.cs index 35840f135..24a61be66 100644 --- a/Aaru.Partitions/UNIX.cs +++ b/Aaru.Partitions/UNIX.cs @@ -48,8 +48,8 @@ namespace Aaru.Partitions; public sealed class UNIX : IPartition { readonly Partition[] RA60 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -60,7 +60,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -71,7 +71,7 @@ public sealed class UNIX : IPartition Offset = 4915200, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -82,7 +82,7 @@ public sealed class UNIX : IPartition Offset = 15155200, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -93,7 +93,7 @@ public sealed class UNIX : IPartition Offset = 15257600, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -104,7 +104,7 @@ public sealed class UNIX : IPartition Offset = 18329600, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -115,7 +115,7 @@ public sealed class UNIX : IPartition Offset = 18329600, Sequence = 4 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -126,7 +126,7 @@ public sealed class UNIX : IPartition Offset = 111353856, Sequence = 5 }, - new() + new Partition { Description = null, Name = Localization.maintenance_area, @@ -137,11 +137,11 @@ public sealed class UNIX : IPartition Offset = 204378112, Sequence = 8 } - }; + ]; readonly Partition[] RA80 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -152,7 +152,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -163,7 +163,7 @@ public sealed class UNIX : IPartition Offset = 4915200, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -174,7 +174,7 @@ public sealed class UNIX : IPartition Offset = 15155200, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -185,7 +185,7 @@ public sealed class UNIX : IPartition Offset = 15257600, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -196,7 +196,7 @@ public sealed class UNIX : IPartition Offset = 18329600, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.maintenance_area, @@ -207,11 +207,11 @@ public sealed class UNIX : IPartition Offset = 120940544, Sequence = 8 } - }; + ]; readonly Partition[] RA81 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -222,7 +222,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -233,7 +233,7 @@ public sealed class UNIX : IPartition Offset = 4915200, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -244,7 +244,7 @@ public sealed class UNIX : IPartition Offset = 15155200, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -255,7 +255,7 @@ public sealed class UNIX : IPartition Offset = 15257600, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -266,7 +266,7 @@ public sealed class UNIX : IPartition Offset = 18329600, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -277,7 +277,7 @@ public sealed class UNIX : IPartition Offset = 18329600, Sequence = 4 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -288,7 +288,7 @@ public sealed class UNIX : IPartition Offset = 111353856, Sequence = 5 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -299,7 +299,7 @@ public sealed class UNIX : IPartition Offset = 204378112, Sequence = 6 }, - new() + new Partition { Description = null, Name = Localization.maintenance_area, @@ -310,11 +310,11 @@ public sealed class UNIX : IPartition Offset = 455716864, Sequence = 8 } - }; + ]; readonly Partition[] RC25 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -325,7 +325,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -336,7 +336,7 @@ public sealed class UNIX : IPartition Offset = 4608000, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -347,7 +347,7 @@ public sealed class UNIX : IPartition Offset = 4710400, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -358,7 +358,7 @@ public sealed class UNIX : IPartition Offset = 6758400, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -369,7 +369,7 @@ public sealed class UNIX : IPartition Offset = 6758400, Sequence = 4 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -380,7 +380,7 @@ public sealed class UNIX : IPartition Offset = 6758400, Sequence = 5 }, - new() + new Partition { Description = null, Name = Localization.maintenance_area, @@ -391,11 +391,11 @@ public sealed class UNIX : IPartition Offset = 26009600, Sequence = 8 } - }; + ]; readonly Partition[] RD31 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -406,7 +406,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -417,7 +417,7 @@ public sealed class UNIX : IPartition Offset = 4966400, Sequence = 5 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -428,7 +428,7 @@ public sealed class UNIX : IPartition Offset = 5017600, Sequence = 5 }, - new() + new Partition { Description = null, Name = "/usr", @@ -439,7 +439,7 @@ public sealed class UNIX : IPartition Offset = 6553600, Sequence = 6 }, - new() + new Partition { Description = null, Name = Localization.maintenance_area, @@ -450,11 +450,11 @@ public sealed class UNIX : IPartition Offset = 21262336, Sequence = 8 } - }; + ]; readonly Partition[] RD32 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -465,7 +465,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -476,7 +476,7 @@ public sealed class UNIX : IPartition Offset = 4966400, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -487,7 +487,7 @@ public sealed class UNIX : IPartition Offset = 13824000, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -498,7 +498,7 @@ public sealed class UNIX : IPartition Offset = 13875200, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -509,7 +509,7 @@ public sealed class UNIX : IPartition Offset = 15411200, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.maintenance_area, @@ -520,11 +520,11 @@ public sealed class UNIX : IPartition Offset = 42584064, Sequence = 8 } - }; + ]; readonly Partition[] RD51 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -535,7 +535,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -546,7 +546,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -557,7 +557,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -568,7 +568,7 @@ public sealed class UNIX : IPartition Offset = 6758400, Sequence = 4 }, - new() + new Partition { Description = null, Name = Localization.maintenance_area, @@ -579,11 +579,11 @@ public sealed class UNIX : IPartition Offset = 11042816, Sequence = 8 } - }; + ]; readonly Partition[] RD52 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -594,7 +594,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -605,7 +605,7 @@ public sealed class UNIX : IPartition Offset = 4966400, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -616,7 +616,7 @@ public sealed class UNIX : IPartition Offset = 13824000, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -627,7 +627,7 @@ public sealed class UNIX : IPartition Offset = 13875200, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -638,7 +638,7 @@ public sealed class UNIX : IPartition Offset = 15411200, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.maintenance_area, @@ -649,11 +649,11 @@ public sealed class UNIX : IPartition Offset = 30949376, Sequence = 8 } - }; + ]; readonly Partition[] RD53 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -664,7 +664,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -675,7 +675,7 @@ public sealed class UNIX : IPartition Offset = 4966400, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -686,7 +686,7 @@ public sealed class UNIX : IPartition Offset = 13824000, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -697,7 +697,7 @@ public sealed class UNIX : IPartition Offset = 13875200, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -708,7 +708,7 @@ public sealed class UNIX : IPartition Offset = 15411200, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.maintenance_area, @@ -719,11 +719,11 @@ public sealed class UNIX : IPartition Offset = 70983680, Sequence = 8 } - }; + ]; readonly Partition[] RD54 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -734,7 +734,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -745,7 +745,7 @@ public sealed class UNIX : IPartition Offset = 4966400, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -756,7 +756,7 @@ public sealed class UNIX : IPartition Offset = 13824000, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -767,7 +767,7 @@ public sealed class UNIX : IPartition Offset = 13875200, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -778,7 +778,7 @@ public sealed class UNIX : IPartition Offset = 15411200, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.maintenance_area, @@ -789,11 +789,11 @@ public sealed class UNIX : IPartition Offset = 159318016, Sequence = 8 } - }; + ]; readonly Partition[] RK06 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -804,7 +804,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -815,7 +815,7 @@ public sealed class UNIX : IPartition Offset = 4055040, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -826,7 +826,7 @@ public sealed class UNIX : IPartition Offset = 4106240, Sequence = 1 }, - new() + new Partition { Description = null, Name = "/usr", @@ -837,7 +837,7 @@ public sealed class UNIX : IPartition Offset = 5609472, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.bad_sector_file, @@ -848,11 +848,11 @@ public sealed class UNIX : IPartition Offset = 13865984, Sequence = 8 } - }; + ]; readonly Partition[] RK07 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -863,7 +863,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -874,7 +874,7 @@ public sealed class UNIX : IPartition Offset = 4055040, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -885,7 +885,7 @@ public sealed class UNIX : IPartition Offset = 4106240, Sequence = 1 }, - new() + new Partition { Description = null, Name = "/usr", @@ -896,7 +896,7 @@ public sealed class UNIX : IPartition Offset = 5609472, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.bad_sector_file, @@ -907,11 +907,11 @@ public sealed class UNIX : IPartition Offset = 27517952, Sequence = 8 } - }; + ]; readonly Partition[] RM02 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -922,7 +922,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -933,7 +933,7 @@ public sealed class UNIX : IPartition Offset = 4669440, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -944,7 +944,7 @@ public sealed class UNIX : IPartition Offset = 2764800, Sequence = 1 }, - new() + new Partition { Description = null, Name = "/usr", @@ -955,7 +955,7 @@ public sealed class UNIX : IPartition Offset = 14909440, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -966,7 +966,7 @@ public sealed class UNIX : IPartition Offset = 17776640, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -977,7 +977,7 @@ public sealed class UNIX : IPartition Offset = 17776640, Sequence = 4 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -988,7 +988,7 @@ public sealed class UNIX : IPartition Offset = 34242560, Sequence = 5 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -999,7 +999,7 @@ public sealed class UNIX : IPartition Offset = 50708480, Sequence = 6 }, - new() + new Partition { Description = null, Name = Localization.bad_sector_file, @@ -1010,11 +1010,11 @@ public sealed class UNIX : IPartition Offset = 67387392, Sequence = 8 } - }; + ]; readonly Partition[] RM05 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -1025,7 +1025,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -1036,7 +1036,7 @@ public sealed class UNIX : IPartition Offset = 5292032, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -1047,7 +1047,7 @@ public sealed class UNIX : IPartition Offset = 16187392, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -1058,7 +1058,7 @@ public sealed class UNIX : IPartition Offset = 16289792, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -1069,7 +1069,7 @@ public sealed class UNIX : IPartition Offset = 19611648, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -1080,7 +1080,7 @@ public sealed class UNIX : IPartition Offset = 19611648, Sequence = 4 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -1091,7 +1091,7 @@ public sealed class UNIX : IPartition Offset = 98369536, Sequence = 5 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -1102,7 +1102,7 @@ public sealed class UNIX : IPartition Offset = 98369536, Sequence = 6 }, - new() + new Partition { Description = null, Name = Localization.bad_sector_file, @@ -1113,11 +1113,11 @@ public sealed class UNIX : IPartition Offset = 215711744, Sequence = 8 } - }; + ]; readonly Partition[] RP02 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -1128,7 +1128,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -1139,7 +1139,7 @@ public sealed class UNIX : IPartition Offset = 4300800, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -1150,7 +1150,7 @@ public sealed class UNIX : IPartition Offset = 4352000, Sequence = 1 }, - new() + new Partition { Description = null, Name = "/usr", @@ -1161,11 +1161,11 @@ public sealed class UNIX : IPartition Offset = 5939200, Sequence = 2 } - }; + ]; readonly Partition[] RP03 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -1176,7 +1176,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -1187,7 +1187,7 @@ public sealed class UNIX : IPartition Offset = 4300800, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -1198,7 +1198,7 @@ public sealed class UNIX : IPartition Offset = 4352000, Sequence = 1 }, - new() + new Partition { Description = null, Name = "/usr", @@ -1209,11 +1209,11 @@ public sealed class UNIX : IPartition Offset = 5939200, Sequence = 2 } - }; + ]; readonly Partition[] RP04 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -1224,7 +1224,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -1235,7 +1235,7 @@ public sealed class UNIX : IPartition Offset = 4922368, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -1246,7 +1246,7 @@ public sealed class UNIX : IPartition Offset = 15195136, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -1257,7 +1257,7 @@ public sealed class UNIX : IPartition Offset = 15297536, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -1268,7 +1268,7 @@ public sealed class UNIX : IPartition Offset = 18405376, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.bad_sector_file, @@ -1279,11 +1279,11 @@ public sealed class UNIX : IPartition Offset = 87938048, Sequence = 8 } - }; + ]; readonly Partition[] RP06 = - { - new() + [ + new Partition { Description = null, Name = "/", @@ -1294,7 +1294,7 @@ public sealed class UNIX : IPartition Offset = 0, Sequence = 0 }, - new() + new Partition { Description = null, Name = "/usr", @@ -1305,7 +1305,7 @@ public sealed class UNIX : IPartition Offset = 4922368, Sequence = 1 }, - new() + new Partition { Description = null, Name = Localization.error_log, @@ -1316,7 +1316,7 @@ public sealed class UNIX : IPartition Offset = 15195136, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.swap, @@ -1327,7 +1327,7 @@ public sealed class UNIX : IPartition Offset = 15297536, Sequence = 2 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -1338,7 +1338,7 @@ public sealed class UNIX : IPartition Offset = 18405376, Sequence = 3 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -1349,7 +1349,7 @@ public sealed class UNIX : IPartition Offset = 18405376, Sequence = 4 }, - new() + new Partition { Description = null, Name = Localization.user, @@ -1360,7 +1360,7 @@ public sealed class UNIX : IPartition Offset = 87960576, Sequence = 5 }, - new() + new Partition { Description = null, Name = Localization.bad_sector_file, @@ -1371,7 +1371,7 @@ public sealed class UNIX : IPartition Offset = 174400512, Sequence = 8 } - }; + ]; #region IPartition Members @@ -1387,7 +1387,7 @@ public sealed class UNIX : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; Partition[] parts; if(sectorOffset != 0) return false; diff --git a/Aaru.Partitions/VTOC.cs b/Aaru.Partitions/VTOC.cs index 0c16f0364..525928bfb 100644 --- a/Aaru.Partitions/VTOC.cs +++ b/Aaru.Partitions/VTOC.cs @@ -71,7 +71,7 @@ public sealed class VTOC : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; uint magic = 0; ulong pdloc = 0; diff --git a/Aaru.Partitions/XENIX.cs b/Aaru.Partitions/XENIX.cs index f5026af2a..352f5ac18 100644 --- a/Aaru.Partitions/XENIX.cs +++ b/Aaru.Partitions/XENIX.cs @@ -67,7 +67,7 @@ public sealed class XENIX : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; if(42 + sectorOffset >= imagePlugin.Info.Sectors) return false; diff --git a/Aaru.Partitions/Xbox.cs b/Aaru.Partitions/Xbox.cs index 4acd404d2..3c53d8127 100644 --- a/Aaru.Partitions/Xbox.cs +++ b/Aaru.Partitions/Xbox.cs @@ -78,7 +78,7 @@ public sealed class Xbox : IPartition /// public bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset) { - partitions = new List(); + partitions = []; // Xbox partitions always start on 0 if(sectorOffset != 0) return false; diff --git a/Aaru.Tests/Checksums/Adler32.cs b/Aaru.Tests/Checksums/Adler32.cs index e8baaeda6..abd486114 100644 --- a/Aaru.Tests/Checksums/Adler32.cs +++ b/Aaru.Tests/Checksums/Adler32.cs @@ -38,35 +38,20 @@ namespace Aaru.Tests.Checksums; [TestFixture] public class Adler32 { - static readonly byte[] _expectedEmpty = - { - 0x00, 0xf0, 0x00, 0x01 - }; + static readonly byte[] _expectedEmpty = [0x00, 0xf0, 0x00, 0x01]; static readonly byte[] _expectedRandom = - { + [ // ReSharper disable once UseUtf8StringLiteral 0x37, 0x28, 0xd1, 0x86 - }; + ]; - static readonly byte[] _expectedRandom15 = - { - 0x34, 0xDC, 0x06, 0x7D - }; + static readonly byte[] _expectedRandom15 = [0x34, 0xDC, 0x06, 0x7D]; - static readonly byte[] _expectedRandom31 = - { - 0xD8, 0xF1, 0x0E, 0xAA - }; + static readonly byte[] _expectedRandom31 = [0xD8, 0xF1, 0x0E, 0xAA]; - static readonly byte[] _expectedRandom63 = - { - 0xD8, 0xAC, 0x20, 0x81 - }; + static readonly byte[] _expectedRandom63 = [0xD8, 0xAC, 0x20, 0x81]; - static readonly byte[] _expectedRandom2352 = - { - 0xEC, 0xD1, 0x73, 0x8B - }; + static readonly byte[] _expectedRandom2352 = [0xEC, 0xD1, 0x73, 0x8B]; [Test] public void EmptyData() diff --git a/Aaru.Tests/Checksums/CRC16CCITT.cs b/Aaru.Tests/Checksums/CRC16CCITT.cs index 9c0d784ad..90d48a06b 100644 --- a/Aaru.Tests/Checksums/CRC16CCITT.cs +++ b/Aaru.Tests/Checksums/CRC16CCITT.cs @@ -37,31 +37,16 @@ namespace Aaru.Tests.Checksums; [TestFixture] public class Crc16Ccitt { - static readonly byte[] _expectedEmpty = - { - 0xFF, 0xFF - }; + static readonly byte[] _expectedEmpty = [0xFF, 0xFF]; static readonly byte[] _expectedRandom = - { + [ // ReSharper disable once UseUtf8StringLiteral 0x36, 0x40 - }; - static readonly byte[] _expectedRandom15 = - { - 0x16, 0x6e - }; - static readonly byte[] _expectedRandom31 = - { - 0xd0, 0x16 - }; - static readonly byte[] _expectedRandom63 = - { - 0x73, 0xc4 - }; - static readonly byte[] _expectedRandom2352 = - { - 0x19, 0x46 - }; + ]; + static readonly byte[] _expectedRandom15 = [0x16, 0x6e]; + static readonly byte[] _expectedRandom31 = [0xd0, 0x16]; + static readonly byte[] _expectedRandom63 = [0x73, 0xc4]; + static readonly byte[] _expectedRandom2352 = [0x19, 0x46]; [Test] public void EmptyData() diff --git a/Aaru.Tests/Checksums/CRC16IBM.cs b/Aaru.Tests/Checksums/CRC16IBM.cs index 166ac8c72..ceebf165d 100644 --- a/Aaru.Tests/Checksums/CRC16IBM.cs +++ b/Aaru.Tests/Checksums/CRC16IBM.cs @@ -38,31 +38,16 @@ namespace Aaru.Tests.Checksums; [TestFixture] public class Crc16Ibm { - static readonly byte[] _expectedEmpty = - { - 0x00, 0x00 - }; + static readonly byte[] _expectedEmpty = [0x00, 0x00]; static readonly byte[] _expectedRandom = - { + [ // ReSharper disable once UseUtf8StringLiteral 0x2d, 0x6d - }; - static readonly byte[] _expectedRandom15 = - { - 0x72, 0xa6 - }; - static readonly byte[] _expectedRandom31 = - { - 0xf4, 0x9e - }; - static readonly byte[] _expectedRandom63 = - { - 0xfb, 0xd9 - }; - static readonly byte[] _expectedRandom2352 = - { - 0x23, 0xf4 - }; + ]; + static readonly byte[] _expectedRandom15 = [0x72, 0xa6]; + static readonly byte[] _expectedRandom31 = [0xf4, 0x9e]; + static readonly byte[] _expectedRandom63 = [0xfb, 0xd9]; + static readonly byte[] _expectedRandom2352 = [0x23, 0xf4]; [Test] public void EmptyData() diff --git a/Aaru.Tests/Checksums/CRC32.cs b/Aaru.Tests/Checksums/CRC32.cs index dd390d48c..387a93319 100644 --- a/Aaru.Tests/Checksums/CRC32.cs +++ b/Aaru.Tests/Checksums/CRC32.cs @@ -38,31 +38,16 @@ namespace Aaru.Tests.Checksums; [TestFixture] public class Crc32 { - static readonly byte[] _expectedEmpty = - { - 0xa7, 0x38, 0xea, 0x1c - }; + static readonly byte[] _expectedEmpty = [0xa7, 0x38, 0xea, 0x1c]; static readonly byte[] _expectedRandom = - { + [ // ReSharper disable once UseUtf8StringLiteral 0x2b, 0x6e, 0x68, 0x54 - }; - static readonly byte[] _expectedRandom15 = - { - 0xad, 0x6d, 0xa7, 0x27 - }; - static readonly byte[] _expectedRandom31 = - { - 0xa2, 0xad, 0x2f, 0xaa - }; - static readonly byte[] _expectedRandom63 = - { - 0xbf, 0xf6, 0xa3, 0x41 - }; - static readonly byte[] _expectedRandom2352 = - { - 0x08, 0xba, 0x93, 0xea - }; + ]; + static readonly byte[] _expectedRandom15 = [0xad, 0x6d, 0xa7, 0x27]; + static readonly byte[] _expectedRandom31 = [0xa2, 0xad, 0x2f, 0xaa]; + static readonly byte[] _expectedRandom63 = [0xbf, 0xf6, 0xa3, 0x41]; + static readonly byte[] _expectedRandom2352 = [0x08, 0xba, 0x93, 0xea]; [Test] public void EmptyData() diff --git a/Aaru.Tests/Checksums/CRC64.cs b/Aaru.Tests/Checksums/CRC64.cs index 2c0a96018..2b169f2b1 100644 --- a/Aaru.Tests/Checksums/CRC64.cs +++ b/Aaru.Tests/Checksums/CRC64.cs @@ -38,30 +38,12 @@ namespace Aaru.Tests.Checksums; [TestFixture] public class Crc64 { - static readonly byte[] _expectedEmpty = - { - 0x60, 0x6b, 0x70, 0xa2, 0x3e, 0xba, 0xf6, 0xc2 - }; - static readonly byte[] _expectedRandom = - { - 0xbf, 0x09, 0x99, 0x2c, 0xc5, 0xed, 0xe3, 0x8e - }; - static readonly byte[] _expectedRandom15 = - { - 0x79, 0x7F, 0x37, 0x66, 0xFD, 0x93, 0x97, 0x5B - }; - static readonly byte[] _expectedRandom31 = - { - 0xCD, 0x92, 0x01, 0x90, 0x5A, 0x79, 0x37, 0xFD - }; - static readonly byte[] _expectedRandom63 = - { - 0x29, 0xF3, 0x31, 0xFC, 0x90, 0x70, 0x2B, 0xF4 - }; - static readonly byte[] _expectedRandom2352 = - { - 0x12, 0x64, 0x35, 0xDB, 0x43, 0x47, 0x76, 0x23 - }; + static readonly byte[] _expectedEmpty = [0x60, 0x6b, 0x70, 0xa2, 0x3e, 0xba, 0xf6, 0xc2]; + static readonly byte[] _expectedRandom = [0xbf, 0x09, 0x99, 0x2c, 0xc5, 0xed, 0xe3, 0x8e]; + static readonly byte[] _expectedRandom15 = [0x79, 0x7F, 0x37, 0x66, 0xFD, 0x93, 0x97, 0x5B]; + static readonly byte[] _expectedRandom31 = [0xCD, 0x92, 0x01, 0x90, 0x5A, 0x79, 0x37, 0xFD]; + static readonly byte[] _expectedRandom63 = [0x29, 0xF3, 0x31, 0xFC, 0x90, 0x70, 0x2B, 0xF4]; + static readonly byte[] _expectedRandom2352 = [0x12, 0x64, 0x35, 0xDB, 0x43, 0x47, 0x76, 0x23]; [Test] public void EmptyData() diff --git a/Aaru.Tests/Checksums/MD5.cs b/Aaru.Tests/Checksums/MD5.cs index 8d315cb3d..e9642fcf8 100644 --- a/Aaru.Tests/Checksums/MD5.cs +++ b/Aaru.Tests/Checksums/MD5.cs @@ -39,13 +39,13 @@ namespace Aaru.Tests.Checksums; public class Md5 { static readonly byte[] _expectedEmpty = - { + [ 0xb6, 0xd8, 0x1b, 0x36, 0x0a, 0x56, 0x72, 0xd8, 0x0c, 0x27, 0x43, 0x0f, 0x39, 0x15, 0x3e, 0x2c - }; + ]; static readonly byte[] _expectedRandom = - { + [ 0xd7, 0x8f, 0x0e, 0xec, 0x41, 0x7b, 0xe3, 0x86, 0x21, 0x9b, 0x21, 0xb7, 0x00, 0x04, 0x4b, 0x95 - }; + ]; [Test] public void EmptyData() diff --git a/Aaru.Tests/Checksums/SHA1.cs b/Aaru.Tests/Checksums/SHA1.cs index ff520ac29..998099d67 100644 --- a/Aaru.Tests/Checksums/SHA1.cs +++ b/Aaru.Tests/Checksums/SHA1.cs @@ -39,15 +39,15 @@ namespace Aaru.Tests.Checksums; public class Sha1 { static readonly byte[] _expectedEmpty = - { + [ 0x3b, 0x71, 0xf4, 0x3f, 0xf3, 0x0f, 0x4b, 0x15, 0xb5, 0xcd, 0x85, 0xdd, 0x9e, 0x95, 0xeb, 0xc7, 0xe8, 0x4e, 0xb5, 0xa3 - }; + ]; static readonly byte[] _expectedRandom = - { + [ 0x72, 0x0d, 0x3b, 0x71, 0x7d, 0xe0, 0xc7, 0x4c, 0x77, 0xdd, 0x9c, 0xaa, 0x9e, 0xba, 0x50, 0x60, 0xdc, 0xbd, 0x28, 0x8d - }; + ]; [Test] public void EmptyData() diff --git a/Aaru.Tests/Checksums/SHA256.cs b/Aaru.Tests/Checksums/SHA256.cs index e09c2c94b..10d988862 100644 --- a/Aaru.Tests/Checksums/SHA256.cs +++ b/Aaru.Tests/Checksums/SHA256.cs @@ -39,15 +39,15 @@ namespace Aaru.Tests.Checksums; public class Sha256 { static readonly byte[] _expectedEmpty = - { + [ 0x30, 0xe1, 0x49, 0x55, 0xeb, 0xf1, 0x35, 0x22, 0x66, 0xdc, 0x2f, 0xf8, 0x06, 0x7e, 0x68, 0x10, 0x46, 0x07, 0xe7, 0x50, 0xab, 0xb9, 0xd3, 0xb3, 0x65, 0x82, 0xb8, 0xaf, 0x90, 0x9f, 0xcb, 0x58 - }; + ]; static readonly byte[] _expectedRandom = - { + [ 0x4d, 0x1a, 0x6b, 0x8a, 0x54, 0x67, 0x00, 0xc4, 0x8e, 0xda, 0x70, 0xd3, 0x39, 0x1c, 0x8f, 0x15, 0x8a, 0x8d, 0x12, 0xb2, 0x38, 0x92, 0x89, 0x29, 0x50, 0x47, 0x8c, 0x41, 0x8e, 0x25, 0xcc, 0x39 - }; + ]; [Test] public void EmptyData() diff --git a/Aaru.Tests/Checksums/SHA384.cs b/Aaru.Tests/Checksums/SHA384.cs index 27e2284fc..0fd7021f8 100644 --- a/Aaru.Tests/Checksums/SHA384.cs +++ b/Aaru.Tests/Checksums/SHA384.cs @@ -39,17 +39,17 @@ namespace Aaru.Tests.Checksums; public class Sha384 { static readonly byte[] _expectedEmpty = - { + [ 0x31, 0x64, 0x67, 0x3a, 0x8a, 0xc2, 0x75, 0x76, 0xab, 0x5f, 0xc0, 0x6b, 0x9a, 0xdc, 0x4c, 0xe0, 0xac, 0xa5, 0xbd, 0x30, 0x25, 0x38, 0x4b, 0x1c, 0xf2, 0x12, 0x8a, 0x87, 0x95, 0xe7, 0x47, 0xc4, 0x31, 0xe8, 0x82, 0x78, 0x5a, 0x0b, 0xf8, 0xdc, 0x70, 0xb4, 0x29, 0x95, 0xdb, 0x38, 0x85, 0x75 - }; + ]; static readonly byte[] _expectedRandom = - { + [ 0xdb, 0x53, 0x0e, 0x17, 0x9b, 0x81, 0xfe, 0x5f, 0x6d, 0x20, 0x41, 0x04, 0x6e, 0x77, 0xd9, 0x85, 0xf2, 0x85, 0x8a, 0x66, 0xca, 0xd3, 0x8d, 0x1a, 0xd5, 0xac, 0x67, 0xa9, 0x74, 0xe1, 0xef, 0x3f, 0x4d, 0xdf, 0x94, 0x15, 0x2e, 0xac, 0x2e, 0xfe, 0x16, 0x95, 0x81, 0x54, 0xdc, 0x59, 0xd4, 0xc3 - }; + ]; [Test] public void EmptyData() diff --git a/Aaru.Tests/Checksums/SHA512.cs b/Aaru.Tests/Checksums/SHA512.cs index 130956976..3dca51622 100644 --- a/Aaru.Tests/Checksums/SHA512.cs +++ b/Aaru.Tests/Checksums/SHA512.cs @@ -39,19 +39,19 @@ namespace Aaru.Tests.Checksums; public class Sha512 { static readonly byte[] _expectedEmpty = - { + [ 0xd6, 0x29, 0x26, 0x85, 0xb3, 0x80, 0xe3, 0x38, 0xe0, 0x25, 0xb3, 0x41, 0x5a, 0x90, 0xfe, 0x8f, 0x9d, 0x39, 0xa4, 0x6e, 0x7b, 0xdb, 0xa8, 0xcb, 0x78, 0xc5, 0x0a, 0x33, 0x8c, 0xef, 0xca, 0x74, 0x1f, 0x69, 0xe4, 0xe4, 0x64, 0x11, 0xc3, 0x2d, 0xe1, 0xaf, 0xde, 0xdf, 0xb2, 0x68, 0xe5, 0x79, 0xa5, 0x1f, 0x81, 0xff, 0x85, 0xe5, 0x6f, 0x55, 0xb0, 0xee, 0x7c, 0x33, 0xfe, 0x8c, 0x25, 0xc9 - }; + ]; static readonly byte[] _expectedRandom = - { + [ 0x6a, 0x0a, 0x18, 0xc2, 0xad, 0xf8, 0x83, 0xac, 0x58, 0xe6, 0x21, 0x96, 0xdb, 0x8d, 0x3d, 0x0e, 0xb9, 0x87, 0xd1, 0x49, 0x24, 0x97, 0xdb, 0x15, 0xb9, 0xfc, 0xcc, 0xb0, 0x36, 0xdf, 0x64, 0xae, 0xdb, 0x3e, 0x82, 0xa0, 0x4d, 0xdc, 0xd1, 0x37, 0x48, 0x92, 0x95, 0x51, 0xf9, 0xdd, 0xab, 0x82, 0xf4, 0x8a, 0x85, 0x3f, 0x9a, 0x01, 0xb5, 0xf2, 0x8c, 0xbb, 0x4a, 0xa5, 0x1b, 0x40, 0x7c, 0xb6 - }; + ]; [Test] public void EmptyData() diff --git a/Aaru.Tests/Devices/IomegaJaz.cs b/Aaru.Tests/Devices/IomegaJaz.cs index 23baaddc5..4b39ab34c 100644 --- a/Aaru.Tests/Devices/IomegaJaz.cs +++ b/Aaru.Tests/Devices/IomegaJaz.cs @@ -40,25 +40,13 @@ namespace Aaru.Tests.Devices; [TestFixture] public class IomegaJaz { - readonly string[] _testFiles = - { - "jaz1.bin.lz" - }; + readonly string[] _testFiles = ["jaz1.bin.lz"]; - readonly MediaType[] _mediaTypes = - { - MediaType.Jaz - }; + readonly MediaType[] _mediaTypes = [MediaType.Jaz]; - readonly ulong[] _sectors = - { - 2091050 - }; + readonly ulong[] _sectors = [2091050]; - readonly uint[] _sectorSize = - { - 512 - }; + readonly uint[] _sectorSize = [512]; readonly string _dataFolder = Path.Combine(Consts.TestFilesRoot, "Device test dumps", "JAZ"); diff --git a/Aaru.Tests/Devices/LS120.cs b/Aaru.Tests/Devices/LS120.cs index c7f251bad..c7c8ec7f7 100644 --- a/Aaru.Tests/Devices/LS120.cs +++ b/Aaru.Tests/Devices/LS120.cs @@ -40,25 +40,13 @@ namespace Aaru.Tests.Devices; [TestFixture] public class Ls120 { - readonly string[] _testFiles = - { - "ls120.bin.lz", "mf2dd.bin.lz", "mf2hd.bin.lz" - }; + readonly string[] _testFiles = ["ls120.bin.lz", "mf2dd.bin.lz", "mf2hd.bin.lz"]; - readonly MediaType[] _mediaTypes = - { - MediaType.LS120, MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_HD - }; + readonly MediaType[] _mediaTypes = [MediaType.LS120, MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_HD]; - readonly ulong[] _sectors = - { - 246528, 1440, 2880 - }; + readonly ulong[] _sectors = [246528, 1440, 2880]; - readonly uint[] _sectorSize = - { - 512, 512, 512 - }; + readonly uint[] _sectorSize = [512, 512, 512]; readonly string _dataFolder = Path.Combine(Consts.TestFilesRoot, "Device test dumps", "LS-120"); diff --git a/Aaru.Tests/Devices/MultiMediaCard/CID.cs b/Aaru.Tests/Devices/MultiMediaCard/CID.cs index 56e4ef2c5..ac793ec63 100644 --- a/Aaru.Tests/Devices/MultiMediaCard/CID.cs +++ b/Aaru.Tests/Devices/MultiMediaCard/CID.cs @@ -9,50 +9,26 @@ namespace Aaru.Tests.Devices.MultiMediaCard; [TestFixture] public class CID { - readonly string[] cards = - { - "mmc_6600_32mb", "mmc_pretec_32mb", "mmc_takems_256mb" - }; + readonly string[] cards = ["mmc_6600_32mb", "mmc_pretec_32mb", "mmc_takems_256mb"]; readonly string[] cids = - { + [ "15000030303030303007b20212909701", "06000033324d202020011923a457c601", "2c0000414620484d5010a9000b1a6801" - }; + ]; - readonly byte[] manufacturers = - { - 0x15, 0x06, 0x2c - }; + readonly byte[] manufacturers = [0x15, 0x06, 0x2c]; - readonly ushort[] applications = - { - 0, 0, 0 - }; + readonly ushort[] applications = [0, 0, 0]; - readonly string[] names = - { - "000000", "32M ", "AF HMP" - }; + readonly string[] names = ["000000", "32M ", "AF HMP"]; - readonly byte[] revisions = - { - 0x07, 0x01, 0x10 - }; + readonly byte[] revisions = [0x07, 0x01, 0x10]; - readonly uint[] serials = - { - 0xb2021290, 0x1923a457, 0xa9000b1a - }; + readonly uint[] serials = [0xb2021290, 0x1923a457, 0xa9000b1a]; - readonly byte[] dates = - { - 0x97, 0xc6, 0x68 - }; + readonly byte[] dates = [0x97, 0xc6, 0x68]; - readonly byte[] crcs = - { - 0x00, 0x00, 0x00 - }; + readonly byte[] crcs = [0x00, 0x00, 0x00]; [Test] public void Test() diff --git a/Aaru.Tests/Devices/MultiMediaCard/CSD.cs b/Aaru.Tests/Devices/MultiMediaCard/CSD.cs index 7d922e4fc..9c0e5f856 100644 --- a/Aaru.Tests/Devices/MultiMediaCard/CSD.cs +++ b/Aaru.Tests/Devices/MultiMediaCard/CSD.cs @@ -11,170 +11,74 @@ namespace Aaru.Tests.Devices.MultiMediaCard; [TestFixture] public class CSD { - readonly string[] cards = - { - "mmc_6600_32mb", "mmc_pretec_32mb", "mmc_takems_256mb" - }; + readonly string[] cards = ["mmc_6600_32mb", "mmc_pretec_32mb", "mmc_takems_256mb"]; readonly string[] csds = - { + [ "8c26012a0f5901e9f6d983e392404001", "8c0e012a0ff981e9f6d981e18a400001", "905e002a1f5983d3edb683ff96400001" - }; + ]; - readonly byte[] structure_versions = - { - 2, 2, 2 - }; + readonly byte[] structure_versions = [2, 2, 2]; - readonly byte[] spec_versions = - { - 3, 3, 4 - }; + readonly byte[] spec_versions = [3, 3, 4]; - readonly byte[] taacs = - { - 38, 14, 94 - }; + readonly byte[] taacs = [38, 14, 94]; - readonly byte[] nsacs = - { - 1, 1, 0 - }; + readonly byte[] nsacs = [1, 1, 0]; - readonly byte[] speeds = - { - 42, 42, 42 - }; + readonly byte[] speeds = [42, 42, 42]; - readonly ushort[] classes = - { - 245, 255, 501 - }; + readonly ushort[] classes = [245, 255, 501]; - readonly byte[] read_block_lengths = - { - 9, 9, 9 - }; + readonly byte[] read_block_lengths = [9, 9, 9]; - readonly bool[] read_partial_blocks = - { - false, true, true - }; + readonly bool[] read_partial_blocks = [false, true, true]; - readonly bool[] write_misaligned_block = - { - false, false, false - }; + readonly bool[] write_misaligned_block = [false, false, false]; - readonly bool[] read_misaligned_block = - { - false, false, false - }; + readonly bool[] read_misaligned_block = [false, false, false]; - readonly bool[] dsr_implemented = - { - false, false, false - }; + readonly bool[] dsr_implemented = [false, false, false]; - readonly uint[] card_sizes = - { - 1959, 1959, 3919 - }; + readonly uint[] card_sizes = [1959, 1959, 3919]; - readonly byte[] min_read_current = - { - 6, 6, 5 - }; + readonly byte[] min_read_current = [6, 6, 5]; - readonly byte[] max_read_current = - { - 6, 6, 5 - }; + readonly byte[] max_read_current = [6, 6, 5]; - readonly byte[] min_write_current = - { - 6, 6, 5 - }; + readonly byte[] min_write_current = [6, 6, 5]; - readonly byte[] max_write_current = - { - 6, 6, 5 - }; + readonly byte[] max_write_current = [6, 6, 5]; - readonly byte[] size_multiplier = - { - 3, 3, 5 - }; + readonly byte[] size_multiplier = [3, 3, 5]; - readonly byte[] sector_sizes = - { - 0, 0, 0 - }; + readonly byte[] sector_sizes = [0, 0, 0]; - readonly byte[] erase_sector_sizes = - { - 31, 15, 31 - }; + readonly byte[] erase_sector_sizes = [31, 15, 31]; - readonly byte[] write_protect_group_size = - { - 3, 1, 31 - }; + readonly byte[] write_protect_group_size = [3, 1, 31]; - readonly bool[] write_protect_group_enable = - { - true, true, true - }; + readonly bool[] write_protect_group_enable = [true, true, true]; - readonly byte[] default_eccs = - { - 0, 0, 0 - }; + readonly byte[] default_eccs = [0, 0, 0]; - readonly byte[] r2w_factors = - { - 4, 2, 5 - }; + readonly byte[] r2w_factors = [4, 2, 5]; - readonly byte[] write_block_lengths = - { - 9, 9, 9 - }; + readonly byte[] write_block_lengths = [9, 9, 9]; - readonly bool[] write_partial_blocks = - { - false, false, false - }; + readonly bool[] write_partial_blocks = [false, false, false]; - readonly bool[] file_format_group = - { - false, false, false - }; + readonly bool[] file_format_group = [false, false, false]; - readonly bool[] copy = - { - true, false, false - }; + readonly bool[] copy = [true, false, false]; - readonly bool[] permanent_write_protect = - { - false, false, false - }; + readonly bool[] permanent_write_protect = [false, false, false]; - readonly bool[] temporary_write_protect = - { - false, false, false - }; + readonly bool[] temporary_write_protect = [false, false, false]; - readonly byte[] file_format = - { - 0, 0, 0 - }; + readonly byte[] file_format = [0, 0, 0]; - readonly byte[] ecc = - { - 0, 0, 0 - }; + readonly byte[] ecc = [0, 0, 0]; [Test] public void Test() diff --git a/Aaru.Tests/Devices/MultiMediaCard/ExtendedCSD.cs b/Aaru.Tests/Devices/MultiMediaCard/ExtendedCSD.cs index 5228faa27..41b826c25 100644 --- a/Aaru.Tests/Devices/MultiMediaCard/ExtendedCSD.cs +++ b/Aaru.Tests/Devices/MultiMediaCard/ExtendedCSD.cs @@ -8,44 +8,45 @@ namespace Aaru.Tests.Devices.MultiMediaCard; public class ExtendedCSD { readonly byte[][] _ecsd = - { - new byte[] - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x13, 0x00, 0x07, 0x01, - 0x01, 0x00, 0x00, 0x00, 0x15, 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x11, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x57, 0x01, - 0x05, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xC0, 0x33, 0x07, - 0x10, 0x16, 0x00, 0x07, 0x07, 0x08, 0x01, 0x05, 0x01, 0x06, 0x20, 0x00, 0x07, 0x11, 0x1B, 0x55, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x0A, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x1B, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x07, 0x05, 0x00, 0x03, 0x01, 0x3F, 0x3F, 0x01, 0x01, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }; + [ + [ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x34, 0x13, 0x00, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00, 0x15, 0x1F, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x11, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x57, 0x01, 0x05, 0x0A, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xC0, 0x33, 0x07, 0x10, 0x16, 0x00, 0x07, 0x07, + 0x08, 0x01, 0x05, 0x01, 0x06, 0x20, 0x00, 0x07, 0x11, 0x1B, 0x55, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x00, 0x1B, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x03, 0x07, 0x05, 0x00, 0x03, 0x01, 0x3F, 0x3F, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00 + ] + ]; readonly Decoders.MMC.ExtendedCSD[] _decoded = - { - new() + [ + new Decoders.MMC.ExtendedCSD { Reserved0 = new byte[15], CommandQueueModeEnable = 0, @@ -85,129 +86,126 @@ public class ExtendedCSD GeneralPurposePartitionSize = new byte[12], PartitioningSetting = 0, PartitionsAttribute = 0, - MaxEnhancedAreaSize = new byte[] - { - 52, 19, 0 - }, - PartitioningSupport = (PartitioningSupport)7, - HPIManagement = 1, - HWResetFunction = 1, - EnableBackgroundOperationsHandshake = 0, - ManuallyStartBackgroundOperations = 0, - StartSanitizeOperation = 0, - WriteReliabilityParameterRegister = 21, - WriteReliabilitySettingRegister = 31, - RPMBSize = 32, - FirmwareConfiguration = 0, - Reserved4 = 0, - UserAreaWriteProtectionRegister = 0, - Reserved5 = 0, - BootAreaWriteProtectionRegister = (BootAreaWriteProtectionRegister)17, - BootWriteProtectionStatus = 5, - HighCapacityEraseGroupDefinition = (HighCapacityEraseGroupDefinition)1, - Reserved6 = 0, - BootBusConditions = 0, - BootConfigProtection = 0, - PartitionConfiguration = 0, - Reserved7 = 0, - ErasedMemoryContent = 0, - Reserved8 = 0, - BusWidth = 0, - StrobeSupport = 1, - HighSpeedInterfaceTiming = 3, - Reserved9 = 0, - PowerClass = 0, - Reserved10 = 0, - CommandSetRevision = 0, - Reserved11 = 0, - CommandSet = 0, - Revision = 8, - Reserved12 = 0, - Structure = 2, - Reserved13 = 0, - DeviceType = (DeviceType)87, - DriverStrength = (DriverStrength)1, - OutOfInterruptBusyTiming = 5, - PartitionSwitchingTime = 10, - PowerClass52_195 = 0, - PowerClass26_195 = 0, - PowerClass52 = 0, - PowerClass26 = 0, - Reserved14 = 0, - MinimumReadPerformance26_4 = 0, - MinimumWritePerformance26_4 = 0, - MinimumReadPerformance26 = 0, - MinimumWritePerformance26 = 0, - MinimumReadPerformance52 = 0, - MinimumWritePerformance52 = 0, - SecureWriteProtectInformation = (SecureWriteProtectInformation)1, - SectorCount = 120832000, - SleepNotificationTimeout = 16, - SleepAwakeTimeout = 22, - ProductionStateAwarenessTimeout = 0, - SleepCurrentVccQ = 7, - SleepCurrentVcc = 7, - HighCapacityWriteProtectGroupSize = 8, - ReliableWriteSectorCount = 1, - HighCapacityEraseTimeout = 5, - HighCapacityEraseUnitSize = 1, - AccessSize = 6, - BootPartitionSize = 32, - Reserved15 = 0, - BootInformation = (BootInformation)7, - SecureTRIMMultiplier = 17, - SecureEraseMultiplier = 27, - SecureFeatureSupport = (SecureFeatureSupport)85, - TRIMMultiplier = 5, - Reserved16 = 0, - MinimumReadPerformanceDDR52 = 0, - MinimumWritePerformanceDDR52 = 0, - PowerClassDDR200_130 = 0, - PowerClassDDR200_195 = 0, - PowerClassDDR52_195 = 0, - PowerClassDDR52 = 0, - CacheFlushingPolicy = 0, - InitializationTimeAfterPartition = 30, - CorrectlyProgrammedSectors = 0, - BackgroundOperationsStatus = 0, - PowerOffNotificationTimeout = 60, - GenericCMD6Timeout = 10, - CacheSize = 65536, - PowerClassDDR200 = 0, - FirmwareVersion = 283, - DeviceVersion = 0, - OptimalTrimUnitSize = 1, - OptimalWriteSize = 32, - OptimalReadSize = 0, - PreEOLInformation = 1, - DeviceLifeEstimationTypeA = 1, - DeviceLifeEstimationTypeB = 1, - VendorHealthReport = new byte[32], - NumberOfFWSectorsCorrectlyProgrammed = 0, - Reserved17 = 0, - CMDQueuingDepth = 31, - CMDQueuingSupport = (CMDQueuingSupport)1, - Reserved18 = new byte[177], - BarrierSupport = 0, - FFUArgument = 0, - OperationCodesTimeout = 0, - FFUFeatures = 0, - SupportedModes = (SupportedModes)3, - ExtendedPartitionsSupport = (ExtendedPartitionsSupport)3, - LargeUnitSize = 7, - ContextManagementCaps = 5, - TagResourcesSize = 0, - TagUnitSize = 3, - DataTagSupport = (DataTagSupport)1, - MaxPackedWriteCommands = 63, - MaxPackedReadCommands = 63, - BackgroundOperationsSupport = (BackgroundOperationsSupport)1, - HPIFeatures = (HPIFeatures)1, - SupportedCommandSets = (DeviceSupportedCommandSets)1, - ExtendedSecurityCommandsError = 0, - Reserved19 = new byte[6] + MaxEnhancedAreaSize = [52, 19, 0], + PartitioningSupport = (PartitioningSupport)7, + HPIManagement = 1, + HWResetFunction = 1, + EnableBackgroundOperationsHandshake = 0, + ManuallyStartBackgroundOperations = 0, + StartSanitizeOperation = 0, + WriteReliabilityParameterRegister = 21, + WriteReliabilitySettingRegister = 31, + RPMBSize = 32, + FirmwareConfiguration = 0, + Reserved4 = 0, + UserAreaWriteProtectionRegister = 0, + Reserved5 = 0, + BootAreaWriteProtectionRegister = (BootAreaWriteProtectionRegister)17, + BootWriteProtectionStatus = 5, + HighCapacityEraseGroupDefinition = (HighCapacityEraseGroupDefinition)1, + Reserved6 = 0, + BootBusConditions = 0, + BootConfigProtection = 0, + PartitionConfiguration = 0, + Reserved7 = 0, + ErasedMemoryContent = 0, + Reserved8 = 0, + BusWidth = 0, + StrobeSupport = 1, + HighSpeedInterfaceTiming = 3, + Reserved9 = 0, + PowerClass = 0, + Reserved10 = 0, + CommandSetRevision = 0, + Reserved11 = 0, + CommandSet = 0, + Revision = 8, + Reserved12 = 0, + Structure = 2, + Reserved13 = 0, + DeviceType = (DeviceType)87, + DriverStrength = (DriverStrength)1, + OutOfInterruptBusyTiming = 5, + PartitionSwitchingTime = 10, + PowerClass52_195 = 0, + PowerClass26_195 = 0, + PowerClass52 = 0, + PowerClass26 = 0, + Reserved14 = 0, + MinimumReadPerformance26_4 = 0, + MinimumWritePerformance26_4 = 0, + MinimumReadPerformance26 = 0, + MinimumWritePerformance26 = 0, + MinimumReadPerformance52 = 0, + MinimumWritePerformance52 = 0, + SecureWriteProtectInformation = (SecureWriteProtectInformation)1, + SectorCount = 120832000, + SleepNotificationTimeout = 16, + SleepAwakeTimeout = 22, + ProductionStateAwarenessTimeout = 0, + SleepCurrentVccQ = 7, + SleepCurrentVcc = 7, + HighCapacityWriteProtectGroupSize = 8, + ReliableWriteSectorCount = 1, + HighCapacityEraseTimeout = 5, + HighCapacityEraseUnitSize = 1, + AccessSize = 6, + BootPartitionSize = 32, + Reserved15 = 0, + BootInformation = (BootInformation)7, + SecureTRIMMultiplier = 17, + SecureEraseMultiplier = 27, + SecureFeatureSupport = (SecureFeatureSupport)85, + TRIMMultiplier = 5, + Reserved16 = 0, + MinimumReadPerformanceDDR52 = 0, + MinimumWritePerformanceDDR52 = 0, + PowerClassDDR200_130 = 0, + PowerClassDDR200_195 = 0, + PowerClassDDR52_195 = 0, + PowerClassDDR52 = 0, + CacheFlushingPolicy = 0, + InitializationTimeAfterPartition = 30, + CorrectlyProgrammedSectors = 0, + BackgroundOperationsStatus = 0, + PowerOffNotificationTimeout = 60, + GenericCMD6Timeout = 10, + CacheSize = 65536, + PowerClassDDR200 = 0, + FirmwareVersion = 283, + DeviceVersion = 0, + OptimalTrimUnitSize = 1, + OptimalWriteSize = 32, + OptimalReadSize = 0, + PreEOLInformation = 1, + DeviceLifeEstimationTypeA = 1, + DeviceLifeEstimationTypeB = 1, + VendorHealthReport = new byte[32], + NumberOfFWSectorsCorrectlyProgrammed = 0, + Reserved17 = 0, + CMDQueuingDepth = 31, + CMDQueuingSupport = (CMDQueuingSupport)1, + Reserved18 = new byte[177], + BarrierSupport = 0, + FFUArgument = 0, + OperationCodesTimeout = 0, + FFUFeatures = 0, + SupportedModes = (SupportedModes)3, + ExtendedPartitionsSupport = (ExtendedPartitionsSupport)3, + LargeUnitSize = 7, + ContextManagementCaps = 5, + TagResourcesSize = 0, + TagUnitSize = 3, + DataTagSupport = (DataTagSupport)1, + MaxPackedWriteCommands = 63, + MaxPackedReadCommands = 63, + BackgroundOperationsSupport = (BackgroundOperationsSupport)1, + HPIFeatures = (HPIFeatures)1, + SupportedCommandSets = (DeviceSupportedCommandSets)1, + ExtendedSecurityCommandsError = 0, + Reserved19 = new byte[6] } - }; + ]; [Test] public void Test() diff --git a/Aaru.Tests/Devices/PocketZip.cs b/Aaru.Tests/Devices/PocketZip.cs index e528ff949..84d0ad69b 100644 --- a/Aaru.Tests/Devices/PocketZip.cs +++ b/Aaru.Tests/Devices/PocketZip.cs @@ -40,25 +40,13 @@ namespace Aaru.Tests.Devices; [TestFixture] public class PocketZip { - readonly string[] _testFiles = - { - "clik!.bin.lz", "pocketzip.bin.lz" - }; + readonly string[] _testFiles = ["clik!.bin.lz", "pocketzip.bin.lz"]; - readonly MediaType[] _mediaTypes = - { - MediaType.PocketZip, MediaType.PocketZip - }; + readonly MediaType[] _mediaTypes = [MediaType.PocketZip, MediaType.PocketZip]; - readonly ulong[] _sectors = - { - 78882, 78882 - }; + readonly ulong[] _sectors = [78882, 78882]; - readonly uint[] _sectorSize = - { - 512, 512 - }; + readonly uint[] _sectorSize = [512, 512]; readonly string _dataFolder = Path.Combine(Consts.TestFilesRoot, "Device test dumps", "PocketZIP"); diff --git a/Aaru.Tests/Devices/SecureDigital/CID.cs b/Aaru.Tests/Devices/SecureDigital/CID.cs index 71758c95b..44c30215c 100644 --- a/Aaru.Tests/Devices/SecureDigital/CID.cs +++ b/Aaru.Tests/Devices/SecureDigital/CID.cs @@ -10,56 +10,50 @@ namespace Aaru.Tests.Devices.SecureDigital; public class CID { readonly string[] cards = - { + [ "microsdhc_goodram_16gb", "microsdhc_kingston_4gb", "microsdhc_kingston_8gb", "microsdhc_kodak_2gb", "microsdhc_nobrand_2gb", "microsdhc_sandisk_16gb", "microsdhc_sandisk_32gb", "microsdhc_trascend_2gb", "sd_adata_4gb", "sdhc_fujifilm_4gb", "sdhc_kodak_4gb", "sdhc_pny_4gb", "sdhc_puntitos_4gb", "sd_pqi_64mb" - }; + ]; readonly string[] cids = - { + [ "275048534431364760011a77d2014701", "02544d534430344738b26a38aa008901", "02544d5341303847049cd164d9009a01", "1b534d30303030301075a72c7e00a501", "02544d534430324738a2cd4987009101", "035344534c313647800eace07e00e801", "0353445342333247809b2f1533012301", "1b534d30303030301000ca9e3d00b201", "1d4144534420202010000256db006701", "275048534430344730b00de36100b801", "64504320202020201088026f6400aa01", "035344534430344780708200ac009501", "035344544f000000ff000147da00fa01", "02544d5344303634055744cb0f003401" - }; + ]; readonly byte[] manufacturers = - { + [ 0x27, 0x02, 0x02, 0x1b, 0x02, 0x03, 0x03, 0x1b, 0x1d, 0x27, 0x64, 0x03, 0x03, 0x02 - }; + ]; readonly string[] applications = - { + [ "PH", "TM", "TM", "SM", "TM", "SD", "SD", "SM", "AD", "PH", "PC", "SD", "SD", "TM" - }; + ]; readonly string[] names = - { + [ "SD16G", "SD04G", "SA08G", "00000", "SD02G", "SL16G", "SB32G", "00000", "SD ", "SD04G", " ", "SD04G", "TO", "SD064" - }; + ]; - readonly byte[] revisions = - { - 0x60, 0x38, 0x04, 0x10, 0x38, 0x80, 0x80, 0x10, 0x10, 0x30, 0x10, 0x80, 0xff, 0x05 - }; + readonly byte[] revisions = [0x60, 0x38, 0x04, 0x10, 0x38, 0x80, 0x80, 0x10, 0x10, 0x30, 0x10, 0x80, 0xff, 0x05]; readonly uint[] serials = - { + [ 0x011a77d2, 0xb26a38aa, 0x9cd164d9, 0x75a72c7e, 0xa2cd4987, 0x0eace07e, 0x9b2f1533, 0x00ca9e3d, 0x000256db, 0xb00de361, 0x88026f64, 0x708200ac, 0x000147da, 0x5744cb0f - }; + ]; readonly ushort[] dates = - { + [ 0x147, 0x089, 0x09a, 0x0a5, 0x091, 0x0e8, 0x123, 0x0b2, 0x067, 0x0b8, 0x0aa, 0x095, 0x0fa, 0x034 - }; + ]; - readonly byte[] crcs = - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; + readonly byte[] crcs = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; [Test] public void Test() diff --git a/Aaru.Tests/Devices/SecureDigital/CSD.cs b/Aaru.Tests/Devices/SecureDigital/CSD.cs index 9602efcf1..eb6b2c996 100644 --- a/Aaru.Tests/Devices/SecureDigital/CSD.cs +++ b/Aaru.Tests/Devices/SecureDigital/CSD.cs @@ -10,151 +10,109 @@ namespace Aaru.Tests.Devices.SecureDigital; public class CSD { readonly string[] cards = - { + [ "microsdhc_goodram_16gb", "microsdhc_kingston_4gb", "microsdhc_kingston_8gb", "microsdhc_kodak_2gb", "microsdhc_nobrand_2gb", "microsdhc_sandisk_16gb", "microsdhc_sandisk_32gb", "microsdhc_trascend_2gb", "sd_adata_4gb", "sdhc_fujifilm_4gb", "sdhc_kodak_4gb", "sdhc_pny_4gb", "sdhc_puntitos_4gb", "sd_pqi_64mb" - }; + ]; readonly string[] csds = - { + [ "400e00325b590000740f7f800a400001", "400e00325b5900001d877f800a400001", "400e00325b5900003b677f800a400001", "002601325b5a83c7f6dbff9f16804001", "002e00325b5a83a9ffffff8016800001", "400e00325b59000076b27f800a404001", "400e00325b590000edc87f800a404001", "007fff325b5a83baf6dbdfff0e800001", "005e0032575b83d56db7ffff96c00001", "400e00325b5900001da77f800a400001", "400e00325b5900001deb7f800a400001", "400e00325b5900001d8a7f800a404001", "400e00325b5900001dbf7f800a400001", "002d0032135983c9f6d9cf8016400001" - }; + ]; - readonly byte[] structure_versions = - { - 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0 - }; + readonly byte[] structure_versions = [1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0]; - readonly byte[] taacs = - { - 14, 14, 14, 38, 46, 14, 14, 127, 94, 14, 14, 14, 14, 45 - }; + readonly byte[] taacs = [14, 14, 14, 38, 46, 14, 14, 127, 94, 14, 14, 14, 14, 45]; - readonly byte[] nsacs = - { - 0, 0, 0, 1, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0 - }; + readonly byte[] nsacs = [0, 0, 0, 1, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0]; readonly byte[] speeds = - { + [ // ReSharper disable once UseUtf8StringLiteral 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50 - }; + ]; - readonly ushort[] classes = - { - 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1397, 1461, 1461, 1461, 1461, 309 - }; + readonly ushort[] classes = [1461, 1461, 1461, 1461, 1461, 1461, 1461, 1461, 1397, 1461, 1461, 1461, 1461, 309]; - readonly byte[] read_block_lengths = - { - 9, 9, 9, 10, 10, 9, 9, 10, 11, 9, 9, 9, 9, 9 - }; + readonly byte[] read_block_lengths = [9, 9, 9, 10, 10, 9, 9, 10, 11, 9, 9, 9, 9, 9]; readonly bool[] read_partial_blocks = - { + [ false, false, false, true, true, false, false, true, true, false, false, false, false, true - }; + ]; readonly bool[] write_misaligned_block = - { + [ false, false, false, false, false, false, false, false, false, false, false, false, false, false - }; + ]; readonly bool[] read_misaligned_block = - { + [ false, false, false, false, false, false, false, false, false, false, false, false, false, false - }; + ]; readonly bool[] dsr_implemented = - { + [ false, false, false, false, false, false, false, false, false, false, false, false, false, false - }; + ]; readonly uint[] card_sizes = - { + [ 29711, 7559, 15207, 3871, 3751, 30386, 60872, 3819, 3925, 7591, 7659, 7562, 7615, 3879 - }; + ]; - readonly byte[] min_read_current = - { - 0, 0, 0, 6, 7, 0, 0, 6, 5, 0, 0, 0, 0, 6 - }; + readonly byte[] min_read_current = [0, 0, 0, 6, 7, 0, 0, 6, 5, 0, 0, 0, 0, 6]; - readonly byte[] max_read_current = - { - 0, 0, 0, 6, 7, 0, 0, 6, 5, 0, 0, 0, 0, 6 - }; + readonly byte[] max_read_current = [0, 0, 0, 6, 7, 0, 0, 6, 5, 0, 0, 0, 0, 6]; - readonly byte[] min_write_current = - { - 0, 0, 0, 6, 7, 0, 0, 6, 5, 0, 0, 0, 0, 6 - }; + readonly byte[] min_write_current = [0, 0, 0, 6, 7, 0, 0, 6, 5, 0, 0, 0, 0, 6]; - readonly byte[] max_write_current = - { - 0, 0, 0, 6, 7, 0, 0, 6, 5, 0, 0, 0, 0, 6 - }; + readonly byte[] max_write_current = [0, 0, 0, 6, 7, 0, 0, 6, 5, 0, 0, 0, 0, 6]; - readonly byte[] size_multiplier = - { - 0, 0, 0, 7, 7, 0, 0, 7, 7, 0, 0, 0, 0, 3 - }; + readonly byte[] size_multiplier = [0, 0, 0, 7, 7, 0, 0, 7, 7, 0, 0, 0, 0, 3]; readonly bool[] erase_block_enable = - { + [ true, true, true, true, true, true, true, true, true, true, true, true, true, true - }; + ]; - readonly byte[] erase_sector_sizes = - { - 127, 127, 127, 127, 127, 127, 127, 63, 127, 127, 127, 127, 127, 31 - }; + readonly byte[] erase_sector_sizes = [127, 127, 127, 127, 127, 127, 127, 63, 127, 127, 127, 127, 127, 31]; - readonly byte[] write_protect_group_size = - { - 0, 0, 0, 31, 0, 0, 0, 127, 127, 0, 0, 0, 0, 0 - }; + readonly byte[] write_protect_group_size = [0, 0, 0, 31, 0, 0, 0, 127, 127, 0, 0, 0, 0, 0]; readonly bool[] write_protect_group_enable = - { + [ false, false, false, false, false, false, false, false, true, false, false, false, false, false - }; + ]; - readonly byte[] r2w_factors = - { - 2, 2, 2, 5, 5, 2, 2, 3, 5, 2, 2, 2, 2, 5 - }; + readonly byte[] r2w_factors = [2, 2, 2, 5, 5, 2, 2, 3, 5, 2, 2, 2, 2, 5]; readonly bool[] file_format_group = - { + [ false, false, false, false, false, false, false, false, false, false, false, false, false, false - }; + ]; readonly bool[] copy = - { + [ false, false, false, true, false, true, true, false, false, false, false, true, false, false, false - }; + ]; readonly bool[] permanent_write_protect = - { + [ false, false, false, false, false, false, false, false, false, false, false, false, false, false - }; + ]; readonly bool[] temporary_write_protect = - { + [ false, false, false, false, false, false, false, false, false, false, false, false, false, false - }; + ]; - readonly byte[] file_format = - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; + readonly byte[] file_format = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; [Test] public void Test() diff --git a/Aaru.Tests/Devices/SecureDigital/SCR.cs b/Aaru.Tests/Devices/SecureDigital/SCR.cs index 865c8758c..73157c414 100644 --- a/Aaru.Tests/Devices/SecureDigital/SCR.cs +++ b/Aaru.Tests/Devices/SecureDigital/SCR.cs @@ -11,128 +11,55 @@ namespace Aaru.Tests.Devices.SecureDigital; public class SCR { readonly string[] cards = - { + [ "microsdhc_goodram_16gb", "microsdhc_kingston_4gb", "microsdhc_kingston_8gb", "microsdhc_kodak_2gb", "microsdhc_nobrand_2gb", "microsdhc_sandisk_16gb", "microsdhc_sandisk_32gb", "microsdhc_trascend_2gb", "sd_adata_4gb", "sdhc_fujifilm_4gb", "sdhc_kodak_4gb", "sdhc_pny_4gb", "sdhc_puntitos_4gb", "sd_pqi_64mb" - }; + ]; readonly string[] scrs = - { + [ "0205808301000000", "02b500001c022102", "0235800001000000", "02a5000000000000", "02a500001c021402", "0235800100000000", "0235804300000000", "0225800000000000", "0125000000000000", "0235800001000000", "0235000000000000", "0235000000000000", "02b5800000000000", "00a5000008070302" - }; + ]; - readonly byte[] structure_version = - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; + readonly byte[] structure_version = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - readonly byte[] specification_version = - { - 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 0 - }; + readonly byte[] specification_version = [2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 0]; readonly bool[] data_stat_after_erase = - { + [ false, true, false, true, true, false, false, false, false, false, false, false, true, true - }; + ]; - readonly byte[] sd_security = - { - 0, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, 2 - }; + readonly byte[] sd_security = [0, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, 2]; - readonly byte[] sd_bus_widths = - { - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 - }; + readonly byte[] sd_bus_widths = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]; readonly bool[] sd_spec3 = - { + [ true, false, true, false, false, true, true, true, false, true, false, false, true, false - }; + ]; - readonly byte[] ex_security = - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; + readonly byte[] ex_security = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; readonly bool[] sd_spec4 = - { + [ false, false, false, false, false, false, false, false, false, false, false, false, false, false - }; + ]; - readonly byte[] sd_specx = - { - 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 - }; + readonly byte[] sd_specx = [2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]; - readonly byte[] cmd_support = - { - 3, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0 - }; + readonly byte[] cmd_support = [3, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0]; readonly byte[][] mfg = - { - new byte[] - { - 0x01, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x1c, 0x02, 0x21, 0x02 - }, - new byte[] - { - 0x01, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x00, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x1c, 0x02, 0x14, 0x02 - }, - new byte[] - { - 0x00, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x00, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x00, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x00, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x01, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x00, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x00, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x00, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0x08, 0x07, 0x03, 0x02 - } - }; + [ + [0x01, 0x00, 0x00, 0x00], [0x1c, 0x02, 0x21, 0x02], [0x01, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x00], + [0x1c, 0x02, 0x14, 0x02], [0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x00], + [0x00, 0x00, 0x00, 0x00], [0x01, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x00], [0x00, 0x00, 0x00, 0x00], + [0x00, 0x00, 0x00, 0x00], [0x08, 0x07, 0x03, 0x02] + ]; [Test] public void Test() diff --git a/Aaru.Tests/Filesystems/ADFS.cs b/Aaru.Tests/Filesystems/ADFS.cs index 0fd55941f..a3c42bb27 100644 --- a/Aaru.Tests/Filesystems/ADFS.cs +++ b/Aaru.Tests/Filesystems/ADFS.cs @@ -43,8 +43,8 @@ public class Adfs() : FilesystemTest("adfs") public override IFilesystem Plugin => new AcornADFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "adfs_d.adf.lz", @@ -149,5 +149,5 @@ public class Adfs() : FilesystemTest("adfs") Clusters = 78336, ClusterSize = 256 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AFFS/APM.cs b/Aaru.Tests/Filesystems/AFFS/APM.cs index 3a480872a..d1344dfec 100644 --- a/Aaru.Tests/Filesystems/AFFS/APM.cs +++ b/Aaru.Tests/Filesystems/AFFS/APM.cs @@ -43,8 +43,8 @@ public class APM() : FilesystemTest("affs") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "morphos_3.13.aif", @@ -78,5 +78,5 @@ public class APM() : FilesystemTest("affs") VolumeName = "VolumeLabel", VolumeSerial = "1D93031D" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AFFS/MBR+RDB.cs b/Aaru.Tests/Filesystems/AFFS/MBR+RDB.cs index f6814bed9..dac706854 100644 --- a/Aaru.Tests/Filesystems/AFFS/MBR+RDB.cs +++ b/Aaru.Tests/Filesystems/AFFS/MBR+RDB.cs @@ -45,8 +45,8 @@ public class MBR_RDB() : FilesystemTest("affs") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "aros.aif", @@ -69,5 +69,5 @@ public class MBR_RDB() : FilesystemTest("affs") VolumeName = "Volume label", VolumeSerial = "A5833CD0" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AFFS/MBR.cs b/Aaru.Tests/Filesystems/AFFS/MBR.cs index 6cfcd4d15..39d64aa36 100644 --- a/Aaru.Tests/Filesystems/AFFS/MBR.cs +++ b/Aaru.Tests/Filesystems/AFFS/MBR.cs @@ -43,8 +43,8 @@ public class MBR() : FilesystemTest("affs") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "aros.aif", @@ -67,5 +67,5 @@ public class MBR() : FilesystemTest("affs") VolumeName = "Volume label", VolumeSerial = "A582BC91" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AFFS/RDB.cs b/Aaru.Tests/Filesystems/AFFS/RDB.cs index 26b70bf7e..3893d1368 100644 --- a/Aaru.Tests/Filesystems/AFFS/RDB.cs +++ b/Aaru.Tests/Filesystems/AFFS/RDB.cs @@ -43,8 +43,8 @@ public class RDB() : FilesystemTest("affs") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amigaos_3.9.aif", @@ -155,5 +155,5 @@ public class RDB() : FilesystemTest("affs") VolumeName = "VolumeLabel", VolumeSerial = "1D92FD23" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AFFS/Whole.cs b/Aaru.Tests/Filesystems/AFFS/Whole.cs index 2ff13ebe7..e9b487ffe 100644 --- a/Aaru.Tests/Filesystems/AFFS/Whole.cs +++ b/Aaru.Tests/Filesystems/AFFS/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : FilesystemTest("affs") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amigaos_3.9.adf.lz", @@ -66,5 +66,5 @@ public class Whole() : FilesystemTest("affs") VolumeName = "Volume label", VolumeSerial = "A5DA0CC9" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AFFS2/APM.cs b/Aaru.Tests/Filesystems/AFFS2/APM.cs index b7bcd73bf..36f6a3dd2 100644 --- a/Aaru.Tests/Filesystems/AFFS2/APM.cs +++ b/Aaru.Tests/Filesystems/AFFS2/APM.cs @@ -43,8 +43,8 @@ public class APM() : FilesystemTest("affs2") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "morphos_3.13.aif", @@ -56,5 +56,5 @@ public class APM() : FilesystemTest("affs2") VolumeName = "Volume label", VolumeSerial = "6144B870" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AFFS2/RDB.cs b/Aaru.Tests/Filesystems/AFFS2/RDB.cs index b53b9af94..ba3a16026 100644 --- a/Aaru.Tests/Filesystems/AFFS2/RDB.cs +++ b/Aaru.Tests/Filesystems/AFFS2/RDB.cs @@ -43,8 +43,8 @@ public class RDB() : FilesystemTest("affs2") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amigaos_4.0.aif", @@ -67,5 +67,5 @@ public class RDB() : FilesystemTest("affs2") VolumeName = "VolumeLabel", VolumeSerial = "D943AA14" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AFS/MBR.cs b/Aaru.Tests/Filesystems/AFS/MBR.cs index eb25d8115..751eb64d0 100644 --- a/Aaru.Tests/Filesystems/AFS/MBR.cs +++ b/Aaru.Tests/Filesystems/AFS/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : FilesystemTest("sysv_r4") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "scoopenserver_5.0.7hw.aif", @@ -53,5 +53,5 @@ public class MBR() : FilesystemTest("sysv_r4") ClusterSize = 1024, VolumeName = "d1150" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AFS/Whole.cs b/Aaru.Tests/Filesystems/AFS/Whole.cs index 66d59ed7b..c05224dac 100644 --- a/Aaru.Tests/Filesystems/AFS/Whole.cs +++ b/Aaru.Tests/Filesystems/AFS/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : FilesystemTest("sysv_r4") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "scoopenserver_5.0.7hw_dmf.img.lz", @@ -94,5 +94,5 @@ public class Whole() : FilesystemTest("sysv_r4") ClusterSize = 1024, VolumeName = "" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AOFS/MBR+RDB.cs b/Aaru.Tests/Filesystems/AOFS/MBR+RDB.cs index f6de66935..7e0c2dc20 100644 --- a/Aaru.Tests/Filesystems/AOFS/MBR+RDB.cs +++ b/Aaru.Tests/Filesystems/AOFS/MBR+RDB.cs @@ -45,8 +45,8 @@ public class MBR_RDB() : FilesystemTest("aofs") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "aros.aif", @@ -69,5 +69,5 @@ public class MBR_RDB() : FilesystemTest("aofs") VolumeName = "Volume label", VolumeSerial = "A5833085" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AOFS/MBR.cs b/Aaru.Tests/Filesystems/AOFS/MBR.cs index 85c1147ac..bac51cdab 100644 --- a/Aaru.Tests/Filesystems/AOFS/MBR.cs +++ b/Aaru.Tests/Filesystems/AOFS/MBR.cs @@ -43,8 +43,8 @@ public class MBR() : FilesystemTest("aofs") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "aros.aif", @@ -67,5 +67,5 @@ public class MBR() : FilesystemTest("aofs") VolumeName = "Volume label", VolumeSerial = "A582CE0D" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AOFS/RDB.cs b/Aaru.Tests/Filesystems/AOFS/RDB.cs index 7d6346693..376969def 100644 --- a/Aaru.Tests/Filesystems/AOFS/RDB.cs +++ b/Aaru.Tests/Filesystems/AOFS/RDB.cs @@ -43,8 +43,8 @@ public class RDB() : FilesystemTest("aofs") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amigaos_3.9.aif", @@ -89,5 +89,5 @@ public class RDB() : FilesystemTest("aofs") VolumeName = "Volume label", VolumeSerial = "A5830B06" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/AOFS/Whole.cs b/Aaru.Tests/Filesystems/AOFS/Whole.cs index f7227fc10..b1eaaf4bc 100644 --- a/Aaru.Tests/Filesystems/AOFS/Whole.cs +++ b/Aaru.Tests/Filesystems/AOFS/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : FilesystemTest("aofs") public override IFilesystem Plugin => new AmigaDOSPlugin(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amigaos_3.9.adf.lz", @@ -66,5 +66,5 @@ public class Whole() : FilesystemTest("aofs") VolumeName = "Volume label", VolumeSerial = "A5D9F14F" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/Atheos.cs b/Aaru.Tests/Filesystems/Atheos.cs index 1a9d4b3a3..8767b1766 100644 --- a/Aaru.Tests/Filesystems/Atheos.cs +++ b/Aaru.Tests/Filesystems/Atheos.cs @@ -41,8 +41,8 @@ public class Atheos() : FilesystemTest("atheos") public override IFilesystem Plugin => new AtheOS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "syllable_0.6.7.aif", @@ -53,5 +53,5 @@ public class Atheos() : FilesystemTest("atheos") ClusterSize = 1024, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/BeFS/APM.cs b/Aaru.Tests/Filesystems/BeFS/APM.cs index e270ed544..3bdea4abf 100644 --- a/Aaru.Tests/Filesystems/BeFS/APM.cs +++ b/Aaru.Tests/Filesystems/BeFS/APM.cs @@ -40,8 +40,8 @@ public class APM() : FilesystemTest("befs") public override IFilesystem Plugin => new Aaru.Filesystems.BeFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "beos_r3.1.aif", @@ -72,5 +72,5 @@ public class APM() : FilesystemTest("befs") ClusterSize = 1024, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/BeFS/GPT.cs b/Aaru.Tests/Filesystems/BeFS/GPT.cs index d33468243..2a2f93ec5 100644 --- a/Aaru.Tests/Filesystems/BeFS/GPT.cs +++ b/Aaru.Tests/Filesystems/BeFS/GPT.cs @@ -40,8 +40,8 @@ public class GPT() : FilesystemTest("befs") public override IFilesystem Plugin => new Aaru.Filesystems.BeFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "haiku_hrev51259.aif", @@ -52,5 +52,5 @@ public class GPT() : FilesystemTest("befs") ClusterSize = 2048, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/BeFS/MBR.cs b/Aaru.Tests/Filesystems/BeFS/MBR.cs index 470b6f678..6bc1e4f17 100644 --- a/Aaru.Tests/Filesystems/BeFS/MBR.cs +++ b/Aaru.Tests/Filesystems/BeFS/MBR.cs @@ -40,8 +40,8 @@ public class MBR() : FilesystemTest("befs") public override IFilesystem Plugin => new Aaru.Filesystems.BeFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "beos_r3.1.aif", @@ -122,5 +122,5 @@ public class MBR() : FilesystemTest("befs") ClusterSize = 4096, VolumeName = "Volume label 4K" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/BeFS/Whole.cs b/Aaru.Tests/Filesystems/BeFS/Whole.cs index 0942732b4..e269a15dd 100644 --- a/Aaru.Tests/Filesystems/BeFS/Whole.cs +++ b/Aaru.Tests/Filesystems/BeFS/Whole.cs @@ -41,8 +41,8 @@ public class Whole() : FilesystemTest("befs") public override IFilesystem Plugin => new Aaru.Filesystems.BeFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "beos_r3.1.img.lz", @@ -73,5 +73,5 @@ public class Whole() : FilesystemTest("befs") ClusterSize = 1024, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/COHERENT/MBR.cs b/Aaru.Tests/Filesystems/COHERENT/MBR.cs index 882b70b89..a4233f456 100644 --- a/Aaru.Tests/Filesystems/COHERENT/MBR.cs +++ b/Aaru.Tests/Filesystems/COHERENT/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : FilesystemTest("coherent") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "coherentunix_4.2.10.aif", @@ -53,5 +53,5 @@ public class MBR() : FilesystemTest("coherent") ClusterSize = 1024, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/COHERENT/Whole.cs b/Aaru.Tests/Filesystems/COHERENT/Whole.cs index 99ed41a7c..27a0e1bb9 100644 --- a/Aaru.Tests/Filesystems/COHERENT/Whole.cs +++ b/Aaru.Tests/Filesystems/COHERENT/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : FilesystemTest("coherent") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "coherentunix_4.2.10_dsdd.img.lz", @@ -84,5 +84,5 @@ public class Whole() : FilesystemTest("coherent") ClusterSize = 512, VolumeName = "noname" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/AMSDOS.cs b/Aaru.Tests/Filesystems/CPM/AMSDOS.cs index 1bb4a3081..f9a6b302f 100644 --- a/Aaru.Tests/Filesystems/CPM/AMSDOS.cs +++ b/Aaru.Tests/Filesystems/CPM/AMSDOS.cs @@ -42,8 +42,8 @@ public class AMSDOS() : FilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "data_filename.dsk.lz", @@ -102,5 +102,5 @@ public class AMSDOS() : FilesystemTest("cpmfs") Clusters = 170, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/AmstradCPM.cs b/Aaru.Tests/Filesystems/CPM/AmstradCPM.cs index 199e042df..160fc7047 100644 --- a/Aaru.Tests/Filesystems/CPM/AmstradCPM.cs +++ b/Aaru.Tests/Filesystems/CPM/AmstradCPM.cs @@ -40,8 +40,8 @@ public class AmstradCPM() : ReadOnlyFilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "data_filename.imd", @@ -82,5 +82,5 @@ public class AmstradCPM() : ReadOnlyFilesystemTest("cpmfs") Clusters = 171, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/AmstradCPMPlus.cs b/Aaru.Tests/Filesystems/CPM/AmstradCPMPlus.cs index 16e096a6f..47005ae50 100644 --- a/Aaru.Tests/Filesystems/CPM/AmstradCPMPlus.cs +++ b/Aaru.Tests/Filesystems/CPM/AmstradCPMPlus.cs @@ -40,8 +40,8 @@ public class AmstradCPMPlus() : FilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "data_filename.dsk.lz", @@ -140,5 +140,5 @@ public class AmstradCPMPlus() : FilesystemTest("cpmfs") Clusters = 359, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/Attache.cs b/Aaru.Tests/Filesystems/CPM/Attache.cs index cfbcb60b9..f6a86c749 100644 --- a/Aaru.Tests/Filesystems/CPM/Attache.cs +++ b/Aaru.Tests/Filesystems/CPM/Attache.cs @@ -40,8 +40,8 @@ public class Attache() : FilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "filename.imd", @@ -60,5 +60,5 @@ public class Attache() : FilesystemTest("cpmfs") Clusters = 395, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/Bondwell.cs b/Aaru.Tests/Filesystems/CPM/Bondwell.cs index a2b7488cf..21aa1c61a 100644 --- a/Aaru.Tests/Filesystems/CPM/Bondwell.cs +++ b/Aaru.Tests/Filesystems/CPM/Bondwell.cs @@ -40,8 +40,8 @@ public class Bondwell() : FilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "filename.imd", @@ -62,5 +62,5 @@ public class Bondwell() : FilesystemTest("cpmfs") Clusters = 174, ClusterSize = 2048 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/Excalibur64.cs b/Aaru.Tests/Filesystems/CPM/Excalibur64.cs index c3a291736..11cde9977 100644 --- a/Aaru.Tests/Filesystems/CPM/Excalibur64.cs +++ b/Aaru.Tests/Filesystems/CPM/Excalibur64.cs @@ -40,8 +40,8 @@ public class Excalibur64() : FilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "filename.img", @@ -62,5 +62,5 @@ public class Excalibur64() : FilesystemTest("cpmfs") Clusters = 189, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/KayproII.cs b/Aaru.Tests/Filesystems/CPM/KayproII.cs index cffcf4167..ee9b16d0e 100644 --- a/Aaru.Tests/Filesystems/CPM/KayproII.cs +++ b/Aaru.Tests/Filesystems/CPM/KayproII.cs @@ -42,8 +42,8 @@ public class KayproII() : ReadOnlyFilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "filename.imd", @@ -64,5 +64,5 @@ public class KayproII() : ReadOnlyFilesystemTest("cpmfs") Clusters = 194, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/ParaDOS.cs b/Aaru.Tests/Filesystems/CPM/ParaDOS.cs index 2ff0b2dfe..59cbaede3 100644 --- a/Aaru.Tests/Filesystems/CPM/ParaDOS.cs +++ b/Aaru.Tests/Filesystems/CPM/ParaDOS.cs @@ -40,8 +40,8 @@ public class ParaDOS() : FilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "40d_filename.dsk.lz", @@ -100,5 +100,5 @@ public class ParaDOS() : FilesystemTest("cpmfs") Clusters = 170, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/Plus3DOS.cs b/Aaru.Tests/Filesystems/CPM/Plus3DOS.cs index 0d85ec1e9..5ba469819 100644 --- a/Aaru.Tests/Filesystems/CPM/Plus3DOS.cs +++ b/Aaru.Tests/Filesystems/CPM/Plus3DOS.cs @@ -42,8 +42,8 @@ public class Plus3DOS() : FilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "filename.dsk.lz", @@ -64,5 +64,5 @@ public class Plus3DOS() : FilesystemTest("cpmfs") Clusters = 359, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/ROMDOS.cs b/Aaru.Tests/Filesystems/CPM/ROMDOS.cs index 098ea942d..23822313c 100644 --- a/Aaru.Tests/Filesystems/CPM/ROMDOS.cs +++ b/Aaru.Tests/Filesystems/CPM/ROMDOS.cs @@ -42,8 +42,8 @@ public class ROMDOS() : FilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "d1_filename.dsk.lz", @@ -162,5 +162,5 @@ public class ROMDOS() : FilesystemTest("cpmfs") Clusters = 400, ClusterSize = 2048 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/SharpPersonalCPM.cs b/Aaru.Tests/Filesystems/CPM/SharpPersonalCPM.cs index f942f36fe..cccae98a2 100644 --- a/Aaru.Tests/Filesystems/CPM/SharpPersonalCPM.cs +++ b/Aaru.Tests/Filesystems/CPM/SharpPersonalCPM.cs @@ -40,8 +40,8 @@ public class SharpPersonalCPM() : ReadOnlyFilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "filename.imd", @@ -62,5 +62,5 @@ public class SharpPersonalCPM() : ReadOnlyFilesystemTest("cpmfs") Clusters = 316, ClusterSize = 2048 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/CPM/XtalDOS.cs b/Aaru.Tests/Filesystems/CPM/XtalDOS.cs index 0ee7f84da..16da4bff8 100644 --- a/Aaru.Tests/Filesystems/CPM/XtalDOS.cs +++ b/Aaru.Tests/Filesystems/CPM/XtalDOS.cs @@ -40,8 +40,8 @@ public class XtalDOS() : ReadOnlyFilesystemTest("cpmfs") public override IFilesystem Plugin => new Aaru.Filesystems.CPM(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "filename.imd", @@ -62,5 +62,5 @@ public class XtalDOS() : ReadOnlyFilesystemTest("cpmfs") Clusters = 189, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/DTFS/MBR.cs b/Aaru.Tests/Filesystems/DTFS/MBR.cs index a9fe51d59..3ea0af500 100644 --- a/Aaru.Tests/Filesystems/DTFS/MBR.cs +++ b/Aaru.Tests/Filesystems/DTFS/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : FilesystemTest("DTFS") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "scoopenserver_5.0.7hw.aif", @@ -53,5 +53,5 @@ public class MBR() : FilesystemTest("DTFS") ClusterSize = 1024, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/DTFS/Whole.cs b/Aaru.Tests/Filesystems/DTFS/Whole.cs index 76a1aaa47..8dd1ec48e 100644 --- a/Aaru.Tests/Filesystems/DTFS/Whole.cs +++ b/Aaru.Tests/Filesystems/DTFS/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : FilesystemTest("DTFS") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "scoopenserver_5.0.7hw_dmf.img.lz", @@ -94,5 +94,5 @@ public class Whole() : FilesystemTest("DTFS") ClusterSize = 1024, VolumeName = "" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/EAFS/MBR.cs b/Aaru.Tests/Filesystems/EAFS/MBR.cs index 5b7e79145..df9aa596d 100644 --- a/Aaru.Tests/Filesystems/EAFS/MBR.cs +++ b/Aaru.Tests/Filesystems/EAFS/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : FilesystemTest("Extended Acer Fast Filesystem") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "scoopenserver_5.0.7hw.aif", @@ -53,5 +53,5 @@ public class MBR() : FilesystemTest("Extended Acer Fast Filesystem") ClusterSize = 1024, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/EAFS/Whole.cs b/Aaru.Tests/Filesystems/EAFS/Whole.cs index 751289b10..b9501748c 100644 --- a/Aaru.Tests/Filesystems/EAFS/Whole.cs +++ b/Aaru.Tests/Filesystems/EAFS/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : FilesystemTest("Extended Acer Fast Filesystem") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "scoopenserver_5.0.7hw_dmf.img.lz", @@ -94,5 +94,5 @@ public class Whole() : FilesystemTest("Extended Acer Fast Filesystem") ClusterSize = 1024, VolumeName = "" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/F2FS.cs b/Aaru.Tests/Filesystems/F2FS.cs index 275b1ebee..ffdb2b5b0 100644 --- a/Aaru.Tests/Filesystems/F2FS.cs +++ b/Aaru.Tests/Filesystems/F2FS.cs @@ -41,8 +41,8 @@ public class F2Fs() : FilesystemTest("f2fs") public override IFilesystem Plugin => new F2FS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -65,5 +65,5 @@ public class F2Fs() : FilesystemTest("f2fs") VolumeName = "DicSetter", VolumeSerial = "422bd2a8-68ab-6f45-9a04-9c264d07dd6e" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT12/APM.cs b/Aaru.Tests/Filesystems/FAT12/APM.cs index 47e6857cd..e9560a8e7 100644 --- a/Aaru.Tests/Filesystems/FAT12/APM.cs +++ b/Aaru.Tests/Filesystems/FAT12/APM.cs @@ -41,8 +41,8 @@ public class APM() : ReadOnlyFilesystemTest("fat12") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "darwin_6.0.2.aif", @@ -121,5 +121,5 @@ public class APM() : ReadOnlyFilesystemTest("fat12") VolumeName = "VOLUMELABEL", VolumeSerial = "32181F09" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT12/GPT.cs b/Aaru.Tests/Filesystems/FAT12/GPT.cs index 2482d5a17..a1ed7b683 100644 --- a/Aaru.Tests/Filesystems/FAT12/GPT.cs +++ b/Aaru.Tests/Filesystems/FAT12/GPT.cs @@ -41,8 +41,8 @@ public class GPT() : ReadOnlyFilesystemTest("fat12") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.11.aif", @@ -56,5 +56,5 @@ public class GPT() : ReadOnlyFilesystemTest("fat12") VolumeName = "VOLUMELABEL", VolumeSerial = "66901F1B" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT12/Human.cs b/Aaru.Tests/Filesystems/FAT12/Human.cs index 9ddb4e79e..a35aec9fa 100644 --- a/Aaru.Tests/Filesystems/FAT12/Human.cs +++ b/Aaru.Tests/Filesystems/FAT12/Human.cs @@ -41,8 +41,8 @@ public class Human() : ReadOnlyFilesystemTest("fat12") public override IFilesystem Plugin => new FAT(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "diska.aif", @@ -65,5 +65,5 @@ public class Human() : ReadOnlyFilesystemTest("fat12") ClusterSize = 1024, SystemId = "Hudson soft 2.00" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT12/MBR.cs b/Aaru.Tests/Filesystems/FAT12/MBR.cs index c23cb1d53..d13bb6195 100644 --- a/Aaru.Tests/Filesystems/FAT12/MBR.cs +++ b/Aaru.Tests/Filesystems/FAT12/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : ReadOnlyFilesystemTest("fat12") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "darwin_6.0.2.aif", @@ -1167,5 +1167,5 @@ public class MBR() : ReadOnlyFilesystemTest("fat12") VolumeName = "VOLUMELABEL", VolumeSerial = "241408F2" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT12/Whole.cs b/Aaru.Tests/Filesystems/FAT12/Whole.cs index 7a1267a7c..ab6bb87bb 100644 --- a/Aaru.Tests/Filesystems/FAT12/Whole.cs +++ b/Aaru.Tests/Filesystems/FAT12/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : ReadOnlyFilesystemTest("fat12") public override IFilesystem Plugin => new FAT(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "concurrentdos_6.00_dshd.img.lz", @@ -5668,5 +5668,5 @@ public class Whole() : ReadOnlyFilesystemTest("fat12") VolumeName = "VolumeLabel", VolumeSerial = "609CA596" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT16/APM.cs b/Aaru.Tests/Filesystems/FAT16/APM.cs index 9b0f247d7..9a9d393dc 100644 --- a/Aaru.Tests/Filesystems/FAT16/APM.cs +++ b/Aaru.Tests/Filesystems/FAT16/APM.cs @@ -41,8 +41,8 @@ public class APM() : ReadOnlyFilesystemTest("fat16") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "darwin_6.0.2.aif", @@ -133,5 +133,5 @@ public class APM() : ReadOnlyFilesystemTest("fat16") VolumeName = "VOLUMELABEL", VolumeSerial = "519F5D1B" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT16/Atari.cs b/Aaru.Tests/Filesystems/FAT16/Atari.cs index 69f2bdb2b..eb8dff021 100644 --- a/Aaru.Tests/Filesystems/FAT16/Atari.cs +++ b/Aaru.Tests/Filesystems/FAT16/Atari.cs @@ -41,8 +41,8 @@ public class Atari() : ReadOnlyFilesystemTest("fat16") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "tos_1.00_gem.aif", @@ -175,5 +175,5 @@ public class Atari() : ReadOnlyFilesystemTest("fat16") VolumeName = "VolumeLabel", VolumeSerial = "086A33" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT16/GPT.cs b/Aaru.Tests/Filesystems/FAT16/GPT.cs index 89100f6ae..2618c2d1a 100644 --- a/Aaru.Tests/Filesystems/FAT16/GPT.cs +++ b/Aaru.Tests/Filesystems/FAT16/GPT.cs @@ -41,8 +41,8 @@ public class GPT() : ReadOnlyFilesystemTest("fat16") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.11.aif", @@ -56,5 +56,5 @@ public class GPT() : ReadOnlyFilesystemTest("fat16") VolumeName = "VOLUMELABEL", VolumeSerial = "2E8A1F1B" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT16/Human.cs b/Aaru.Tests/Filesystems/FAT16/Human.cs index b93efec50..e16564eb2 100644 --- a/Aaru.Tests/Filesystems/FAT16/Human.cs +++ b/Aaru.Tests/Filesystems/FAT16/Human.cs @@ -41,8 +41,8 @@ public class Human() : ReadOnlyFilesystemTest("fat16") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "sasidisk.aif", @@ -65,5 +65,5 @@ public class Human() : ReadOnlyFilesystemTest("fat16") ClusterSize = 1024, SystemId = " Hero Soft V1.10" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT16/MBR.cs b/Aaru.Tests/Filesystems/FAT16/MBR.cs index 1285577ef..f21fc7438 100644 --- a/Aaru.Tests/Filesystems/FAT16/MBR.cs +++ b/Aaru.Tests/Filesystems/FAT16/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : ReadOnlyFilesystemTest("fat16") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "darwin_6.0.2.aif", @@ -1304,5 +1304,5 @@ public class MBR() : ReadOnlyFilesystemTest("fat16") VolumeName = "VOLUMELABEL", VolumeSerial = "519F5C06" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT16/RDB.cs b/Aaru.Tests/Filesystems/FAT16/RDB.cs index 67bd61c9b..0a8c07c3f 100644 --- a/Aaru.Tests/Filesystems/FAT16/RDB.cs +++ b/Aaru.Tests/Filesystems/FAT16/RDB.cs @@ -41,8 +41,8 @@ public class RDB() : ReadOnlyFilesystemTest("fat16") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amigaos_3.9.aif", @@ -68,5 +68,5 @@ public class RDB() : ReadOnlyFilesystemTest("fat16") VolumeName = "VOLUMELABEL", VolumeSerial = "519F5D8B" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT16/Whole.cs b/Aaru.Tests/Filesystems/FAT16/Whole.cs index 6e98d257c..2cb8649ab 100644 --- a/Aaru.Tests/Filesystems/FAT16/Whole.cs +++ b/Aaru.Tests/Filesystems/FAT16/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : ReadOnlyFilesystemTest("fat16") public override IFilesystem Plugin => new FAT(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "msdos_3.30A_mf2ed.img.lz", @@ -198,5 +198,5 @@ public class Whole() : ReadOnlyFilesystemTest("fat16") VolumeName = "VOLUMELABEL", VolumeSerial = "E3230000" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT32/APM.cs b/Aaru.Tests/Filesystems/FAT32/APM.cs index 35fab0601..6cd80548e 100644 --- a/Aaru.Tests/Filesystems/FAT32/APM.cs +++ b/Aaru.Tests/Filesystems/FAT32/APM.cs @@ -41,8 +41,8 @@ public class APM() : ReadOnlyFilesystemTest("fat32") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "darwin_6.0.2.aif", @@ -121,5 +121,5 @@ public class APM() : ReadOnlyFilesystemTest("fat32") VolumeName = "VOLUMELABEL", VolumeSerial = "35BD1F0A" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT32/GPT.cs b/Aaru.Tests/Filesystems/FAT32/GPT.cs index d50b63336..b645858f7 100644 --- a/Aaru.Tests/Filesystems/FAT32/GPT.cs +++ b/Aaru.Tests/Filesystems/FAT32/GPT.cs @@ -41,8 +41,8 @@ public class GPT() : ReadOnlyFilesystemTest("fat32") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.11.aif", @@ -56,5 +56,5 @@ public class GPT() : ReadOnlyFilesystemTest("fat32") VolumeName = "VOLUMELABEL", VolumeSerial = "7ABE1F1B" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT32/MBR.cs b/Aaru.Tests/Filesystems/FAT32/MBR.cs index 32c6f9873..6416ee2e9 100644 --- a/Aaru.Tests/Filesystems/FAT32/MBR.cs +++ b/Aaru.Tests/Filesystems/FAT32/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : ReadOnlyFilesystemTest("fat32") public override IFilesystem Plugin => new FAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "darwin_6.0.2.aif", @@ -612,5 +612,5 @@ public class MBR() : ReadOnlyFilesystemTest("fat32") VolumeName = "VOLUMELABEL", VolumeSerial = "CBCE71E4" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FAT32/Whole.cs b/Aaru.Tests/Filesystems/FAT32/Whole.cs index d6c2ca798..742bfe140 100644 --- a/Aaru.Tests/Filesystems/FAT32/Whole.cs +++ b/Aaru.Tests/Filesystems/FAT32/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : ReadOnlyFilesystemTest("fat32") public override IFilesystem Plugin => new FAT(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ /* new FileSystemTest { TestFile = "beos_r4.5_mf2hd.img.lz", @@ -145,5 +145,5 @@ public class Whole() : ReadOnlyFilesystemTest("fat32") VolumeName = "VolumeLabel", VolumeSerial = "609C5425" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FATX/Xbox.cs b/Aaru.Tests/Filesystems/FATX/Xbox.cs index febff4074..310f17d97 100644 --- a/Aaru.Tests/Filesystems/FATX/Xbox.cs +++ b/Aaru.Tests/Filesystems/FATX/Xbox.cs @@ -43,8 +43,8 @@ public class Xbox() : ReadOnlyFilesystemTest("fatx") public override IFilesystem Plugin => new XboxFatPlugin(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "fatx.img.lz", @@ -56,5 +56,5 @@ public class Xbox() : ReadOnlyFilesystemTest("fatx") VolumeName = "Volume láb€l", VolumeSerial = "4639B7D0" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/FATX/Xbox360.cs b/Aaru.Tests/Filesystems/FATX/Xbox360.cs index aef770b55..6a96ca9de 100644 --- a/Aaru.Tests/Filesystems/FATX/Xbox360.cs +++ b/Aaru.Tests/Filesystems/FATX/Xbox360.cs @@ -42,8 +42,8 @@ public class Xbox360() : ReadOnlyFilesystemTest("fatx") public override IFilesystem Plugin => new XboxFatPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "microsoft256mb.img.lz", @@ -55,5 +55,5 @@ public class Xbox360() : ReadOnlyFilesystemTest("fatx") VolumeName = "", VolumeSerial = "66C2E9D0" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HAMMER.cs b/Aaru.Tests/Filesystems/HAMMER.cs index 8313b8673..00a7498ad 100644 --- a/Aaru.Tests/Filesystems/HAMMER.cs +++ b/Aaru.Tests/Filesystems/HAMMER.cs @@ -41,8 +41,8 @@ public class Hammer() : FilesystemTest("hammer") public override IFilesystem Plugin => new HAMMER(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "dflybsd_3.6.1.vdi.lz", @@ -65,5 +65,5 @@ public class Hammer() : FilesystemTest("hammer") VolumeName = "Volume label", VolumeSerial = "ff4dc664-6276-11e7-983f-090027c41b46" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFS+/APM.cs b/Aaru.Tests/Filesystems/HFS+/APM.cs index 7375f94ac..c6abf75a1 100644 --- a/Aaru.Tests/Filesystems/HFS+/APM.cs +++ b/Aaru.Tests/Filesystems/HFS+/APM.cs @@ -43,8 +43,8 @@ public class APM() : FilesystemTest("hfsplus") public override IFilesystem Plugin => new AppleHFSPlus(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.11.aif", @@ -288,5 +288,5 @@ public class APM() : FilesystemTest("hfsplus") SystemId = "10.0", VolumeSerial = "2812682CF7B8EB3B" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFS+/GPT.cs b/Aaru.Tests/Filesystems/HFS+/GPT.cs index d02098235..cddd1f9b7 100644 --- a/Aaru.Tests/Filesystems/HFS+/GPT.cs +++ b/Aaru.Tests/Filesystems/HFS+/GPT.cs @@ -43,8 +43,8 @@ public class GPT() : FilesystemTest("hfsplus") public override IFilesystem Plugin => new AppleHFSPlus(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.11.aif", @@ -67,5 +67,5 @@ public class GPT() : FilesystemTest("hfsplus") SystemId = "HFSJ", VolumeSerial = "FD3CB598F3C6294A" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFS+/MBR.cs b/Aaru.Tests/Filesystems/HFS+/MBR.cs index 8cd402b7a..78cf950d1 100644 --- a/Aaru.Tests/Filesystems/HFS+/MBR.cs +++ b/Aaru.Tests/Filesystems/HFS+/MBR.cs @@ -44,8 +44,8 @@ public class MBR() : FilesystemTest("hfsplus") public override IFilesystem Plugin => new AppleHFSPlus(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.3.aif", @@ -217,5 +217,5 @@ public class MBR() : FilesystemTest("hfsplus") SystemId = "H+Lx", VolumeSerial = "B9BAC6856878A404" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFS/APM.cs b/Aaru.Tests/Filesystems/HFS/APM.cs index e5a2eaa09..e84dfb8a4 100644 --- a/Aaru.Tests/Filesystems/HFS/APM.cs +++ b/Aaru.Tests/Filesystems/HFS/APM.cs @@ -41,8 +41,8 @@ public class APM() : FilesystemTest("hfs") public override IFilesystem Plugin => new AppleHFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amigaos_3.9.aif", @@ -503,5 +503,5 @@ public class APM() : FilesystemTest("hfs") ClusterSize = 2048, VolumeName = "VolumeLabel" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFS/MBR.cs b/Aaru.Tests/Filesystems/HFS/MBR.cs index fa9500a36..5ba4079e3 100644 --- a/Aaru.Tests/Filesystems/HFS/MBR.cs +++ b/Aaru.Tests/Filesystems/HFS/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : FilesystemTest("hfs") public override IFilesystem Plugin => new AppleHFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.3.aif", @@ -137,5 +137,5 @@ public class MBR() : FilesystemTest("hfs") ClusterSize = 8192, VolumeName = "DicSetter" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFS/Optical.cs b/Aaru.Tests/Filesystems/HFS/Optical.cs index ac0e6b7f6..0e30c4ffb 100644 --- a/Aaru.Tests/Filesystems/HFS/Optical.cs +++ b/Aaru.Tests/Filesystems/HFS/Optical.cs @@ -41,8 +41,8 @@ public class Optical() : FilesystemTest("hfs") public override IFilesystem Plugin => new AppleHFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "toast_3.5.7_hfs_from_volume.aif", @@ -103,5 +103,5 @@ public class Optical() : FilesystemTest("hfs") ClusterSize = 12288, VolumeName = "Disk utils" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFS/RDB.cs b/Aaru.Tests/Filesystems/HFS/RDB.cs index 8835afb42..04b360bb6 100644 --- a/Aaru.Tests/Filesystems/HFS/RDB.cs +++ b/Aaru.Tests/Filesystems/HFS/RDB.cs @@ -41,8 +41,8 @@ public class RDB() : FilesystemTest("hfs") public override IFilesystem Plugin => new AppleHFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amigaos_3.9.aif", @@ -53,5 +53,5 @@ public class RDB() : FilesystemTest("hfs") ClusterSize = 8192, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFS/Whole.cs b/Aaru.Tests/Filesystems/HFS/Whole.cs index a1e6aa434..220bcf89e 100644 --- a/Aaru.Tests/Filesystems/HFS/Whole.cs +++ b/Aaru.Tests/Filesystems/HFS/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : FilesystemTest("hfs") public override IFilesystem Plugin => new AppleHFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macos_1.1_mf2dd.img.lz", @@ -154,5 +154,5 @@ public class Whole() : FilesystemTest("hfs") ClusterSize = 512, VolumeName = "VolumeLabel" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFSX/APM.cs b/Aaru.Tests/Filesystems/HFSX/APM.cs index b9407cb8b..3154b32b0 100644 --- a/Aaru.Tests/Filesystems/HFSX/APM.cs +++ b/Aaru.Tests/Filesystems/HFSX/APM.cs @@ -41,8 +41,8 @@ public class APM() : FilesystemTest("hfsx") public override IFilesystem Plugin => new AppleHFSPlus(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.4_journal.aif", @@ -131,5 +131,5 @@ public class APM() : FilesystemTest("hfsx") SystemId = "10.0", VolumeSerial = "BCA9EBC858957259" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFSX/GPT.cs b/Aaru.Tests/Filesystems/HFSX/GPT.cs index e7b6b2205..858fccb8d 100644 --- a/Aaru.Tests/Filesystems/HFSX/GPT.cs +++ b/Aaru.Tests/Filesystems/HFSX/GPT.cs @@ -41,8 +41,8 @@ public class GPT() : FilesystemTest("hfsx") public override IFilesystem Plugin => new AppleHFSPlus(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.11.aif", @@ -65,5 +65,5 @@ public class GPT() : FilesystemTest("hfsx") SystemId = "HFSJ", VolumeSerial = "FB98504073464C5C" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HFSX/MBR.cs b/Aaru.Tests/Filesystems/HFSX/MBR.cs index 1cf674bde..36a4d1000 100644 --- a/Aaru.Tests/Filesystems/HFSX/MBR.cs +++ b/Aaru.Tests/Filesystems/HFSX/MBR.cs @@ -42,8 +42,8 @@ public class MBR() : FilesystemTest("hfsx") public override IFilesystem Plugin => new AppleHFSPlus(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.11.aif", @@ -141,5 +141,5 @@ public class MBR() : FilesystemTest("hfsx") SystemId = "H+Lx", VolumeSerial = "5E4A8781D3C9286C" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HPFS.cs b/Aaru.Tests/Filesystems/HPFS.cs index 764b4142f..f07f6e4d1 100644 --- a/Aaru.Tests/Filesystems/HPFS.cs +++ b/Aaru.Tests/Filesystems/HPFS.cs @@ -43,8 +43,8 @@ public class Hpfs() : FilesystemTest("hpfs") public override IFilesystem Plugin => new HPFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "ecs.aif", @@ -214,5 +214,5 @@ public class Hpfs() : FilesystemTest("hpfs") VolumeName = "VOLUME LABE", VolumeSerial = "AC096014" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HPOFS.cs b/Aaru.Tests/Filesystems/HPOFS.cs index 0a6e6c79f..8f5fb86d6 100644 --- a/Aaru.Tests/Filesystems/HPOFS.cs +++ b/Aaru.Tests/Filesystems/HPOFS.cs @@ -43,8 +43,8 @@ public class Hpofs() : FilesystemTest("hpofs") public override IFilesystem Plugin => new HPOFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "rid1.img.lz", @@ -93,5 +93,5 @@ public class Hpofs() : FilesystemTest("hpofs") VolumeName = "VOLUME LABEL", VolumeSerial = "ABEF2C14" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HTFS/MBR.cs b/Aaru.Tests/Filesystems/HTFS/MBR.cs index 31855a449..af156aba8 100644 --- a/Aaru.Tests/Filesystems/HTFS/MBR.cs +++ b/Aaru.Tests/Filesystems/HTFS/MBR.cs @@ -43,8 +43,8 @@ public class MBR() : FilesystemTest("HTFS") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "scoopenserver_5.0.7hw.aif", @@ -55,5 +55,5 @@ public class MBR() : FilesystemTest("HTFS") ClusterSize = 1024, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/HTFS/Whole.cs b/Aaru.Tests/Filesystems/HTFS/Whole.cs index 8499f97fd..c00c44467 100644 --- a/Aaru.Tests/Filesystems/HTFS/Whole.cs +++ b/Aaru.Tests/Filesystems/HTFS/Whole.cs @@ -43,8 +43,8 @@ public class Whole() : FilesystemTest("HTFS") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "scoopenserver_5.0.7hw_dmf.img.lz", @@ -95,5 +95,5 @@ public class Whole() : FilesystemTest("HTFS") ClusterSize = 1024, VolumeName = "" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/ISO9660.cs b/Aaru.Tests/Filesystems/ISO9660.cs index 437edfc39..7981b9e63 100644 --- a/Aaru.Tests/Filesystems/ISO9660.cs +++ b/Aaru.Tests/Filesystems/ISO9660.cs @@ -41,8 +41,8 @@ public class Iso9660() : ReadOnlyFilesystemTest("iso9660") public override IFilesystem Plugin => new ISO9660(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "toast_3.5.7_iso9660_apple.aif", @@ -963,5 +963,5 @@ public class Iso9660() : ReadOnlyFilesystemTest("iso9660") SystemId = "", VolumeName = "test" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/JFS2.cs b/Aaru.Tests/Filesystems/JFS2.cs index 40ebefe58..7f5d56305 100644 --- a/Aaru.Tests/Filesystems/JFS2.cs +++ b/Aaru.Tests/Filesystems/JFS2.cs @@ -41,8 +41,8 @@ public class Jfs2() : FilesystemTest("jfs") public override IFilesystem Plugin => new JFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -103,5 +103,5 @@ public class Jfs2() : FilesystemTest("jfs") VolumeName = "DicSetter", VolumeSerial = "08fc8e22-0201-894e-89c9-31ec3f546203" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/LisaFS.cs b/Aaru.Tests/Filesystems/LisaFS.cs index b864af3e1..6a59b7bc4 100644 --- a/Aaru.Tests/Filesystems/LisaFS.cs +++ b/Aaru.Tests/Filesystems/LisaFS.cs @@ -41,8 +41,8 @@ public class LisaFs() : ReadOnlyFilesystemTest("lisafs") public override IFilesystem Plugin => new LisaFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "166files.dc42.lz", @@ -219,5 +219,5 @@ public class LisaFs() : ReadOnlyFilesystemTest("lisafs") VolumeName = "AOS 3.0", VolumeSerial = "A4FE1A191F011652" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/Locus.cs b/Aaru.Tests/Filesystems/Locus.cs index 1c829a1ac..1539ef707 100644 --- a/Aaru.Tests/Filesystems/Locus.cs +++ b/Aaru.Tests/Filesystems/Locus.cs @@ -40,8 +40,8 @@ public class Locus() : FilesystemTest("locus") public override IFilesystem Plugin => new Aaru.Filesystems.Locus(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "mf2dd.img.lz", @@ -62,5 +62,5 @@ public class Locus() : FilesystemTest("locus") ClusterSize = 4096, VolumeName = "Label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/MFS.cs b/Aaru.Tests/Filesystems/MFS.cs index 010812e5e..c1ec21913 100644 --- a/Aaru.Tests/Filesystems/MFS.cs +++ b/Aaru.Tests/Filesystems/MFS.cs @@ -41,8 +41,8 @@ public class Mfs() : ReadOnlyFilesystemTest("mfs") public override IFilesystem Plugin => new AppleMFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macos_0.1_mf1dd.img.lz", @@ -93,5 +93,5 @@ public class Mfs() : ReadOnlyFilesystemTest("mfs") ClusterSize = 1024, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/MINIX/V1/MBR.cs b/Aaru.Tests/Filesystems/MINIX/V1/MBR.cs index 9b676de8e..e53e1cf47 100644 --- a/Aaru.Tests/Filesystems/MINIX/V1/MBR.cs +++ b/Aaru.Tests/Filesystems/MINIX/V1/MBR.cs @@ -41,8 +41,8 @@ public class MBR : FilesystemTest public override IFilesystem Plugin => new MinixFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "minix_3.1.2a.aif", @@ -143,5 +143,5 @@ public class MBR : FilesystemTest ClusterSize = 1024, Type = "minix" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/MINIX/V1/Whole.cs b/Aaru.Tests/Filesystems/MINIX/V1/Whole.cs index 2c701e946..9115e32a6 100644 --- a/Aaru.Tests/Filesystems/MINIX/V1/Whole.cs +++ b/Aaru.Tests/Filesystems/MINIX/V1/Whole.cs @@ -41,8 +41,8 @@ public class Whole : FilesystemTest public override IFilesystem Plugin => new MinixFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "minix_3.1.2a_dsdd.img.lz", @@ -163,5 +163,5 @@ public class Whole : FilesystemTest ClusterSize = 1024, Type = "minix" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/MINIX/V2/MBR.cs b/Aaru.Tests/Filesystems/MINIX/V2/MBR.cs index 3380daa19..981a469a1 100644 --- a/Aaru.Tests/Filesystems/MINIX/V2/MBR.cs +++ b/Aaru.Tests/Filesystems/MINIX/V2/MBR.cs @@ -41,8 +41,8 @@ public class MBR : FilesystemTest public override IFilesystem Plugin => new MinixFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "minix_3.1.2a.aif", @@ -133,5 +133,5 @@ public class MBR : FilesystemTest ClusterSize = 1024, Type = "minix2" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/MINIX/V2/Whole.cs b/Aaru.Tests/Filesystems/MINIX/V2/Whole.cs index 913b851a7..780318d8c 100644 --- a/Aaru.Tests/Filesystems/MINIX/V2/Whole.cs +++ b/Aaru.Tests/Filesystems/MINIX/V2/Whole.cs @@ -41,8 +41,8 @@ public class Whole : FilesystemTest public override IFilesystem Plugin => new MinixFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "minix_3.1.2a_dsdd.img.lz", @@ -153,5 +153,5 @@ public class Whole : FilesystemTest ClusterSize = 1024, Type = "minix2" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/MINIX/V3/MBR.cs b/Aaru.Tests/Filesystems/MINIX/V3/MBR.cs index 503de4981..b2fd542cc 100644 --- a/Aaru.Tests/Filesystems/MINIX/V3/MBR.cs +++ b/Aaru.Tests/Filesystems/MINIX/V3/MBR.cs @@ -41,8 +41,8 @@ public class MBR : FilesystemTest public override IFilesystem Plugin => new MinixFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "minix_3.1.2a.aif", @@ -63,5 +63,5 @@ public class MBR : FilesystemTest ClusterSize = 1024, Type = "minix3" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/MINIX/V3/Whole.cs b/Aaru.Tests/Filesystems/MINIX/V3/Whole.cs index 54c3d9497..f27040c21 100644 --- a/Aaru.Tests/Filesystems/MINIX/V3/Whole.cs +++ b/Aaru.Tests/Filesystems/MINIX/V3/Whole.cs @@ -42,8 +42,8 @@ public class Whole : FilesystemTest public override IFilesystem Plugin => new MinixFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "minix_3.1.2a_dsdd.img.lz", @@ -84,5 +84,5 @@ public class Whole : FilesystemTest ClusterSize = 4096, Type = "minix3" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/NILFS2.cs b/Aaru.Tests/Filesystems/NILFS2.cs index 5f12fa053..8ad203b24 100644 --- a/Aaru.Tests/Filesystems/NILFS2.cs +++ b/Aaru.Tests/Filesystems/NILFS2.cs @@ -44,8 +44,8 @@ public class Nilfs2() : FilesystemTest("nilfs2") public override IFilesystem Plugin => new NILFS2(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -57,5 +57,5 @@ public class Nilfs2() : FilesystemTest("nilfs2") VolumeName = "Volume label", VolumeSerial = "6b1ca79e-7048-a748-93a0-89c74b02cb5a" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/NTFS/GPT.cs b/Aaru.Tests/Filesystems/NTFS/GPT.cs index b33404aeb..10117ad99 100644 --- a/Aaru.Tests/Filesystems/NTFS/GPT.cs +++ b/Aaru.Tests/Filesystems/NTFS/GPT.cs @@ -42,8 +42,8 @@ public class GPT() : FilesystemTest("ntfs") public override IFilesystem Plugin => new Aaru.Filesystems.NTFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "haiku_hrev51259.aif", @@ -55,5 +55,5 @@ public class GPT() : FilesystemTest("ntfs") ClusterSize = 4096, VolumeSerial = "2A1DF87732D3285C" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/NTFS/MBR.cs b/Aaru.Tests/Filesystems/NTFS/MBR.cs index ef0f71976..4978220eb 100644 --- a/Aaru.Tests/Filesystems/NTFS/MBR.cs +++ b/Aaru.Tests/Filesystems/NTFS/MBR.cs @@ -42,8 +42,8 @@ public class MBR() : FilesystemTest("ntfs") public override IFilesystem Plugin => new Aaru.Filesystems.NTFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "win10.aif", @@ -154,5 +154,5 @@ public class MBR() : FilesystemTest("ntfs") ClusterSize = 4096, VolumeSerial = "1FC3802B52F9611C" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/PFS3/APM.cs b/Aaru.Tests/Filesystems/PFS3/APM.cs index db8fa9ff5..9b12f713e 100644 --- a/Aaru.Tests/Filesystems/PFS3/APM.cs +++ b/Aaru.Tests/Filesystems/PFS3/APM.cs @@ -43,8 +43,8 @@ public class APM() : FilesystemTest("pfs") public override IFilesystem Plugin => new PFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "morphos_3.13.aif", @@ -55,5 +55,5 @@ public class APM() : FilesystemTest("pfs") ClusterSize = 512, VolumeName = "VolumeLabel" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/PFS3/RDB.cs b/Aaru.Tests/Filesystems/PFS3/RDB.cs index 019309a90..431cddad7 100644 --- a/Aaru.Tests/Filesystems/PFS3/RDB.cs +++ b/Aaru.Tests/Filesystems/PFS3/RDB.cs @@ -43,8 +43,8 @@ public class RDB() : FilesystemTest("pfs") public override IFilesystem Plugin => new PFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "uae.aif", @@ -65,5 +65,5 @@ public class RDB() : FilesystemTest("pfs") ClusterSize = 512, VolumeName = "VolumeLabel" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/ProDOS/APM.cs b/Aaru.Tests/Filesystems/ProDOS/APM.cs index 6bb7e019d..2d3521b0c 100644 --- a/Aaru.Tests/Filesystems/ProDOS/APM.cs +++ b/Aaru.Tests/Filesystems/ProDOS/APM.cs @@ -42,8 +42,8 @@ public class APM() : FilesystemTest("prodos") public override IFilesystem Plugin => new ProDOSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macos_7.6.aif", @@ -164,5 +164,5 @@ public class APM() : FilesystemTest("prodos") ClusterSize = 512, VolumeName = "VOLUME.LABEL" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/QNX4/MBR.cs b/Aaru.Tests/Filesystems/QNX4/MBR.cs index 1b8b786e6..efb634186 100644 --- a/Aaru.Tests/Filesystems/QNX4/MBR.cs +++ b/Aaru.Tests/Filesystems/QNX4/MBR.cs @@ -40,8 +40,8 @@ public class MBR() : FilesystemTest("qnx4") public override IFilesystem Plugin => new Aaru.Filesystems.QNX4(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "qnx_4.24.aif", @@ -51,5 +51,5 @@ public class MBR() : FilesystemTest("qnx4") Clusters = 1023104, ClusterSize = 512 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/QNX4/Whole.cs b/Aaru.Tests/Filesystems/QNX4/Whole.cs index a5b037d80..ed893130e 100644 --- a/Aaru.Tests/Filesystems/QNX4/Whole.cs +++ b/Aaru.Tests/Filesystems/QNX4/Whole.cs @@ -41,8 +41,8 @@ public class Whole() : FilesystemTest("qnx4") public override IFilesystem Plugin => new Aaru.Filesystems.QNX4(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "qnx_4.24_dsdd.img.lz", @@ -79,5 +79,5 @@ public class Whole() : FilesystemTest("qnx4") Clusters = 2880, ClusterSize = 512 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/ReFS.cs b/Aaru.Tests/Filesystems/ReFS.cs index e5f1d3298..abd0a36f0 100644 --- a/Aaru.Tests/Filesystems/ReFS.cs +++ b/Aaru.Tests/Filesystems/ReFS.cs @@ -43,8 +43,8 @@ public class ReFsMbr() : FilesystemTest("refs") public override IFilesystem Plugin => new ReFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "win10.vdi.lz", @@ -54,5 +54,5 @@ public class ReFsMbr() : FilesystemTest("refs") Clusters = 8372224, ClusterSize = 4096 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/ReadOnlyFilesystemTest.cs b/Aaru.Tests/Filesystems/ReadOnlyFilesystemTest.cs index d987e457a..4cf209601 100644 --- a/Aaru.Tests/Filesystems/ReadOnlyFilesystemTest.cs +++ b/Aaru.Tests/Filesystems/ReadOnlyFilesystemTest.cs @@ -145,7 +145,7 @@ public abstract class ReadOnlyFilesystemTest : FilesystemTest while(currentLevel.Count > 0) { currentDepth++; - List nextLevels = new(); + List nextLevels = []; foreach(NextLevel subLevel in currentLevel) { @@ -325,12 +325,12 @@ public abstract class ReadOnlyFilesystemTest : FilesystemTest foreach(string xattr in contents) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; ErrorNumber ret = fs.GetXattr(path, xattr, ref buffer); string data = ret != ErrorNumber.NoError && ret != ErrorNumber.OutOfRange - ? Md5Context.Data(Array.Empty(), out _) - : Md5Context.Data(buffer, out _); + ? Md5Context.Data([], out _) + : Md5Context.Data(buffer, out _); xattrs[xattr] = data; } @@ -343,7 +343,7 @@ public abstract class ReadOnlyFilesystemTest : FilesystemTest int currentDepth) { currentDepth++; - nextLevels = new List(); + nextLevels = []; ErrorNumber ret = fs.OpenDir(path, out IDirNode node); // Directory is not readable, probably filled the volume, just ignore it @@ -358,7 +358,7 @@ public abstract class ReadOnlyFilesystemTest : FilesystemTest if(ret != ErrorNumber.NoError) return; - List contents = new(); + List contents = []; while(fs.ReadDir(node, out string filename) == ErrorNumber.NoError && filename is not null) contents.Add(filename); @@ -369,7 +369,7 @@ public abstract class ReadOnlyFilesystemTest : FilesystemTest if(path == "/") path = ""; - List expectedNotFound = new(); + List expectedNotFound = []; foreach(KeyValuePair child in children) { @@ -431,7 +431,7 @@ public abstract class ReadOnlyFilesystemTest : FilesystemTest .BeEquivalentTo(child.Value.Info, string.Format(Localization.Wrong_info_for_0_in_1, childPath, testFile)); - byte[] buffer = Array.Empty(); + byte[] buffer = []; if(child.Value.Info.Attributes.HasFlag(FileAttributes.Directory)) { @@ -571,11 +571,11 @@ public abstract class ReadOnlyFilesystemTest : FilesystemTest if(xattrs.Count == 0 && contents.Count == 0) return; - List expectedNotFound = new(); + List expectedNotFound = []; foreach(KeyValuePair xattr in xattrs) { - byte[] buffer = Array.Empty(); + byte[] buffer = []; ErrorNumber ret = fs.GetXattr(path, xattr.Key, ref buffer); if(ret == ErrorNumber.NoSuchExtendedAttribute || !contents.Contains(xattr.Key)) diff --git a/Aaru.Tests/Filesystems/Reiser3.cs b/Aaru.Tests/Filesystems/Reiser3.cs index cacf5e3db..1479f8e39 100644 --- a/Aaru.Tests/Filesystems/Reiser3.cs +++ b/Aaru.Tests/Filesystems/Reiser3.cs @@ -41,8 +41,8 @@ public class Reiser3() : FilesystemTest("reiserfs") public override IFilesystem Plugin => new Reiser(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux_2.2.20_r3.5.aif", @@ -92,5 +92,5 @@ public class Reiser3() : FilesystemTest("reiserfs") VolumeName = "DicSetter", VolumeSerial = "8902ac3c-3e0c-4c4c-84ec-03405c1710f1" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/Reiser4.cs b/Aaru.Tests/Filesystems/Reiser4.cs index 97fdd8e03..c6e13f8a5 100644 --- a/Aaru.Tests/Filesystems/Reiser4.cs +++ b/Aaru.Tests/Filesystems/Reiser4.cs @@ -40,8 +40,8 @@ public class Reiser4() : FilesystemTest("reiser4") public override IFilesystem Plugin => new Aaru.Filesystems.Reiser4(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -53,5 +53,5 @@ public class Reiser4() : FilesystemTest("reiser4") VolumeName = "Volume label", VolumeSerial = "b0c1924e-6f10-8c42-b6c5-66a457896460" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/SFS/APM.cs b/Aaru.Tests/Filesystems/SFS/APM.cs index 5a1c2d097..823bb1d14 100644 --- a/Aaru.Tests/Filesystems/SFS/APM.cs +++ b/Aaru.Tests/Filesystems/SFS/APM.cs @@ -41,8 +41,8 @@ public class APM() : FilesystemTest("sfs") public override IFilesystem Plugin => new Aaru.Filesystems.SFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "morphos_3.13.aif", @@ -52,5 +52,5 @@ public class APM() : FilesystemTest("sfs") Clusters = 262018, ClusterSize = 512 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/SFS/MBR+RDB.cs b/Aaru.Tests/Filesystems/SFS/MBR+RDB.cs index 83876de10..6d08721df 100644 --- a/Aaru.Tests/Filesystems/SFS/MBR+RDB.cs +++ b/Aaru.Tests/Filesystems/SFS/MBR+RDB.cs @@ -44,8 +44,8 @@ public class MBR_RDB() : FilesystemTest("sfs") public override IFilesystem Plugin => new Aaru.Filesystems.SFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "aros.aif", @@ -55,5 +55,5 @@ public class MBR_RDB() : FilesystemTest("sfs") Clusters = 406224, ClusterSize = 512 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/SFS/MBR.cs b/Aaru.Tests/Filesystems/SFS/MBR.cs index 6db4635c0..c75583dda 100644 --- a/Aaru.Tests/Filesystems/SFS/MBR.cs +++ b/Aaru.Tests/Filesystems/SFS/MBR.cs @@ -40,8 +40,8 @@ public class MBR() : FilesystemTest("sfs") public override IFilesystem Plugin => new Aaru.Filesystems.SFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "aros.aif", @@ -51,5 +51,5 @@ public class MBR() : FilesystemTest("sfs") Clusters = 408240, ClusterSize = 512 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/SFS/RDB.cs b/Aaru.Tests/Filesystems/SFS/RDB.cs index e363d6d0a..1c8257b5e 100644 --- a/Aaru.Tests/Filesystems/SFS/RDB.cs +++ b/Aaru.Tests/Filesystems/SFS/RDB.cs @@ -41,8 +41,8 @@ public class RDB() : FilesystemTest("sfs") public override IFilesystem Plugin => new Aaru.Filesystems.SFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "uae.aif", @@ -88,5 +88,5 @@ public class RDB() : FilesystemTest("sfs") Clusters = 261936, ClusterSize = 512 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/SysV/MBR.cs b/Aaru.Tests/Filesystems/SysV/MBR.cs index 5a81212ba..c62a291f9 100644 --- a/Aaru.Tests/Filesystems/SysV/MBR.cs +++ b/Aaru.Tests/Filesystems/SysV/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : FilesystemTest("sysv_r4") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "att_unix_svr4v2.1.aif", @@ -73,5 +73,5 @@ public class MBR() : FilesystemTest("sysv_r4") ClusterSize = 1024, VolumeName = "Volume label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/SysV/RDB.cs b/Aaru.Tests/Filesystems/SysV/RDB.cs index 143ce516f..7ad3548c3 100644 --- a/Aaru.Tests/Filesystems/SysV/RDB.cs +++ b/Aaru.Tests/Filesystems/SysV/RDB.cs @@ -41,8 +41,8 @@ public class RDB() : FilesystemTest("sysv_r4") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amix.aif", @@ -53,5 +53,5 @@ public class RDB() : FilesystemTest("sysv_r4") ClusterSize = 1024, VolumeName = "" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/SysV/Whole.cs b/Aaru.Tests/Filesystems/SysV/Whole.cs index c296eeff6..06f248eff 100644 --- a/Aaru.Tests/Filesystems/SysV/Whole.cs +++ b/Aaru.Tests/Filesystems/SysV/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : FilesystemTest("sysv_r4") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amix.adf.lz", @@ -134,5 +134,5 @@ public class Whole() : FilesystemTest("sysv_r4") ClusterSize = 1024, VolumeName = "" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UDF/1.02/Whole.cs b/Aaru.Tests/Filesystems/UDF/1.02/Whole.cs index 949ab0a37..c947f0d00 100644 --- a/Aaru.Tests/Filesystems/UDF/1.02/Whole.cs +++ b/Aaru.Tests/Filesystems/UDF/1.02/Whole.cs @@ -43,8 +43,8 @@ public class Whole : FilesystemTest public override IFilesystem Plugin => new Aaru.Filesystems.UDF(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -110,5 +110,5 @@ public class Whole : FilesystemTest VolumeName = "anonymous", VolumeSerial = "382885b272e72ab8" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UDF/1.50/Optical.cs b/Aaru.Tests/Filesystems/UDF/1.50/Optical.cs index 5816399fc..909b19968 100644 --- a/Aaru.Tests/Filesystems/UDF/1.50/Optical.cs +++ b/Aaru.Tests/Filesystems/UDF/1.50/Optical.cs @@ -43,8 +43,8 @@ public class Optical : FilesystemTest public override IFilesystem Plugin => new Aaru.Filesystems.UDF(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "ecs20.aif", @@ -58,5 +58,5 @@ public class Optical : FilesystemTest VolumeName = "Volume label", VolumeSerial = "Volume Set ID not specified" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UDF/1.50/Whole.cs b/Aaru.Tests/Filesystems/UDF/1.50/Whole.cs index f50a6181a..f464da1ed 100644 --- a/Aaru.Tests/Filesystems/UDF/1.50/Whole.cs +++ b/Aaru.Tests/Filesystems/UDF/1.50/Whole.cs @@ -43,8 +43,8 @@ public class Whole : FilesystemTest public override IFilesystem Plugin => new Aaru.Filesystems.UDF(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -136,5 +136,5 @@ public class Whole : FilesystemTest VolumeName = "Volume label", VolumeSerial = "DCC41202AppleUDF" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UDF/2.00/Optical.cs b/Aaru.Tests/Filesystems/UDF/2.00/Optical.cs index cfb948925..7b9477eca 100644 --- a/Aaru.Tests/Filesystems/UDF/2.00/Optical.cs +++ b/Aaru.Tests/Filesystems/UDF/2.00/Optical.cs @@ -43,8 +43,8 @@ public class Optical : FilesystemTest public override IFilesystem Plugin => new Aaru.Filesystems.UDF(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "ecs20.aif", @@ -58,5 +58,5 @@ public class Optical : FilesystemTest VolumeName = "UDF5A5DEF48", VolumeSerial = "Volume Set ID not specified" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UDF/2.00/Whole.cs b/Aaru.Tests/Filesystems/UDF/2.00/Whole.cs index 08ad1b344..ce0caf075 100644 --- a/Aaru.Tests/Filesystems/UDF/2.00/Whole.cs +++ b/Aaru.Tests/Filesystems/UDF/2.00/Whole.cs @@ -43,8 +43,8 @@ public class Whole : FilesystemTest public override IFilesystem Plugin => new Aaru.Filesystems.UDF(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -84,5 +84,5 @@ public class Whole : FilesystemTest VolumeName = "DicSetter", VolumeSerial = "5cc7f4183e0d5f7aLinuxUDF" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UDF/2.01/Optical.cs b/Aaru.Tests/Filesystems/UDF/2.01/Optical.cs index c844966fe..72fc15d1f 100644 --- a/Aaru.Tests/Filesystems/UDF/2.01/Optical.cs +++ b/Aaru.Tests/Filesystems/UDF/2.01/Optical.cs @@ -43,8 +43,8 @@ public class Optical : FilesystemTest public override IFilesystem Plugin => new Aaru.Filesystems.UDF(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "ecs20.aif", @@ -71,5 +71,5 @@ public class Optical : FilesystemTest VolumeName = "UDF5A5DFF10", VolumeSerial = "Volume Set ID not specified" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UDF/2.01/Whole.cs b/Aaru.Tests/Filesystems/UDF/2.01/Whole.cs index 4989fa24e..eaffee0d9 100644 --- a/Aaru.Tests/Filesystems/UDF/2.01/Whole.cs +++ b/Aaru.Tests/Filesystems/UDF/2.01/Whole.cs @@ -43,8 +43,8 @@ public class Whole : FilesystemTest public override IFilesystem Plugin => new Aaru.Filesystems.UDF(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -110,5 +110,5 @@ public class Whole : FilesystemTest VolumeName = "anonymous", VolumeSerial = "60a80c385dda0f96" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UDF/2.50/Whole.cs b/Aaru.Tests/Filesystems/UDF/2.50/Whole.cs index 03d18ab0c..8aa5daaf4 100644 --- a/Aaru.Tests/Filesystems/UDF/2.50/Whole.cs +++ b/Aaru.Tests/Filesystems/UDF/2.50/Whole.cs @@ -43,8 +43,8 @@ public class Whole : FilesystemTest public override IFilesystem Plugin => new Aaru.Filesystems.UDF(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -97,5 +97,5 @@ public class Whole : FilesystemTest VolumeName = "anonymous", VolumeSerial = "723d15a55a5d8156" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UDF/2.60/Whole.cs b/Aaru.Tests/Filesystems/UDF/2.60/Whole.cs index 66ef47b69..aa63bbbe3 100644 --- a/Aaru.Tests/Filesystems/UDF/2.60/Whole.cs +++ b/Aaru.Tests/Filesystems/UDF/2.60/Whole.cs @@ -44,8 +44,8 @@ public class Whole : FilesystemTest public override IFilesystem Plugin => new Aaru.Filesystems.UDF(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.11.aif", @@ -85,5 +85,5 @@ public class Whole : FilesystemTest VolumeName = "anonymous", VolumeSerial = "05f537510deab1e7" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UFS/APM.cs b/Aaru.Tests/Filesystems/UFS/APM.cs index b4680b876..3f7352ad4 100644 --- a/Aaru.Tests/Filesystems/UFS/APM.cs +++ b/Aaru.Tests/Filesystems/UFS/APM.cs @@ -41,8 +41,8 @@ public class APM : FilesystemTest public override IFilesystem Plugin => new FFSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "ffs43/macosx_10.0.aif", @@ -283,5 +283,5 @@ public class APM : FilesystemTest ClusterSize = 1024, Type = "ufs" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UFS/MBR.cs b/Aaru.Tests/Filesystems/UFS/MBR.cs index 16cf22d45..68c9e6a7e 100644 --- a/Aaru.Tests/Filesystems/UFS/MBR.cs +++ b/Aaru.Tests/Filesystems/UFS/MBR.cs @@ -41,8 +41,8 @@ public class MBR : FilesystemTest public override IFilesystem Plugin => new FFSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "ufs1/linux.aif", @@ -513,5 +513,5 @@ public class MBR : FilesystemTest ClusterSize = 1024, Type = "ufs" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UFS/NeXT Floppy.cs b/Aaru.Tests/Filesystems/UFS/NeXT Floppy.cs index 478869565..df36738d1 100644 --- a/Aaru.Tests/Filesystems/UFS/NeXT Floppy.cs +++ b/Aaru.Tests/Filesystems/UFS/NeXT Floppy.cs @@ -43,8 +43,8 @@ public class NeXT_Floppy : FilesystemTest public override IFilesystem Plugin => new FFSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "nextstep_3.3_mf2dd.img.lz", @@ -145,5 +145,5 @@ public class NeXT_Floppy : FilesystemTest ClusterSize = 1024, Type = "ufs" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UFS/NeXT.cs b/Aaru.Tests/Filesystems/UFS/NeXT.cs index ed67b02ab..090065929 100644 --- a/Aaru.Tests/Filesystems/UFS/NeXT.cs +++ b/Aaru.Tests/Filesystems/UFS/NeXT.cs @@ -41,8 +41,8 @@ public class NeXT : FilesystemTest public override IFilesystem Plugin => new FFSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "nextstep_3.3.aif", @@ -133,5 +133,5 @@ public class NeXT : FilesystemTest ClusterSize = 1024, Type = "ufs" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UFS/RDB.cs b/Aaru.Tests/Filesystems/UFS/RDB.cs index caf7fe710..25d2e0221 100644 --- a/Aaru.Tests/Filesystems/UFS/RDB.cs +++ b/Aaru.Tests/Filesystems/UFS/RDB.cs @@ -41,8 +41,8 @@ public class RDB : FilesystemTest public override IFilesystem Plugin => new FFSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amix.aif", @@ -53,5 +53,5 @@ public class RDB : FilesystemTest ClusterSize = 1024, Type = "ufs" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UFS/Sun i86.cs b/Aaru.Tests/Filesystems/UFS/Sun i86.cs index 1a2978c10..012b328e5 100644 --- a/Aaru.Tests/Filesystems/UFS/Sun i86.cs +++ b/Aaru.Tests/Filesystems/UFS/Sun i86.cs @@ -45,8 +45,8 @@ public class Sun_i86 : FilesystemTest public override IFilesystem Plugin => new FFSPlugin(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "solaris_7.aif", @@ -57,5 +57,5 @@ public class Sun_i86 : FilesystemTest ClusterSize = 1024, Type = "ufs" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UFS/Whole.cs b/Aaru.Tests/Filesystems/UFS/Whole.cs index a89a183c3..fdbf6a1ab 100644 --- a/Aaru.Tests/Filesystems/UFS/Whole.cs +++ b/Aaru.Tests/Filesystems/UFS/Whole.cs @@ -42,8 +42,8 @@ public class Whole : FilesystemTest public override IFilesystem Plugin => new FFSPlugin(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amix_mf2dd.adf.lz", @@ -268,5 +268,5 @@ public class Whole : FilesystemTest VolumeName = "", Type = "ufs2" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UNIXBFS/MBR.cs b/Aaru.Tests/Filesystems/UNIXBFS/MBR.cs index 6b3e6d541..207739a5f 100644 --- a/Aaru.Tests/Filesystems/UNIXBFS/MBR.cs +++ b/Aaru.Tests/Filesystems/UNIXBFS/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : FilesystemTest("bfs") public override IFilesystem Plugin => new BFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -53,5 +53,5 @@ public class MBR() : FilesystemTest("bfs") ClusterSize = 512, VolumeName = "Label" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UNIXBFS/RDB.cs b/Aaru.Tests/Filesystems/UNIXBFS/RDB.cs index 291ab5286..15191c880 100644 --- a/Aaru.Tests/Filesystems/UNIXBFS/RDB.cs +++ b/Aaru.Tests/Filesystems/UNIXBFS/RDB.cs @@ -41,8 +41,8 @@ public class RDB() : FilesystemTest("ufs") public override IFilesystem Plugin => new BFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amix.aif", @@ -53,5 +53,5 @@ public class RDB() : FilesystemTest("ufs") ClusterSize = 2048, VolumeSerial = "UNKNOWN" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/UNIXBFS/Whole.cs b/Aaru.Tests/Filesystems/UNIXBFS/Whole.cs index febd5a279..237160f66 100644 --- a/Aaru.Tests/Filesystems/UNIXBFS/Whole.cs +++ b/Aaru.Tests/Filesystems/UNIXBFS/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : FilesystemTest("bfs") public override IFilesystem Plugin => new BFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "amix_mf2dd.adf.lz", @@ -90,5 +90,5 @@ public class Whole() : FilesystemTest("bfs") Clusters = 2880, ClusterSize = 512 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/XENIX/MBR.cs b/Aaru.Tests/Filesystems/XENIX/MBR.cs index 0f08fe169..01e184d58 100644 --- a/Aaru.Tests/Filesystems/XENIX/MBR.cs +++ b/Aaru.Tests/Filesystems/XENIX/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : FilesystemTest("xenixfs") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "xenix_2.3.2d.aif", @@ -70,5 +70,5 @@ public class MBR() : FilesystemTest("xenixfs") ClusterSize = 1024, VolumeName = "" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/XENIX/Whole.cs b/Aaru.Tests/Filesystems/XENIX/Whole.cs index 89e99872f..ed982d9f2 100644 --- a/Aaru.Tests/Filesystems/XENIX/Whole.cs +++ b/Aaru.Tests/Filesystems/XENIX/Whole.cs @@ -42,8 +42,8 @@ public class Whole() : FilesystemTest("xenixfs") public override IFilesystem Plugin => new SysVfs(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "scoopenserver_5.0.7hw_dmf.img.lz", @@ -89,5 +89,5 @@ public class Whole() : FilesystemTest("xenixfs") ClusterSize = 1024, VolumeName = "" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/XFS.cs b/Aaru.Tests/Filesystems/XFS.cs index 45b7d4a55..74cdd87b1 100644 --- a/Aaru.Tests/Filesystems/XFS.cs +++ b/Aaru.Tests/Filesystems/XFS.cs @@ -40,8 +40,8 @@ public class XFS() : FilesystemTest("xfs") public override IFilesystem Plugin => new Aaru.Filesystems.XFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -64,5 +64,5 @@ public class XFS() : FilesystemTest("xfs") VolumeName = "DicSetter", VolumeSerial = "ed6b4d35-aa66-ce4a-9d8f-c56dbc6d7c8c" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/Xia.cs b/Aaru.Tests/Filesystems/Xia.cs index 1dd4611d0..f18ab3466 100644 --- a/Aaru.Tests/Filesystems/Xia.cs +++ b/Aaru.Tests/Filesystems/Xia.cs @@ -40,8 +40,8 @@ public class Xia() : FilesystemTest("xia") public override IFilesystem Plugin => new Aaru.Filesystems.Xia(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux_2.0.0.aif", @@ -60,5 +60,5 @@ public class Xia() : FilesystemTest("xia") Clusters = 131008, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/ZFS.cs b/Aaru.Tests/Filesystems/ZFS.cs index 38743890f..189e67d5b 100644 --- a/Aaru.Tests/Filesystems/ZFS.cs +++ b/Aaru.Tests/Filesystems/ZFS.cs @@ -42,8 +42,8 @@ public class Zfs() : FilesystemTest("zfs") public override IFilesystem Plugin => new ZFS(); public override bool Partitions => false; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "netbsd_7.1.aif", @@ -53,5 +53,5 @@ public class Zfs() : FilesystemTest("zfs") VolumeName = "NetBSD 7.1", VolumeSerial = "2639895335654686206" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/btrfs.cs b/Aaru.Tests/Filesystems/btrfs.cs index 8d5e5b43d..632c9074c 100644 --- a/Aaru.Tests/Filesystems/btrfs.cs +++ b/Aaru.Tests/Filesystems/btrfs.cs @@ -41,8 +41,8 @@ public class Btrfs() : FilesystemTest("btrfs") public override IFilesystem Plugin => new BTRFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -65,5 +65,5 @@ public class Btrfs() : FilesystemTest("btrfs") VolumeName = "btrfs", VolumeSerial = "5af44541-0605-f541-af6d-c229576707ab" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/exFAT/APM.cs b/Aaru.Tests/Filesystems/exFAT/APM.cs index f85f922f7..f6a654764 100644 --- a/Aaru.Tests/Filesystems/exFAT/APM.cs +++ b/Aaru.Tests/Filesystems/exFAT/APM.cs @@ -40,8 +40,8 @@ public class APM() : FilesystemTest("exfat") public override IFilesystem Plugin => new Aaru.Filesystems.exFAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.11.aif", @@ -52,5 +52,5 @@ public class APM() : FilesystemTest("exfat") ClusterSize = 4096, VolumeSerial = "595AC82C" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/exFAT/GPT.cs b/Aaru.Tests/Filesystems/exFAT/GPT.cs index 31624e90c..51196e2dc 100644 --- a/Aaru.Tests/Filesystems/exFAT/GPT.cs +++ b/Aaru.Tests/Filesystems/exFAT/GPT.cs @@ -40,8 +40,8 @@ public class GPT() : FilesystemTest("exfat") public override IFilesystem Plugin => new Aaru.Filesystems.exFAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "macosx_10.11.aif", @@ -52,5 +52,5 @@ public class GPT() : FilesystemTest("exfat") ClusterSize = 4096, VolumeSerial = "595ACC39" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/exFAT/MBR.cs b/Aaru.Tests/Filesystems/exFAT/MBR.cs index e60f90f8c..516adfe83 100644 --- a/Aaru.Tests/Filesystems/exFAT/MBR.cs +++ b/Aaru.Tests/Filesystems/exFAT/MBR.cs @@ -41,8 +41,8 @@ public class MBR() : FilesystemTest("exfat") public override IFilesystem Plugin => new Aaru.Filesystems.exFAT(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux.aif", @@ -93,5 +93,5 @@ public class MBR() : FilesystemTest("exfat") ClusterSize = 32768, VolumeSerial = "636E083B" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/ext.cs b/Aaru.Tests/Filesystems/ext.cs index 39b5bbf76..51b0ed344 100644 --- a/Aaru.Tests/Filesystems/ext.cs +++ b/Aaru.Tests/Filesystems/ext.cs @@ -43,8 +43,8 @@ public class Ext() : FilesystemTest("ext") public override IFilesystem Plugin => new extFS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "linux_2.0.37.aif", @@ -54,5 +54,5 @@ public class Ext() : FilesystemTest("ext") Clusters = 131008, ClusterSize = 1024 } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filesystems/ext2.cs b/Aaru.Tests/Filesystems/ext2.cs index 606fd5438..22ab310ba 100644 --- a/Aaru.Tests/Filesystems/ext2.cs +++ b/Aaru.Tests/Filesystems/ext2.cs @@ -41,8 +41,8 @@ public class Ext2 : FilesystemTest public override IFilesystem Plugin => new ext2FS(); public override bool Partitions => true; - public override FileSystemTest[] Tests => new[] - { + public override FileSystemTest[] Tests => + [ new FileSystemTest { TestFile = "netbsd_6.1.5.aif", @@ -341,5 +341,5 @@ public class Ext2 : FilesystemTest VolumeName = "DicSetter", VolumeSerial = "10413797-43d1-6545-8fbc-6ebc9d328be9" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Filters/BZip2.cs b/Aaru.Tests/Filters/BZip2.cs index 3f060dda6..0beb442e1 100644 --- a/Aaru.Tests/Filters/BZip2.cs +++ b/Aaru.Tests/Filters/BZip2.cs @@ -39,13 +39,13 @@ namespace Aaru.Tests.Filters; public class BZip2 { static readonly byte[] _expectedFile = - { + [ 0xf8, 0xb6, 0xbc, 0x62, 0x33, 0xcf, 0x1d, 0x28, 0x02, 0xef, 0x80, 0xf1, 0xe4, 0xfc, 0x1b, 0xdf - }; + ]; static readonly byte[] _expectedContents = - { + [ 0x18, 0x90, 0x5a, 0xf9, 0x83, 0xd8, 0x2b, 0xdd, 0x1a, 0xcc, 0x69, 0x75, 0x4f, 0x0f, 0x81, 0x5e - }; + ]; readonly string _location; public BZip2() => _location = Path.Combine(Consts.TestFilesRoot, "Filters", "bzip2.bz2"); diff --git a/Aaru.Tests/Filters/GZip.cs b/Aaru.Tests/Filters/GZip.cs index 4b836d4e0..f2194872c 100644 --- a/Aaru.Tests/Filters/GZip.cs +++ b/Aaru.Tests/Filters/GZip.cs @@ -39,13 +39,13 @@ namespace Aaru.Tests.Filters; public class GZip { static readonly byte[] _expectedFile = - { + [ 0x35, 0xe2, 0x9c, 0x9d, 0x05, 0x1b, 0x6d, 0xa6, 0x6c, 0x24, 0xeb, 0x30, 0xe8, 0xd2, 0xa6, 0x6b - }; + ]; static readonly byte[] _expectedContents = - { + [ 0x18, 0x90, 0x5a, 0xf9, 0x83, 0xd8, 0x2b, 0xdd, 0x1a, 0xcc, 0x69, 0x75, 0x4f, 0x0f, 0x81, 0x5e - }; + ]; readonly string _location; public GZip() => _location = Path.Combine(Consts.TestFilesRoot, "Filters", "gzip.gz"); diff --git a/Aaru.Tests/Filters/LZip.cs b/Aaru.Tests/Filters/LZip.cs index bf05e8401..fcefa43e0 100644 --- a/Aaru.Tests/Filters/LZip.cs +++ b/Aaru.Tests/Filters/LZip.cs @@ -39,13 +39,13 @@ namespace Aaru.Tests.Filters; public class LZip { static readonly byte[] _expectedFile = - { + [ 0x3f, 0x7b, 0x77, 0x3e, 0x52, 0x48, 0xd5, 0x26, 0xf4, 0xb1, 0xac, 0x15, 0xb2, 0xb3, 0x5f, 0x87 - }; + ]; static readonly byte[] _expectedContents = - { + [ 0x18, 0x90, 0x5a, 0xf9, 0x83, 0xd8, 0x2b, 0xdd, 0x1a, 0xcc, 0x69, 0x75, 0x4f, 0x0f, 0x81, 0x5e - }; + ]; readonly string _location; public LZip() => _location = Path.Combine(Consts.TestFilesRoot, "Filters", "lzip.lz"); diff --git a/Aaru.Tests/Filters/XZ.cs b/Aaru.Tests/Filters/XZ.cs index f5d37c303..202e85a80 100644 --- a/Aaru.Tests/Filters/XZ.cs +++ b/Aaru.Tests/Filters/XZ.cs @@ -40,13 +40,13 @@ namespace Aaru.Tests.Filters; public class Xz { static readonly byte[] _expectedFile = - { + [ 0x6c, 0x88, 0xa5, 0x9a, 0x1b, 0x7a, 0xec, 0x59, 0x2b, 0xef, 0x8a, 0x28, 0xdb, 0x11, 0x01, 0xc8 - }; + ]; static readonly byte[] _expectedContents = - { + [ 0x18, 0x90, 0x5a, 0xf9, 0x83, 0xd8, 0x2b, 0xdd, 0x1a, 0xcc, 0x69, 0x75, 0x4f, 0x0f, 0x81, 0x5e - }; + ]; readonly string _location; public Xz() => _location = Path.Combine(Consts.TestFilesRoot, "Filters", "xz.xz"); diff --git a/Aaru.Tests/Helpers/Marshal.cs b/Aaru.Tests/Helpers/Marshal.cs index 4919db940..4b007b025 100644 --- a/Aaru.Tests/Helpers/Marshal.cs +++ b/Aaru.Tests/Helpers/Marshal.cs @@ -6,29 +6,15 @@ namespace Aaru.Tests.Helpers; public class Marshal { readonly string[] _testStrings = - { + [ "275048534431364760011a77d2014701", "0235800001000000", "0xbabeface", "0xcefaadde" - }; + ]; readonly byte[][] _resultBytes = - { - new byte[] - { - 0x27, 0x50, 0x48, 0x53, 0x44, 0x31, 0x36, 0x47, 0x60, 0x01, 0x1a, 0x77, 0xd2, 0x01, 0x47, 0x01 - }, - new byte[] - { - 0x02, 0x35, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00 - }, - new byte[] - { - 0xba, 0xbe, 0xfa, 0xce - }, - new byte[] - { - 0xce, 0xfa, 0xad, 0xde - } - }; + [ + [0x27, 0x50, 0x48, 0x53, 0x44, 0x31, 0x36, 0x47, 0x60, 0x01, 0x1a, 0x77, 0xd2, 0x01, 0x47, 0x01], + [0x02, 0x35, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00], [0xba, 0xbe, 0xfa, 0xce], [0xce, 0xfa, 0xad, 0xde] + ]; [Test] public void ConvertFromHexAscii() diff --git a/Aaru.Tests/Images/2MG.cs b/Aaru.Tests/Images/2MG.cs index f75f1d7e5..52818db43 100644 --- a/Aaru.Tests/Images/2MG.cs +++ b/Aaru.Tests/Images/2MG.cs @@ -39,8 +39,8 @@ public class Apple2Mg : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "2mg"); public override IMediaImage Plugin => new Aaru.Images.Apple2Mg(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "blank140.2mg.lz", @@ -56,14 +56,14 @@ public class Apple2Mg : BlockMediaImageTest Sectors = 455, SectorSize = 256, Md5 = "906c1bdbf76bf089ea47aae98151df5d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 455 } - } + ] }, new BlockImageTestExpected { @@ -72,14 +72,14 @@ public class Apple2Mg : BlockMediaImageTest Sectors = 455, SectorSize = 256, Md5 = "76f8fe4c5bc1976f99641ad7cdf53109", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 455 } - } + ] }, new BlockImageTestExpected { @@ -88,14 +88,14 @@ public class Apple2Mg : BlockMediaImageTest Sectors = 560, SectorSize = 256, Md5 = "0ffcbd4180306192726926b43755db2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 560 } - } + ] }, new BlockImageTestExpected { @@ -104,14 +104,14 @@ public class Apple2Mg : BlockMediaImageTest Sectors = 560, SectorSize = 256, Md5 = "91d020725d081500caa1fd8aad959397", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 560 } - } + ] }, new BlockImageTestExpected { @@ -120,14 +120,14 @@ public class Apple2Mg : BlockMediaImageTest Sectors = 560, SectorSize = 256, Md5 = "91d020725d081500caa1fd8aad959397", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 560 } - } + ] }, new BlockImageTestExpected { @@ -136,14 +136,14 @@ public class Apple2Mg : BlockMediaImageTest Sectors = 560, SectorSize = 256, Md5 = "0ffcbd4180306192726926b43755db2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 560 } - } + ] }, new BlockImageTestExpected { @@ -152,14 +152,14 @@ public class Apple2Mg : BlockMediaImageTest Sectors = 560, SectorSize = 256, Md5 = "91d020725d081500caa1fd8aad959397", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 560 } - } + ] }, new BlockImageTestExpected { @@ -168,14 +168,14 @@ public class Apple2Mg : BlockMediaImageTest Sectors = 560, SectorSize = 256, Md5 = "0ffcbd4180306192726926b43755db2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 560 } - } + ] }, new BlockImageTestExpected { @@ -369,5 +369,5 @@ public class Apple2Mg : BlockMediaImageTest SectorSize = 256, Md5 = "6f692a8fadfaa243d9f2d8d41f0e4cad" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/AaruFormat/Tape/V1.cs b/Aaru.Tests/Images/AaruFormat/Tape/V1.cs index 96bf8ed03..a9d2717bd 100644 --- a/Aaru.Tests/Images/AaruFormat/Tape/V1.cs +++ b/Aaru.Tests/Images/AaruFormat/Tape/V1.cs @@ -40,8 +40,8 @@ public class V1 : TapeMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "AaruFormat", "V1"); public override IMediaImage Plugin => new Aaru.Images.AaruFormat(); - public override TapeImageTestExpected[] Tests => new[] - { + public override TapeImageTestExpected[] Tests => + [ new TapeImageTestExpected { TestFile = "Nonstop-UX System V Release 4 B32 (Boot Tape).aif", @@ -49,17 +49,17 @@ public class V1 : TapeMediaImageTest Sectors = 1604, SectorSize = 10240, Md5 = "a6334d975523b3422fea522b0cc118a9", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 1603, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -67,7 +67,7 @@ public class V1 : TapeMediaImageTest LastBlock = 1603, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -76,17 +76,17 @@ public class V1 : TapeMediaImageTest Sectors = 15485, SectorSize = 512, Md5 = "17ef78d9e5c53b976f530d4ca44223fd", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 15484, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -94,7 +94,7 @@ public class V1 : TapeMediaImageTest LastBlock = 15484, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -103,17 +103,17 @@ public class V1 : TapeMediaImageTest Sectors = 15, SectorSize = 32256, Md5 = "76c0ae10f4ec70ef8681b212f02a71c8", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 14, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -121,7 +121,7 @@ public class V1 : TapeMediaImageTest LastBlock = 14, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -130,17 +130,17 @@ public class V1 : TapeMediaImageTest Sectors = 3298, SectorSize = 32256, Md5 = "e331c9d0ae7c25c81c6580bc9965e2d0", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 3297, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -148,7 +148,7 @@ public class V1 : TapeMediaImageTest LastBlock = 3297, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -157,17 +157,17 @@ public class V1 : TapeMediaImageTest Sectors = 3152, SectorSize = 32256, Md5 = "018c37c40f8df91ab9b098d643c9ae6c", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 3151, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -175,7 +175,7 @@ public class V1 : TapeMediaImageTest LastBlock = 3151, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -184,17 +184,17 @@ public class V1 : TapeMediaImageTest Sectors = 818, SectorSize = 32256, Md5 = "eb3ce36b2c3afeeec59e5b8ed802a393", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 817, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -202,7 +202,7 @@ public class V1 : TapeMediaImageTest LastBlock = 817, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -211,17 +211,17 @@ public class V1 : TapeMediaImageTest Sectors = 7, SectorSize = 32256, Md5 = "b057656698a224187afb2bdbb8caf7f3", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 6, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -229,7 +229,7 @@ public class V1 : TapeMediaImageTest LastBlock = 6, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -238,17 +238,17 @@ public class V1 : TapeMediaImageTest Sectors = 684, SectorSize = 32256, Md5 = "8e48e388e7094f3170065718ab618b53", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 683, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -256,7 +256,7 @@ public class V1 : TapeMediaImageTest LastBlock = 683, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -265,17 +265,17 @@ public class V1 : TapeMediaImageTest Sectors = 73525, SectorSize = 1024, Md5 = "8861f8c06a2e93ca5a81d729ad3e1de1", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 73524, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -311,7 +311,7 @@ public class V1 : TapeMediaImageTest LastBlock = 73524, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -320,17 +320,17 @@ public class V1 : TapeMediaImageTest Sectors = 290, SectorSize = 262144, Md5 = "bfc402b23af0cf1ad22d9fb2ea29b58f", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 289, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -366,7 +366,7 @@ public class V1 : TapeMediaImageTest LastBlock = 289, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -375,17 +375,17 @@ public class V1 : TapeMediaImageTest Sectors = 37587, SectorSize = 8192, Md5 = "e4a3e2fe26c72ca025ac0c017ec73ee9", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 37586, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -617,7 +617,7 @@ public class V1 : TapeMediaImageTest LastBlock = 37586, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -626,17 +626,17 @@ public class V1 : TapeMediaImageTest Sectors = 25046, SectorSize = 1024, Md5 = "e625c03d7493dc22fe49f91f731446e8", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 25045, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -679,7 +679,7 @@ public class V1 : TapeMediaImageTest LastBlock = 25045, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -688,17 +688,17 @@ public class V1 : TapeMediaImageTest Sectors = 102, SectorSize = 262144, Md5 = "198464b1daf8e674debf8eda0fcbf016", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 101, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -741,7 +741,7 @@ public class V1 : TapeMediaImageTest LastBlock = 101, Partition = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/AaruFormat/V1.cs b/Aaru.Tests/Images/AaruFormat/V1.cs index 30eb64a80..4a9111145 100644 --- a/Aaru.Tests/Images/AaruFormat/V1.cs +++ b/Aaru.Tests/Images/AaruFormat/V1.cs @@ -39,8 +39,8 @@ public class V1 : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "AaruFormat", "V1"); public override IMediaImage Plugin => new Aaru.Images.AaruFormat(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "cdiready_the_apprentice.aif", @@ -50,8 +50,8 @@ public class V1 : OpticalMediaImageTest Md5 = "ad6b898e5f93faf33967fe53fea7037e", LongMd5 = "8c897ff39ce1ae7b091bfd00fbc3c1bb", SubchannelMd5 = "579e2b502d86bc1eb7d6aded2b752c36", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -60,8 +60,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 0, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 279300, @@ -69,7 +69,7 @@ public class V1 : OpticalMediaImageTest Type = "cdi", VolumeName = "The Apprentice" } - } + ] }, new TrackInfoTestExpected { @@ -247,7 +247,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -258,8 +258,8 @@ public class V1 : OpticalMediaImageTest Md5 = "c9036cb72bcb67d469ca82eb7a66cb2a", LongMd5 = "c9036cb72bcb67d469ca82eb7a66cb2a", SubchannelMd5 = "6d2ae02b362918f531ad414c736d349a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -372,7 +372,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -383,8 +383,8 @@ public class V1 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "34b8e75c3038deceaea7d382f22740cb", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -393,8 +393,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -409,9 +409,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -422,8 +422,8 @@ public class V1 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "5d7f79a75e21f56e62d6fc894ee71ee6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -432,8 +432,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -448,9 +448,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -461,8 +461,8 @@ public class V1 : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "80a59aaf861f925a530e1b0d7857fe25", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -471,8 +471,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -481,9 +481,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -493,8 +493,8 @@ public class V1 : OpticalMediaImageTest SectorSize = 2048, Md5 = "106f141400355476b499213f36a363f9", LongMd5 = "106f141400355476b499213f36a363f9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -502,8 +502,8 @@ public class V1 : OpticalMediaImageTest End = 2146367, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -512,9 +512,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -524,8 +524,8 @@ public class V1 : OpticalMediaImageTest SectorSize = 2048, Md5 = "106f141400355476b499213f36a363f9", LongMd5 = "106f141400355476b499213f36a363f9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -533,8 +533,8 @@ public class V1 : OpticalMediaImageTest End = 2146367, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -543,9 +543,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -555,8 +555,8 @@ public class V1 : OpticalMediaImageTest SectorSize = 2048, Md5 = "c22b7796791cd4299d74863ed04496c6", LongMd5 = "c22b7796791cd4299d74863ed04496c6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -564,8 +564,8 @@ public class V1 : OpticalMediaImageTest End = 1218959, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -574,9 +574,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -586,8 +586,8 @@ public class V1 : OpticalMediaImageTest SectorSize = 2048, Md5 = "00b1d7c5e9855959a4d2f6b796aeaf4c", LongMd5 = "00b1d7c5e9855959a4d2f6b796aeaf4c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -595,8 +595,8 @@ public class V1 : OpticalMediaImageTest End = 2236703, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -605,9 +605,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -617,8 +617,8 @@ public class V1 : OpticalMediaImageTest SectorSize = 2048, Md5 = "63d0fd3f25ab503a1818b15ca5eb86b5", LongMd5 = "63d0fd3f25ab503a1818b15ca5eb86b5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -626,8 +626,8 @@ public class V1 : OpticalMediaImageTest End = 16383999, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 16384000, @@ -636,9 +636,9 @@ public class V1 : OpticalMediaImageTest VolumeName = "Test DVD", VolumeSerial = "483E25D50034BBB0" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -648,8 +648,8 @@ public class V1 : OpticalMediaImageTest SectorSize = 2048, Md5 = "106f141400355476b499213f36a363f9", LongMd5 = "106f141400355476b499213f36a363f9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -657,8 +657,8 @@ public class V1 : OpticalMediaImageTest End = 2146367, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -667,9 +667,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -679,8 +679,8 @@ public class V1 : OpticalMediaImageTest SectorSize = 2048, Md5 = "3c03ab1def372553f1b04afa0fdbc527", LongMd5 = "3c03ab1def372553f1b04afa0fdbc527", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -688,8 +688,8 @@ public class V1 : OpticalMediaImageTest End = 2295103, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -698,9 +698,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -710,8 +710,8 @@ public class V1 : OpticalMediaImageTest SectorSize = 2048, Md5 = "106f141400355476b499213f36a363f9", LongMd5 = "106f141400355476b499213f36a363f9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -719,8 +719,8 @@ public class V1 : OpticalMediaImageTest End = 2146367, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -729,9 +729,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -742,8 +742,8 @@ public class V1 : OpticalMediaImageTest Md5 = "b6cb0d4b3a7763dc2ba6b5256a23bcbe", LongMd5 = "74cf2db1d7a0c1d790728e6250f866b7", SubchannelMd5 = "27d433659fd0142310b81175fbd610a7", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -856,8 +856,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -865,9 +865,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -878,8 +878,8 @@ public class V1 : OpticalMediaImageTest Md5 = "78466ec1a08d7804a6cb38f2ed89b10f", LongMd5 = "78466ec1a08d7804a6cb38f2ed89b10f", SubchannelMd5 = "ac39ed98b7033da6aa936b4314574a2a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -968,7 +968,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -979,8 +979,8 @@ public class V1 : OpticalMediaImageTest Md5 = "d5d22e15dcf3f081d562b351611a8991", LongMd5 = "d5d22e15dcf3f081d562b351611a8991", SubchannelMd5 = "3546cc3e1b2b3898de5a03083af9d6ee", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1021,7 +1021,7 @@ public class V1 : OpticalMediaImageTest Pregap = 0, Flags = 1 } - } + ] }, new OpticalImageTestExpected { @@ -1032,8 +1032,8 @@ public class V1 : OpticalMediaImageTest Md5 = "edc146b00d622f92c6a9bb4648cbea82", LongMd5 = "6b36340c27d5583e73539175eb87c683", SubchannelMd5 = "663da762a5bef780d09217fca9d23e08", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1042,8 +1042,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 7, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 600, @@ -1059,9 +1059,9 @@ public class V1 : OpticalMediaImageTest VolumeName = "InCD", VolumeSerial = "40888C15CA13D401InCD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1072,8 +1072,8 @@ public class V1 : OpticalMediaImageTest Md5 = "3e9862ad534415cb3b1ef216f9446d4e", LongMd5 = "502cdc0391687bc2e2a89ea7a5906ebb", SubchannelMd5 = "1aa52cf9468044489d791ab69a023a31", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1098,8 +1098,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 18853, @@ -1107,9 +1107,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "New" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1120,8 +1120,8 @@ public class V1 : OpticalMediaImageTest Md5 = "fef9ff409aa2643ac0c0649e84346f5f", LongMd5 = "ef18dc4f63ad59c6294ab09da7704366", SubchannelMd5 = "aa71734f6385319656e2f1a64af5328b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1130,8 +1130,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -1139,7 +1139,7 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -1261,7 +1261,7 @@ public class V1 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1272,8 +1272,8 @@ public class V1 : OpticalMediaImageTest Md5 = "e2e19cf38891e67a0829d01842b4052e", LongMd5 = "b31f2d228dd564c88ad851b12b43c01d", SubchannelMd5 = "989c696ee5bb336b4ad30474da573925", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1282,8 +1282,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 7876, @@ -1299,7 +1299,7 @@ public class V1 : OpticalMediaImageTest VolumeName = "Session 1", VolumeSerial = "50958B61AF6A749E" } - } + ] }, new TrackInfoTestExpected { @@ -1309,8 +1309,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 6170, @@ -1326,7 +1326,7 @@ public class V1 : OpticalMediaImageTest VolumeName = "Session 2", VolumeSerial = "50958BBBAF6A7444" } - } + ] }, new TrackInfoTestExpected { @@ -1336,8 +1336,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 5360, @@ -1353,7 +1353,7 @@ public class V1 : OpticalMediaImageTest VolumeName = "Session 3", VolumeSerial = "50958C19AF6A73E6" } - } + ] }, new TrackInfoTestExpected { @@ -1363,8 +1363,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 4, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 45796, @@ -1380,9 +1380,9 @@ public class V1 : OpticalMediaImageTest VolumeName = "Session 4", VolumeSerial = "50958C82AF6A737D" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1393,8 +1393,8 @@ public class V1 : OpticalMediaImageTest Md5 = "a5531d15eefe70ff21718b3b5da08255", LongMd5 = "11a0d9994ee761655ef4d61c6cda99e9", SubchannelMd5 = "f49e383ccee2f3cb97aeb82fcb4fdb18", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1403,8 +1403,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -1412,7 +1412,7 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -1422,7 +1422,7 @@ public class V1 : OpticalMediaImageTest Pregap = 144, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/Alcohol120.cs b/Aaru.Tests/Images/Alcohol120.cs index 2b45f138d..c4214f3cc 100644 --- a/Aaru.Tests/Images/Alcohol120.cs +++ b/Aaru.Tests/Images/Alcohol120.cs @@ -49,8 +49,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "556d7d32e3c01c2087cc56b25fe5f66d", LongMd5 = "556d7d32e3c01c2087cc56b25fe5f66d", SubchannelMd5 = "6ffdfdeacee7cd3caf6316f6b5f3a635", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -227,7 +227,7 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -237,8 +237,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "dc8aaff9bd1a8a6f642e15bce29cd03e", LongMd5 = "1ba5f0fb9f3572197a8d039fd341c0aa", SubchannelMd5 = "95ef603d7dc9e285929cbf3c79ba9db2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -247,8 +247,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 469652, @@ -256,9 +256,9 @@ public class Alcohol120 : OpticalMediaImageTest Type = "iso9660", VolumeName = "New Volume" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -268,8 +268,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "1dee46e2fa0de388d1f225ab8fa6d0b4", LongMd5 = "1dee46e2fa0de388d1f225ab8fa6d0b4", SubchannelMd5 = "b765ee54404c081b6aa8e67181d04e17", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -358,7 +358,7 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -368,8 +368,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "248ff28ea147ecdf0724fdfb0e59174a", LongMd5 = "eb48e46f5bd085dd6f9936d89afe6e9b", SubchannelMd5 = "42eea856ab1bbb04d16b1efed7c54d3f", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -386,15 +386,15 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 28672, ClusterSize = 2048, Type = "pcengine" } - } + ] }, new TrackInfoTestExpected { @@ -508,7 +508,7 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -518,8 +518,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "64d6baf711d2e0f24499d284ac2bc580", LongMd5 = "f0af56f9d093b214e1b7c9148a869eb3", SubchannelMd5 = "e596bcd432f69758678cda1e04207de5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -536,8 +536,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -546,7 +546,7 @@ public class Alcohol120 : OpticalMediaImageTest Type = "pcfx", VolumeName = "同級生2" } - } + ] }, new TrackInfoTestExpected { @@ -596,7 +596,7 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -606,8 +606,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "ff35cfa013871b322ef54612e719c185", LongMd5 = "ff35cfa013871b322ef54612e719c185", SubchannelMd5 = "9da6ad8f6f0cadd92509c10809da7296", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -720,7 +720,7 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, // TODO: Needs redump, corrupted image @@ -732,8 +732,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "016e9431ca3161d427b29dbc1312a232", LongMd5 = "6b4e35ec371770751f26163629253015", SubchannelMd5 = "6ea1db8638c111b7fd45b35a138d24fe", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -760,7 +760,7 @@ public class Alcohol120 : OpticalMediaImageTest } }*/ } - } + ] }, // TODO: Needs redump, corrupted image @@ -772,8 +772,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "016e9431ca3161d427b29dbc1312a232", LongMd5 = "6b4e35ec371770751f26163629253015", SubchannelMd5 = "1994c303674718c74b35f9a4ea1d3515", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -800,7 +800,7 @@ public class Alcohol120 : OpticalMediaImageTest } }*/ } - } + ] }, new OpticalImageTestExpected { @@ -810,8 +810,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "a1890f71563eb9907e4a08fef6afd6bf", SubchannelMd5 = "337aefffca57a2d0222dabd8989f0b3f", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -820,8 +820,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -830,9 +830,9 @@ public class Alcohol120 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -842,8 +842,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "6fe81a972e750c68e08f6935e4d91e34", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -852,8 +852,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -862,9 +862,9 @@ public class Alcohol120 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -874,8 +874,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "fe67ffb95da123e060a1c4d278df3c5a", LongMd5 = "9c13c4f7dcb76feae684ba9a368094c5", SubchannelMd5 = "e4095cb91fa40382dcadc22433b281c3", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -884,8 +884,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -900,9 +900,9 @@ public class Alcohol120 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -911,8 +911,8 @@ public class Alcohol120 : OpticalMediaImageTest Sectors = 3455936, Md5 = "692148a01b4204160b088141fb52bd70", LongMd5 = "692148a01b4204160b088141fb52bd70", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -920,8 +920,8 @@ public class Alcohol120 : OpticalMediaImageTest End = 3455935, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 3455936, @@ -930,9 +930,9 @@ public class Alcohol120 : OpticalMediaImageTest VolumeName = "Test DVD", VolumeSerial = "483E25D50034BBB0" } - } + ] } - } + ] }, // TODO: Needs redump, corrupted image @@ -943,8 +943,8 @@ public class Alcohol120 : OpticalMediaImageTest Sectors = 2146368, Md5 = "32746029d25e430cd50c464232536d1a", LongMd5 = "32746029d25e430cd50c464232536d1a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -964,7 +964,7 @@ public class Alcohol120 : OpticalMediaImageTest } }*/ } - } + ] }, // TODO: Needs redump, corrupted image @@ -975,8 +975,8 @@ public class Alcohol120 : OpticalMediaImageTest Sectors = 2146368, Md5 = "c20217c0356fcd074c33b5f4b1355914", LongMd5 = "c20217c0356fcd074c33b5f4b1355914", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -996,7 +996,7 @@ public class Alcohol120 : OpticalMediaImageTest } }*/ } - } + ] }, // TODO: Needs redump, corrupted image @@ -1007,8 +1007,8 @@ public class Alcohol120 : OpticalMediaImageTest Sectors = 2146368, Md5 = "0a49394278360f737a22e48ef125d7cd", LongMd5 = "0a49394278360f737a22e48ef125d7cd", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1028,7 +1028,7 @@ public class Alcohol120 : OpticalMediaImageTest } }*/ } - } + ] }, // TODO: Needs redump, corrupted image @@ -1039,8 +1039,8 @@ public class Alcohol120 : OpticalMediaImageTest Sectors = 2295104, Md5 = "4d0cac3a6f56c581870de38682408f95", LongMd5 = "4d0cac3a6f56c581870de38682408f95", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1060,7 +1060,7 @@ public class Alcohol120 : OpticalMediaImageTest } }*/ } - } + ] }, // TODO: Needs redump, corrupted image @@ -1071,8 +1071,8 @@ public class Alcohol120 : OpticalMediaImageTest Sectors = 2146368, Md5 = "4844a94a97027b0fea664a1fba3ecbb2", LongMd5 = "4844a94a97027b0fea664a1fba3ecbb2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1092,7 +1092,7 @@ public class Alcohol120 : OpticalMediaImageTest } }*/ } - } + ] }, new OpticalImageTestExpected { @@ -1102,8 +1102,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "7246ab63afe862677302929fb3514676", LongMd5 = "797e7cb29028763ab827212d8630cb50", SubchannelMd5 = "ceee6cf49071da484dd995c50a0b09fb", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1216,8 +1216,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -1225,9 +1225,9 @@ public class Alcohol120 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1237,8 +1237,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "7c8fc7bb768cff15d702ac8cd10108d7", LongMd5 = "7c8fc7bb768cff15d702ac8cd10108d7", SubchannelMd5 = "ca781a7afc4eb77c51f7c551ed45c03c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1327,7 +1327,7 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 0, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -1337,8 +1337,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "947139fcc9924337f11040945ee8f1f7", LongMd5 = "5d755e3ea7c66f81a381b9c59168107a", SubchannelMd5 = "84cb28d835c25e51fdcb6c2291707786", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1363,8 +1363,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 18853, @@ -1372,9 +1372,9 @@ public class Alcohol120 : OpticalMediaImageTest Type = "iso9660", VolumeName = "New" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1384,8 +1384,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "f95d6f978ddb4f98bbffda403f627fe1", LongMd5 = "6751e0ae7821f92221672b1cd5a1ff36", SubchannelMd5 = "65f938f7f9ac34fabd3ab94c14eb76b5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1394,8 +1394,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 7, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 600, @@ -1411,9 +1411,9 @@ public class Alcohol120 : OpticalMediaImageTest VolumeName = "InCD", VolumeSerial = "40888C15CA13D401InCD" } - } + ] } - } + ] }, // TODO: Needs redump, corrupted image @@ -1425,8 +1425,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "064afaa489a2f402f42aaf9b546a3fef", LongMd5 = "4d02563f72bdfbbf5a41bacf7a0fe916", SubchannelMd5 = "e5e51af5f0a689f956ffc52df2949e71", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1566,7 +1566,7 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1576,8 +1576,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "1b13a8f8aeb23f0b8bbc68518217e771", LongMd5 = "1b13a8f8aeb23f0b8bbc68518217e771", SubchannelMd5 = "25bae9e30657e2f64a45e5f690e3ae9e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1618,7 +1618,7 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 0, Flags = 1 } - } + ] }, new OpticalImageTestExpected { @@ -1627,8 +1627,8 @@ public class Alcohol120 : OpticalMediaImageTest Sectors = 230624, Md5 = "020993315e49ab0d36bc7248819162ea", LongMd5 = "020993315e49ab0d36bc7248819162ea", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1636,8 +1636,8 @@ public class Alcohol120 : OpticalMediaImageTest End = 230623, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 22016, @@ -1645,9 +1645,9 @@ public class Alcohol120 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Session 1" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1656,8 +1656,8 @@ public class Alcohol120 : OpticalMediaImageTest Sectors = 257264, Md5 = "dff8f2107a4ea9633a88ce38ff609b8e", LongMd5 = "dff8f2107a4ea9633a88ce38ff609b8e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1665,8 +1665,8 @@ public class Alcohol120 : OpticalMediaImageTest End = 257263, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 206560, @@ -1674,9 +1674,9 @@ public class Alcohol120 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Session 1" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1686,8 +1686,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "236f95016ad395ba691517d35a05b767", LongMd5 = "8c48c8951229fd083c1aafcb3e062f2b", SubchannelMd5 = "5731d17924f9fa8934c1e1ac076c6259", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1696,8 +1696,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 7876, @@ -1713,7 +1713,7 @@ public class Alcohol120 : OpticalMediaImageTest VolumeName = "Session 1", VolumeSerial = "50958B61AF6A749E" } - } + ] }, new TrackInfoTestExpected { @@ -1723,8 +1723,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 6170, @@ -1740,7 +1740,7 @@ public class Alcohol120 : OpticalMediaImageTest VolumeName = "Session 2", VolumeSerial = "50958BBBAF6A7444" } - } + ] }, new TrackInfoTestExpected { @@ -1750,8 +1750,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 5360, @@ -1767,7 +1767,7 @@ public class Alcohol120 : OpticalMediaImageTest VolumeName = "Session 3", VolumeSerial = "50958C19AF6A73E6" } - } + ] }, new TrackInfoTestExpected { @@ -1777,8 +1777,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 4, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 45796, @@ -1794,9 +1794,9 @@ public class Alcohol120 : OpticalMediaImageTest VolumeName = "Session 4", VolumeSerial = "50958C82AF6A737D" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1806,8 +1806,8 @@ public class Alcohol120 : OpticalMediaImageTest Md5 = "ab3cf9dfcc3e79c57e11e4675655d5e2", LongMd5 = "cadb31c693c0996f50ba47e262d84518", SubchannelMd5 = "4da6d2891fc0f916c1d6cd6eebe4586a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1816,8 +1816,8 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -1825,7 +1825,7 @@ public class Alcohol120 : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -1835,7 +1835,7 @@ public class Alcohol120 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, #region These test images violate the specifications and are not expected to work yet diff --git a/Aaru.Tests/Images/Anex86.cs b/Aaru.Tests/Images/Anex86.cs index e2018d964..e8ee448d8 100644 --- a/Aaru.Tests/Images/Anex86.cs +++ b/Aaru.Tests/Images/Anex86.cs @@ -39,8 +39,8 @@ public class Anex86 : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "Anex86"); public override IMediaImage Plugin => new Aaru.Images.Anex86(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "anex86_10mb.hdi.lz", @@ -122,14 +122,14 @@ public class Anex86 : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "bc1ef3236e75cb09575037b884ee9dce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -138,14 +138,14 @@ public class Anex86 : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "243036c4617b666a6c886cc23d7274e0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -154,14 +154,14 @@ public class Anex86 : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "09bb2ff964a0c5c223a1900f085e3955", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/AppleDOS/DOS.cs b/Aaru.Tests/Images/AppleDOS/DOS.cs index d8afd4e32..068f778fc 100644 --- a/Aaru.Tests/Images/AppleDOS/DOS.cs +++ b/Aaru.Tests/Images/AppleDOS/DOS.cs @@ -40,8 +40,8 @@ public class DOS : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "Apple DOS Order"); public override IMediaImage Plugin => new AppleDos(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "dos33.do.lz", @@ -49,14 +49,14 @@ public class DOS : BlockMediaImageTest Sectors = 560, SectorSize = 256, Md5 = "0ffcbd4180306192726926b43755db2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 560 } - } + ] }, new BlockImageTestExpected { @@ -106,5 +106,5 @@ public class DOS : BlockMediaImageTest SectorSize = 256, Md5 = "a7ec980472c320da5ea6f2f0aec0f502" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/AppleDOS/DOS32.cs b/Aaru.Tests/Images/AppleDOS/DOS32.cs index a896d3bda..5da4532bb 100644 --- a/Aaru.Tests/Images/AppleDOS/DOS32.cs +++ b/Aaru.Tests/Images/AppleDOS/DOS32.cs @@ -42,8 +42,8 @@ public class DOS32 : BlockMediaImageTest public override IMediaImage Plugin => new AppleDos(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "alice.d13.lz", @@ -51,14 +51,14 @@ public class DOS32 : BlockMediaImageTest Sectors = 455, SectorSize = 256, Md5 = "76f8fe4c5bc1976f99641ad7cdf53109", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 455 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/AppleDOS/ProDOS.cs b/Aaru.Tests/Images/AppleDOS/ProDOS.cs index 452c11c75..e2a7d390c 100644 --- a/Aaru.Tests/Images/AppleDOS/ProDOS.cs +++ b/Aaru.Tests/Images/AppleDOS/ProDOS.cs @@ -42,8 +42,8 @@ public class ProDOS : BlockMediaImageTest public override IMediaImage Plugin => new AppleDos(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "dos33.po.lz", @@ -51,14 +51,14 @@ public class ProDOS : BlockMediaImageTest Sectors = 560, SectorSize = 256, Md5 = "0ffcbd4180306192726926b43755db2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 560 } - } + ] }, new BlockImageTestExpected { @@ -132,5 +132,5 @@ public class ProDOS : BlockMediaImageTest SectorSize = 256, Md5 = "11ef56c80c94347d2e3f921d5c36c8de" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/AppleNIB.cs b/Aaru.Tests/Images/AppleNIB.cs index 9780029a6..d61270d3d 100644 --- a/Aaru.Tests/Images/AppleNIB.cs +++ b/Aaru.Tests/Images/AppleNIB.cs @@ -39,8 +39,8 @@ public class AppleNib : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "Nibbles"); public override IMediaImage Plugin => new Aaru.Images.AppleNib(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "dos32.nib.lz", @@ -48,14 +48,14 @@ public class AppleNib : BlockMediaImageTest Sectors = 455, SectorSize = 256, Md5 = "76f8fe4c5bc1976f99641ad7cdf53109", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 455 } - } + ] }, new BlockImageTestExpected { @@ -64,14 +64,14 @@ public class AppleNib : BlockMediaImageTest Sectors = 560, SectorSize = 256, Md5 = "0ffcbd4180306192726926b43755db2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 560 } - } + ] }, new BlockImageTestExpected { @@ -89,5 +89,5 @@ public class AppleNib : BlockMediaImageTest SectorSize = 256, Md5 = "11ef56c80c94347d2e3f921d5c36c8de" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/Apridisk.cs b/Aaru.Tests/Images/Apridisk.cs index b355628c4..6a1571662 100644 --- a/Aaru.Tests/Images/Apridisk.cs +++ b/Aaru.Tests/Images/Apridisk.cs @@ -39,8 +39,8 @@ public class Apridisk : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "Apridisk"); public override IMediaImage Plugin => new Aaru.Images.Apridisk(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "apr00001.dsk.lz", @@ -48,14 +48,14 @@ public class Apridisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "6c264287a3260a6d89e36dfcb1c98dce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -64,14 +64,14 @@ public class Apridisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "dd8e04939baeb0fcdb11ddade60c9a93", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -80,14 +80,14 @@ public class Apridisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "89132d303ef6b0ff69f4cfd38e2a22a6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -96,14 +96,14 @@ public class Apridisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "cd34832ca3aa7f55e0dd8ba126372f97", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/BlindWrite4.cs b/Aaru.Tests/Images/BlindWrite4.cs index 09bce93dd..0ef622c97 100644 --- a/Aaru.Tests/Images/BlindWrite4.cs +++ b/Aaru.Tests/Images/BlindWrite4.cs @@ -49,8 +49,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "e202d6851822b03b537f7b356e61ebcc", LongMd5 = "e202d6851822b03b537f7b356e61ebcc", SubchannelMd5 = "b158732e5396be73a25e2a12bce4ec28", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -227,7 +227,7 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -237,8 +237,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "2cf7f3f06c28032f7609aaab970c001f", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -351,7 +351,7 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -361,8 +361,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "00c0dd9095dcc8ac17246dd56d2a368c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -371,8 +371,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -387,9 +387,9 @@ public class BlindWrite4 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -399,8 +399,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "00c0dd9095dcc8ac17246dd56d2a368c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -409,8 +409,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -425,9 +425,9 @@ public class BlindWrite4 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -437,8 +437,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "3aa50e929756b926e7471255fd1aa894", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -447,8 +447,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -457,9 +457,9 @@ public class BlindWrite4 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -469,8 +469,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "c15f0beeed08f943cfc50c3246334dd2", LongMd5 = "1aab899e2965a74763b1bb232ff8bf21", SubchannelMd5 = "d5a424eedad28620468f215d5b24d453", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -583,8 +583,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -592,9 +592,9 @@ public class BlindWrite4 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -604,8 +604,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "7c8fc7bb768cff15d702ac8cd10108d7", LongMd5 = "7c8fc7bb768cff15d702ac8cd10108d7", SubchannelMd5 = "4637654a333c5917232b343ba465fba0", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -694,7 +694,7 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -704,8 +704,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "c0cdd94f1488226d37f0398eef75eb4c", LongMd5 = "843302a664a074dc4c02b27e53eb228a", SubchannelMd5 = "fd13f0194b8e141d4384abf1ad00fbf2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -730,8 +730,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 18853, @@ -739,9 +739,9 @@ public class BlindWrite4 : OpticalMediaImageTest Type = "iso9660", VolumeName = "New" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -751,8 +751,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "f95d6f978ddb4f98bbffda403f627fe1", LongMd5 = "6751e0ae7821f92221672b1cd5a1ff36", SubchannelMd5 = "d651d48c8839ad94f0a285660999db00", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -761,8 +761,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 7, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 600, @@ -778,9 +778,9 @@ public class BlindWrite4 : OpticalMediaImageTest VolumeName = "InCD", VolumeSerial = "40888C15CA13D401InCD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -790,8 +790,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "a34e29e42b60023a6ae59f37d2bd4bea", LongMd5 = "e981f7dfdb522ba937fe75474e23a446", SubchannelMd5 = "00045e5e72d806f84fb363e4ae73cf46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -800,8 +800,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -809,7 +809,7 @@ public class BlindWrite4 : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -931,7 +931,7 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -941,8 +941,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "1b13a8f8aeb23f0b8bbc68518217e771", LongMd5 = "1b13a8f8aeb23f0b8bbc68518217e771", SubchannelMd5 = "2ff4170eafb73c4be3a81c35f37e9c3d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -983,7 +983,7 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 1 } - } + ] }, new OpticalImageTestExpected { @@ -993,8 +993,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "e2e19cf38891e67a0829d01842b4052e", LongMd5 = "3e646a04eb29a8e0ad892b6ac00ba962", SubchannelMd5 = "b0b18100d5d38211f057bd3781407fc6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1003,8 +1003,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 7876, @@ -1020,7 +1020,7 @@ public class BlindWrite4 : OpticalMediaImageTest VolumeName = "Session 1", VolumeSerial = "50958B61AF6A749E" } - } + ] }, new TrackInfoTestExpected { @@ -1030,8 +1030,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 6170, @@ -1047,7 +1047,7 @@ public class BlindWrite4 : OpticalMediaImageTest VolumeName = "Session 2", VolumeSerial = "50958BBBAF6A7444" } - } + ] }, new TrackInfoTestExpected { @@ -1057,8 +1057,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 5360, @@ -1074,7 +1074,7 @@ public class BlindWrite4 : OpticalMediaImageTest VolumeName = "Session 3", VolumeSerial = "50958C19AF6A73E6" } - } + ] }, new TrackInfoTestExpected { @@ -1084,8 +1084,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 4, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 45796, @@ -1101,9 +1101,9 @@ public class BlindWrite4 : OpticalMediaImageTest VolumeName = "Session 4", VolumeSerial = "50958C82AF6A737D" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1113,8 +1113,8 @@ public class BlindWrite4 : OpticalMediaImageTest Md5 = "67ed7ec2aac06b56b4d693146d64adb7", LongMd5 = "84c5329e55e3cc8c125c636c71ba2c17", SubchannelMd5 = "5027417c4cbb4975482b902c57232dfb", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1123,8 +1123,8 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -1132,7 +1132,7 @@ public class BlindWrite4 : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -1142,7 +1142,7 @@ public class BlindWrite4 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, #region These test images violate the specifications and are not expected to work yet diff --git a/Aaru.Tests/Images/BlindWrite5.cs b/Aaru.Tests/Images/BlindWrite5.cs index 814282052..73a25dae0 100644 --- a/Aaru.Tests/Images/BlindWrite5.cs +++ b/Aaru.Tests/Images/BlindWrite5.cs @@ -48,8 +48,8 @@ public class BlindWrite5 : OpticalMediaImageTest Sectors = 2287072, Md5 = "b9b0b4318e6264c405c3f96128901815", LongMd5 = "b9b0b4318e6264c405c3f96128901815", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -57,8 +57,8 @@ public class BlindWrite5 : OpticalMediaImageTest End = 2287071, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 2287072, @@ -66,9 +66,9 @@ public class BlindWrite5 : OpticalMediaImageTest Type = "iso9660", VolumeName = "GuiaRaw" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -78,8 +78,8 @@ public class BlindWrite5 : OpticalMediaImageTest Md5 = "e2e967adc0e5c530964ac4eebe8cac47", LongMd5 = "1dc7801008110af6b8015aad64d91739", SubchannelMd5 = "26c27541d0d55fe9a87f3f7de622466d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -88,8 +88,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 469652, @@ -97,9 +97,9 @@ public class BlindWrite5 : OpticalMediaImageTest Type = "iso9660", VolumeName = "New Volume" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -108,8 +108,8 @@ public class BlindWrite5 : OpticalMediaImageTest Sectors = 243587, Md5 = "3dd5bd0f7d95a40d411761d69255567a", LongMd5 = "3dd5bd0f7d95a40d411761d69255567a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -198,7 +198,7 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -207,8 +207,8 @@ public class BlindWrite5 : OpticalMediaImageTest Sectors = 160956, Md5 = "4f5165069b3c5f11afe5f59711bd945d", LongMd5 = "fd30db9486f67654179c90c8a5052edb", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -225,15 +225,15 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 0, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 28672, ClusterSize = 2048, Type = "pcengine" } - } + ] }, new TrackInfoTestExpected { @@ -347,7 +347,7 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 0, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -356,8 +356,8 @@ public class BlindWrite5 : OpticalMediaImageTest Sectors = 246680, Md5 = "c1bc8de499756453d1387542bb32bb4d", LongMd5 = "455ec326506d2c5b974c4617c1010796", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -374,8 +374,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 0, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -384,7 +384,7 @@ public class BlindWrite5 : OpticalMediaImageTest Type = "pcfx", VolumeName = "同級生2" } - } + ] }, new TrackInfoTestExpected { @@ -434,7 +434,7 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -443,8 +443,8 @@ public class BlindWrite5 : OpticalMediaImageTest Sectors = 247073, Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -557,7 +557,7 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -567,8 +567,8 @@ public class BlindWrite5 : OpticalMediaImageTest Md5 = "65e79ef740833188a0f5be19da14c09d", LongMd5 = "47b32c32a6427ad1e6b4b1bd047df716", SubchannelMd5 = "f2246afbf3dfbcad5acd2c85134b568e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -577,8 +577,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -593,9 +593,9 @@ public class BlindWrite5 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -605,8 +605,8 @@ public class BlindWrite5 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "7a01c3f2fe95664ef5726b3ad9597282", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -615,8 +615,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -631,9 +631,9 @@ public class BlindWrite5 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -643,8 +643,8 @@ public class BlindWrite5 : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "6da685990c9b366bf49d556dc3e1db08", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -653,8 +653,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -663,9 +663,9 @@ public class BlindWrite5 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -674,8 +674,8 @@ public class BlindWrite5 : OpticalMediaImageTest Sectors = 277696, Md5 = "7c8fc7bb768cff15d702ac8cd10108d7", LongMd5 = "7c8fc7bb768cff15d702ac8cd10108d7", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -764,7 +764,7 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 0, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -774,8 +774,8 @@ public class BlindWrite5 : OpticalMediaImageTest Md5 = "3736dbfcb7bf5648e3ac067379087001", LongMd5 = "c2dfd5a32678c3ff049c143c98ad36a5", SubchannelMd5 = "f486c17d8b43d802e8f00637d4b27de1", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -800,8 +800,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 18853, @@ -809,9 +809,9 @@ public class BlindWrite5 : OpticalMediaImageTest Type = "iso9660", VolumeName = "New" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -821,8 +821,8 @@ public class BlindWrite5 : OpticalMediaImageTest Md5 = "901e4fe17ea6591b1fd53ba822428ef4", LongMd5 = "7b489457540c40037aabcf3f21e0201e", SubchannelMd5 = "51f7e060a5d85539bfea0fd7aa3ee107", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -831,8 +831,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 7, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 600, @@ -848,9 +848,9 @@ public class BlindWrite5 : OpticalMediaImageTest VolumeName = "InCD", VolumeSerial = "40888C15CA13D401InCD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -859,8 +859,8 @@ public class BlindWrite5 : OpticalMediaImageTest Sectors = 65536, Md5 = "1b13a8f8aeb23f0b8bbc68518217e771", LongMd5 = "1b13a8f8aeb23f0b8bbc68518217e771", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -901,7 +901,7 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 0, Flags = 1 } - } + ] }, new OpticalImageTestExpected { @@ -911,8 +911,8 @@ public class BlindWrite5 : OpticalMediaImageTest Md5 = "e2e19cf38891e67a0829d01842b4052e", LongMd5 = "3e646a04eb29a8e0ad892b6ac00ba962", SubchannelMd5 = "94c9b99c0ca454bbbb399da2b7e4c86d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -921,8 +921,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 7876, @@ -938,7 +938,7 @@ public class BlindWrite5 : OpticalMediaImageTest VolumeName = "Session 1", VolumeSerial = "50958B61AF6A749E" } - } + ] }, new TrackInfoTestExpected { @@ -948,8 +948,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 6170, @@ -965,7 +965,7 @@ public class BlindWrite5 : OpticalMediaImageTest VolumeName = "Session 2", VolumeSerial = "50958BBBAF6A7444" } - } + ] }, new TrackInfoTestExpected { @@ -975,8 +975,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 5360, @@ -992,7 +992,7 @@ public class BlindWrite5 : OpticalMediaImageTest VolumeName = "Session 3", VolumeSerial = "50958C19AF6A73E6" } - } + ] }, new TrackInfoTestExpected { @@ -1002,8 +1002,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 4, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 45796, @@ -1019,9 +1019,9 @@ public class BlindWrite5 : OpticalMediaImageTest VolumeName = "Session 4", VolumeSerial = "50958C82AF6A737D" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1031,8 +1031,8 @@ public class BlindWrite5 : OpticalMediaImageTest Md5 = "203a40d27b9bee018705c2df8d15e96d", LongMd5 = "a686cade367db0a12fef1d9862f39e1d", SubchannelMd5 = "177b666c1fb45c85f5a2bfe690046802", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1041,8 +1041,8 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -1050,7 +1050,7 @@ public class BlindWrite5 : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -1060,7 +1060,7 @@ public class BlindWrite5 : OpticalMediaImageTest Pregap = 0, Flags = 4 } - } + ] }, #region These test images violate the specifications and are not expected to work yet diff --git a/Aaru.Tests/Images/BlindWrite6.cs b/Aaru.Tests/Images/BlindWrite6.cs index d132319cd..f2649ffd1 100644 --- a/Aaru.Tests/Images/BlindWrite6.cs +++ b/Aaru.Tests/Images/BlindWrite6.cs @@ -39,8 +39,8 @@ public class BlindWrite6 : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "BlindWrite 6"); public override IMediaImage Plugin => new Aaru.Images.BlindWrite5(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "dvdrom.B6T", @@ -48,8 +48,8 @@ public class BlindWrite6 : OpticalMediaImageTest Sectors = 2287072, Md5 = "7272cae103a922910a09fdb6a6841dff", LongMd5 = "7272cae103a922910a09fdb6a6841dff", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -57,8 +57,8 @@ public class BlindWrite6 : OpticalMediaImageTest End = 2287071, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 2287072, @@ -66,9 +66,9 @@ public class BlindWrite6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "GuiaRaw" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -77,8 +77,8 @@ public class BlindWrite6 : OpticalMediaImageTest Sectors = 243587, Md5 = "3dd5bd0f7d95a40d411761d69255567a", LongMd5 = "3dd5bd0f7d95a40d411761d69255567a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -167,7 +167,7 @@ public class BlindWrite6 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -176,8 +176,8 @@ public class BlindWrite6 : OpticalMediaImageTest Sectors = 160956, Md5 = "4f5165069b3c5f11afe5f59711bd945d", LongMd5 = "fd30db9486f67654179c90c8a5052edb", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -194,15 +194,15 @@ public class BlindWrite6 : OpticalMediaImageTest Pregap = 0, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 28672, ClusterSize = 2048, Type = "pcengine" } - } + ] }, new TrackInfoTestExpected { @@ -316,7 +316,7 @@ public class BlindWrite6 : OpticalMediaImageTest Pregap = 0, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -325,8 +325,8 @@ public class BlindWrite6 : OpticalMediaImageTest Sectors = 246680, Md5 = "c1bc8de499756453d1387542bb32bb4d", LongMd5 = "455ec326506d2c5b974c4617c1010796", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -343,8 +343,8 @@ public class BlindWrite6 : OpticalMediaImageTest Pregap = 0, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -353,7 +353,7 @@ public class BlindWrite6 : OpticalMediaImageTest Type = "pcfx", VolumeName = "同級生2" } - } + ] }, new TrackInfoTestExpected { @@ -403,7 +403,7 @@ public class BlindWrite6 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -413,8 +413,8 @@ public class BlindWrite6 : OpticalMediaImageTest Md5 = "63c99a087570b8936bb55156f5502f38", LongMd5 = "368c06d4b42ed581f3ad7f6ad57f70f6", SubchannelMd5 = "9c231e680e601cd10bb61fb519f00c84", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -423,8 +423,8 @@ public class BlindWrite6 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -439,9 +439,9 @@ public class BlindWrite6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -451,8 +451,8 @@ public class BlindWrite6 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "46b6244ed63434cb0f91e0610c63fec8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -461,8 +461,8 @@ public class BlindWrite6 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -477,9 +477,9 @@ public class BlindWrite6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -489,8 +489,8 @@ public class BlindWrite6 : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "19f74cd5f05894203465374111be2aa7", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -499,8 +499,8 @@ public class BlindWrite6 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -509,9 +509,9 @@ public class BlindWrite6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -521,8 +521,8 @@ public class BlindWrite6 : OpticalMediaImageTest Md5 = "a34e29e42b60023a6ae59f37d2bd4bea", LongMd5 = "e981f7dfdb522ba937fe75474e23a446", SubchannelMd5 = "485a233924c003a1ab2ea9228f582344", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -531,8 +531,8 @@ public class BlindWrite6 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -540,7 +540,7 @@ public class BlindWrite6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -662,7 +662,7 @@ public class BlindWrite6 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/BlindWrite7.cs b/Aaru.Tests/Images/BlindWrite7.cs index b92867d92..621686cd5 100644 --- a/Aaru.Tests/Images/BlindWrite7.cs +++ b/Aaru.Tests/Images/BlindWrite7.cs @@ -39,8 +39,8 @@ public class BlindWrite7 : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "BlindWrite 7"); public override IMediaImage Plugin => new Aaru.Images.BlindWrite5(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "report_cdr.B6T", @@ -49,8 +49,8 @@ public class BlindWrite7 : OpticalMediaImageTest SectorSize = 2048, Md5 = "86b8a763ef6522fccf97f743d7bf4fa3", LongMd5 = "a292359cce05849dec1d06ae471ecf9e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -59,8 +59,8 @@ public class BlindWrite7 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -75,9 +75,9 @@ public class BlindWrite7 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -87,8 +87,8 @@ public class BlindWrite7 : OpticalMediaImageTest SectorSize = 2048, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -97,8 +97,8 @@ public class BlindWrite7 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -113,9 +113,9 @@ public class BlindWrite7 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -125,8 +125,8 @@ public class BlindWrite7 : OpticalMediaImageTest SectorSize = 2048, Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -135,8 +135,8 @@ public class BlindWrite7 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -145,9 +145,9 @@ public class BlindWrite7 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/CDRWin.cs b/Aaru.Tests/Images/CDRWin.cs index eaa856622..bb5fabbe2 100644 --- a/Aaru.Tests/Images/CDRWin.cs +++ b/Aaru.Tests/Images/CDRWin.cs @@ -42,8 +42,8 @@ public class CDRWin : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "CDRWin"); public override IMediaImage Plugin => new CdrWin(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "pcengine.cue", @@ -51,8 +51,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 160956, Md5 = "875ea735f0d10d6fa321fb222714117b", LongMd5 = "0188cf74fdc367a8e370bbe236a5100c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -69,15 +69,15 @@ public class CDRWin : OpticalMediaImageTest Pregap = 225, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 34816, ClusterSize = 2048, Type = "pcengine" } - } + ] }, new TrackInfoTestExpected { @@ -191,17 +191,17 @@ public class CDRWin : OpticalMediaImageTest Pregap = 225, Flags = 4, Number = 16, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 32768, ClusterSize = 2048, Type = "pcengine" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -210,8 +210,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 246680, Md5 = "d2fbcb46735a5ac90c10f81ca564c9dd", LongMd5 = "f10ae52c1a530ba3ed49447417d9451e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -228,8 +228,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 225, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -238,7 +238,7 @@ public class CDRWin : OpticalMediaImageTest Type = "pcfx", VolumeName = "同級生2" } - } + ] }, new TrackInfoTestExpected { @@ -288,7 +288,7 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -297,8 +297,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 247073, Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -411,7 +411,7 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -420,8 +420,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 254265, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -430,8 +430,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -446,9 +446,9 @@ public class CDRWin : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -457,8 +457,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 308224, Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -467,8 +467,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -477,9 +477,9 @@ public class CDRWin : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -488,8 +488,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 277696, Md5 = "7c8fc7bb768cff15d702ac8cd10108d7", LongMd5 = "7c8fc7bb768cff15d702ac8cd10108d7", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -578,7 +578,7 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -587,8 +587,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 350134, Md5 = "13d4c3def37e968b2ddc5cf5a9f18fdc", LongMd5 = "31e772f6997eb8dbf3ecf9aca9ea6bc6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -597,8 +597,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 7, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 600, @@ -614,9 +614,9 @@ public class CDRWin : OpticalMediaImageTest VolumeName = "InCD", VolumeSerial = "40888C15CA13D401InCD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -625,8 +625,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 329158, Md5 = "397d93a649a2a502cf831b49771a2c35", LongMd5 = "c92ec0c7671b1b992d94a726ea10a238", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -635,8 +635,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -644,7 +644,7 @@ public class CDRWin : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -766,7 +766,7 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -775,8 +775,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 65536, Md5 = "1b13a8f8aeb23f0b8bbc68518217e771", LongMd5 = "1b13a8f8aeb23f0b8bbc68518217e771", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -817,7 +817,7 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 1 } - } + ] }, new OpticalImageTestExpected { @@ -826,8 +826,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 48794, Md5 = "0d80890beeadf3f6e2cf2f88d0067afe", LongMd5 = "96ac6c364e4c3cb2f043197a45a97183", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -836,8 +836,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -845,7 +845,7 @@ public class CDRWin : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -855,7 +855,7 @@ public class CDRWin : OpticalMediaImageTest Pregap = 0, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -865,8 +865,8 @@ public class CDRWin : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "1d0e4118993a75311fe774e46326306a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -979,7 +979,7 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -989,8 +989,8 @@ public class CDRWin : OpticalMediaImageTest Md5 = "be1bdbd55883dd53397ea21715107706", LongMd5 = "3d3a8e2243f40201c6bdc5c10a65bb76", SubchannelMd5 = "f9794c8d8ab2c7bf7815e740a77b12f4", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -999,8 +999,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -1008,7 +1008,7 @@ public class CDRWin : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -1130,7 +1130,7 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1140,8 +1140,8 @@ public class CDRWin : OpticalMediaImageTest Md5 = "215c0b3efab1b04e4f2d35b323cdbc96", LongMd5 = "296cfef5de90e1cfadaf2ecf41f2e184", SubchannelMd5 = "536ebf5b21280a721dc0604739ca7db3", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1150,8 +1150,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -1159,7 +1159,7 @@ public class CDRWin : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -1281,7 +1281,7 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1290,8 +1290,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 254265, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1300,8 +1300,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -1316,9 +1316,9 @@ public class CDRWin : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1327,8 +1327,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 308224, Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1337,8 +1337,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -1347,9 +1347,9 @@ public class CDRWin : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1358,8 +1358,8 @@ public class CDRWin : OpticalMediaImageTest Sectors = 329158, Md5 = "bb1ace550c0a22f18c32bd053739d6ce", LongMd5 = "857b80195d1e29bd0bace2ef20b733ed", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1368,8 +1368,8 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -1377,7 +1377,7 @@ public class CDRWin : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -1499,7 +1499,7 @@ public class CDRWin : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/CDRWin10.cs b/Aaru.Tests/Images/CDRWin10.cs index 8e22dc7c5..d33923296 100644 --- a/Aaru.Tests/Images/CDRWin10.cs +++ b/Aaru.Tests/Images/CDRWin10.cs @@ -41,8 +41,8 @@ public class CDRWin10 : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "CDRWin 10"); public override IMediaImage Plugin => new Aaru.Images.Alcohol120(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "report_audiocd.xmd", @@ -51,8 +51,8 @@ public class CDRWin10 : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "d4075209391c6955f438d0fa6095c6e2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -165,7 +165,7 @@ public class CDRWin10 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -175,8 +175,8 @@ public class CDRWin10 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "811058470f33be5988ea1c2627200039", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -185,8 +185,8 @@ public class CDRWin10 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -201,9 +201,9 @@ public class CDRWin10 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -213,8 +213,8 @@ public class CDRWin10 : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "6d0cd8e56dada05a86a4abd10f77e054", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -223,8 +223,8 @@ public class CDRWin10 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -233,9 +233,9 @@ public class CDRWin10 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -245,8 +245,8 @@ public class CDRWin10 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "d814823071e3671fbf204e5bf063f432", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -255,8 +255,8 @@ public class CDRWin10 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -271,9 +271,9 @@ public class CDRWin10 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -283,8 +283,8 @@ public class CDRWin10 : OpticalMediaImageTest Md5 = "557b9658671c16602e635f157b7525db", LongMd5 = "76454ac3a025857dc41e05c430783eab", SubchannelMd5 = "5a33440f5c51acff1921e92269978645", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -397,8 +397,8 @@ public class CDRWin10 : OpticalMediaImageTest Pregap = 0, Flags = 4, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -406,9 +406,9 @@ public class CDRWin10 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -418,8 +418,8 @@ public class CDRWin10 : OpticalMediaImageTest Md5 = "9a19aa0df066732a8ec34025e8160248", LongMd5 = "f4adafc5f2bdda2e4d70dce667cf47c1", SubchannelMd5 = "b349f26946197859f6a0ef5c3881b8ca", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -428,8 +428,8 @@ public class CDRWin10 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -437,7 +437,7 @@ public class CDRWin10 : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -559,7 +559,7 @@ public class CDRWin10 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/CPCDSK.cs b/Aaru.Tests/Images/CPCDSK.cs index bb676a0ba..66d100da6 100644 --- a/Aaru.Tests/Images/CPCDSK.cs +++ b/Aaru.Tests/Images/CPCDSK.cs @@ -42,8 +42,8 @@ public class CPCDSK : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "CPCDSK"); public override IMediaImage Plugin => new Cpcdsk(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "3D Construction Kit (1991)(Domark)(Disk 1 of 2)[a].dsk.lz", @@ -51,14 +51,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "ee601c0d2beade20bb5c04b3f5800ff6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -67,14 +67,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "ee601c0d2beade20bb5c04b3f5800ff6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -83,14 +83,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "dcb039b3b2ff2d6bdef8bf6c13ef3f83", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -99,14 +99,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "dcb039b3b2ff2d6bdef8bf6c13ef3f83", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, /* TODO: Does not open new BlockImageTestExpected @@ -124,14 +124,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 387, SectorSize = 512, Md5 = "82007217a3aa6bb91468b71a6dc4bfe5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 387 } - } + ] }, new BlockImageTestExpected { @@ -140,14 +140,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "acd60bb0119e0b5aa1790bef344211ac", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -156,14 +156,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "0330956c2fe38f278d7cba6f7bd8aa2d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -180,14 +180,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "5dc0d482a773043d8683a84c8220df95", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -196,14 +196,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "64edd62fabb381ef49bf3a8f43435824", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -212,14 +212,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "b381bbc72ab664d658ddd5898c7ff266", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -228,14 +228,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "ad43345ac469844465da6d73369cc6b1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -244,14 +244,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "6e4ab38fcc5dc2d8173173dcbf8ca2e1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -268,14 +268,14 @@ public class CPCDSK : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "17b79ecfd045d1d5d3526b182b32064a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/CisCopy/Uncompressed.cs b/Aaru.Tests/Images/CisCopy/Uncompressed.cs index 3f69c989a..9ffd56b23 100644 --- a/Aaru.Tests/Images/CisCopy/Uncompressed.cs +++ b/Aaru.Tests/Images/CisCopy/Uncompressed.cs @@ -40,8 +40,8 @@ public class Uncompressed : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "CisCopy"); public override IMediaImage Plugin => new Aaru.Images.CisCopy(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "md1dd8_all.dcf.lz", @@ -49,14 +49,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "95c0b76419c1c74db6dbe1d790f97dde", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -65,14 +65,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "95c0b76419c1c74db6dbe1d790f97dde", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -81,14 +81,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "6f6507e416b7320d583dc347b8e57844", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -97,14 +97,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "48b93e8619c4c13f4a3724b550e4b371", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -113,14 +113,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "48b93e8619c4c13f4a3724b550e4b371", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -129,14 +129,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "1d060d2e2543e1c2e8569f5451660060", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -145,14 +145,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "0c93155bbc5e412f5014e037d08c2745", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -161,14 +161,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "0c93155bbc5e412f5014e037d08c2745", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -177,14 +177,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "0c93155bbc5e412f5014e037d08c2745", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, // TODO: False positive CP/M filesystem @@ -221,14 +221,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "181f3bc62f0b90f74af9d8027ebf7512", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -237,14 +237,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "181f3bc62f0b90f74af9d8027ebf7512", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -253,14 +253,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "181f3bc62f0b90f74af9d8027ebf7512", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -269,14 +269,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "783559ee5e774515d5e7d2feab9c333e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -285,14 +285,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "783559ee5e774515d5e7d2feab9c333e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -301,14 +301,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "783559ee5e774515d5e7d2feab9c333e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -317,14 +317,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "91f3fde8d56a536cdda4c6758e5dbc93", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -333,14 +333,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "91f3fde8d56a536cdda4c6758e5dbc93", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -349,14 +349,14 @@ public class Uncompressed : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "91f3fde8d56a536cdda4c6758e5dbc93", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/CloneCD.cs b/Aaru.Tests/Images/CloneCD.cs index e40cb434e..8722de031 100644 --- a/Aaru.Tests/Images/CloneCD.cs +++ b/Aaru.Tests/Images/CloneCD.cs @@ -52,8 +52,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "a9412931e69111ba162d5d8b4822ac3f", LongMd5 = "a9412931e69111ba162d5d8b4822ac3f", SubchannelMd5 = "96f314754e66d95133308d5bb8573536", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -230,7 +230,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -240,8 +240,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "530a6d7a9ce9b60f8c727d2db0f6039e", LongMd5 = "530a6d7a9ce9b60f8c727d2db0f6039e", SubchannelMd5 = "47d4397c640734f5f85fe0c843e480f8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -330,7 +330,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -340,8 +340,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "127b0a92b00ea9a67df1ed8c80daadc7", LongMd5 = "6ead3bdedb374f7b9bdf24773d30e491", SubchannelMd5 = "315ee5ebb36969b4ce0fb0162f7a9932", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -358,15 +358,15 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 28672, ClusterSize = 2048, Type = "pcengine" } - } + ] }, new TrackInfoTestExpected { @@ -480,7 +480,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -490,8 +490,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "9d538bd1ee1db068685ed59d29185941", LongMd5 = "76f4bd63c13db3e44fbf7acda20f49e2", SubchannelMd5 = "d9804e5f919ffb1531832049df8f0165", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -508,8 +508,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -518,7 +518,7 @@ public class CloneCD : OpticalMediaImageTest Type = "pcfx", VolumeName = "同級生2" } - } + ] }, new TrackInfoTestExpected { @@ -568,7 +568,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -578,8 +578,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "b744ddaf1d4ebd3bd0b96a160f55637d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -692,7 +692,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -702,8 +702,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "c5ae648d586e55afd1108294c9b86ca6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -712,8 +712,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -728,9 +728,9 @@ public class CloneCD : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -740,8 +740,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "c73559a91abd57f732c7ea609fef547a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -750,8 +750,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -760,9 +760,9 @@ public class CloneCD : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -772,8 +772,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "97e5bf1caf3998e818d40cd845c6ecc9", LongMd5 = "07b4d88c8f38cc0168a2f5725b31c52e", SubchannelMd5 = "a71264ddd9d364a4b1cd0ee4d4a7e1ad", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -886,8 +886,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -895,9 +895,9 @@ public class CloneCD : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -907,8 +907,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "7c8fc7bb768cff15d702ac8cd10108d7", LongMd5 = "7c8fc7bb768cff15d702ac8cd10108d7", SubchannelMd5 = "2a2918ad19f5bf1b6e52b57e40fe47eb", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -997,7 +997,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -1007,8 +1007,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "0ddda63b1cb61f8f961eabfa90737171", LongMd5 = "666ec8a1213cf4f6adc4675d9dd5955a", SubchannelMd5 = "d6184c3ac1966e61c528ae875627e65c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1033,8 +1033,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 18853, @@ -1042,9 +1042,9 @@ public class CloneCD : OpticalMediaImageTest Type = "iso9660", VolumeName = "New" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1054,8 +1054,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "f95d6f978ddb4f98bbffda403f627fe1", LongMd5 = "6751e0ae7821f92221672b1cd5a1ff36", SubchannelMd5 = "569c87cdc115f2d02b2268fc2b4d8b11", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1064,8 +1064,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 7, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 600, @@ -1081,9 +1081,9 @@ public class CloneCD : OpticalMediaImageTest VolumeName = "InCD", VolumeSerial = "40888C15CA13D401InCD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1093,8 +1093,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "9a19aa0df066732a8ec34025e8160248", LongMd5 = "e981f7dfdb522ba937fe75474e23a446", SubchannelMd5 = "c48c09b8c7c4af99de1cf97faaef32fc", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1103,8 +1103,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -1112,7 +1112,7 @@ public class CloneCD : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -1234,7 +1234,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1244,8 +1244,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "1b13a8f8aeb23f0b8bbc68518217e771", LongMd5 = "1b13a8f8aeb23f0b8bbc68518217e771", SubchannelMd5 = "d374e82dfcbc4515c09a9a6e5955bf1d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1286,7 +1286,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 1 } - } + ] }, new OpticalImageTestExpected { @@ -1296,8 +1296,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "236f95016ad395ba691517d35a05b767", LongMd5 = "8c48c8951229fd083c1aafcb3e062f2b", SubchannelMd5 = "a49b0b2dcebcc4a106524cb7f0f3c331", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1306,8 +1306,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 7876, @@ -1323,7 +1323,7 @@ public class CloneCD : OpticalMediaImageTest VolumeName = "Session 1", VolumeSerial = "50958B61AF6A749E" } - } + ] }, new TrackInfoTestExpected { @@ -1333,8 +1333,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 6170, @@ -1350,7 +1350,7 @@ public class CloneCD : OpticalMediaImageTest VolumeName = "Session 2", VolumeSerial = "50958BBBAF6A7444" } - } + ] }, new TrackInfoTestExpected { @@ -1360,8 +1360,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 5360, @@ -1377,7 +1377,7 @@ public class CloneCD : OpticalMediaImageTest VolumeName = "Session 3", VolumeSerial = "50958C19AF6A73E6" } - } + ] }, new TrackInfoTestExpected { @@ -1387,7 +1387,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1397,8 +1397,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "b640eed2eba209ebba4e6cd3171883a4", LongMd5 = "a1194d29dfb4e207eabf6208f908a213", SubchannelMd5 = "712725733e44be46e55f16569659fd07", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1407,8 +1407,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -1416,7 +1416,7 @@ public class CloneCD : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -1426,7 +1426,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 4 } - } + ] }, #region These test images violate the specifications and are not expected to work yet diff --git a/Aaru.Tests/Images/Commodore64/D64.cs b/Aaru.Tests/Images/Commodore64/D64.cs index 662f33857..416a74c5e 100644 --- a/Aaru.Tests/Images/Commodore64/D64.cs +++ b/Aaru.Tests/Images/Commodore64/D64.cs @@ -40,8 +40,8 @@ public class D64 : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "Commodore D64"); public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "0 Grad Nord (1985)(Ariolasoft)(de)(Side A).d64.lz", @@ -50,5 +50,5 @@ public class D64 : BlockMediaImageTest SectorSize = 256, Md5 = "9205f7ccdb19cfbdb0b46d10e40b2a90" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/Commodore64/D81.cs b/Aaru.Tests/Images/Commodore64/D81.cs index 3c9cec0aa..615c73a0b 100644 --- a/Aaru.Tests/Images/Commodore64/D81.cs +++ b/Aaru.Tests/Images/Commodore64/D81.cs @@ -40,8 +40,8 @@ public class D81 : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "Commodore D81"); public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "Strategiegames #01 (19xx)(-).d81.lz", @@ -50,5 +50,5 @@ public class D81 : BlockMediaImageTest SectorSize = 256, Md5 = "e84d86b63e798747c42b27b58ab88665" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/CopyQM.cs b/Aaru.Tests/Images/CopyQM.cs index 85b5accac..0b32e975d 100644 --- a/Aaru.Tests/Images/CopyQM.cs +++ b/Aaru.Tests/Images/CopyQM.cs @@ -39,8 +39,8 @@ public class CopyQm : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "CopyQM"); public override IMediaImage Plugin => new Aaru.Images.CopyQm(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DSKA0000.CQM.lz", @@ -96,14 +96,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "95ea232f59e44db374b994cfe7f1c07f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -192,14 +192,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2302991363cb3681cffdc4388915b51e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -248,14 +248,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "af83d011608042d35021e39aa5e10b2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -296,14 +296,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "6642c1a32d2c58e93481d664974fc202", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -312,14 +312,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "846f01b8b60cb3c775bd66419e977926", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -328,14 +328,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "5101f89850dc28efbcfb7622086a9ddf", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -344,14 +344,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "8e570be2ed1f00ddea82e50a2d9c446a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -360,14 +360,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "abba2a1ddd60a649047a9c44d94bbeae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -376,14 +376,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "e3bc48bec81be5b35be73d41fdffd2ab", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -392,14 +392,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "43b5068af9d016d1432eb2e12d2b802a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -408,14 +408,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "5bf2ad4dc300592604b6e32f8b8e2656", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -424,14 +424,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "cb9a832ca6a4097b8ccc30d2108e1f7d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -440,14 +440,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "56d181a6bb8713e6b2854fe8887faab6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -456,14 +456,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "41aef7cff26aefda1add8d49c5b962c2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -472,14 +472,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2460, SectorSize = 512, Md5 = "2437c5f089f1cba3866b36360b016f16", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2460 } - } + ] }, new BlockImageTestExpected { @@ -488,14 +488,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1280, SectorSize = 512, Md5 = "bdaa8f17373b265830fdf3a06b794367", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1280 } - } + ] }, new BlockImageTestExpected { @@ -504,14 +504,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "629932c285478d0540ff7936aa008351", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -520,14 +520,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1476, SectorSize = 512, Md5 = "7a2abef5d4701e2e49abb05af8d4da50", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1476 } - } + ] }, new BlockImageTestExpected { @@ -536,14 +536,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "e3507522c914264f44fb2c92c3170c09", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -552,14 +552,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "824fe65dbb1a42b6b94f05405ef984f2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -568,14 +568,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "1a8c2e78e7132cf9ba5d6c2b75876be0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -584,14 +584,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "936b20bb0966fe693b4d5e2353e24846", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -600,14 +600,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "803b01a0b440c2837d37c21308f30cd5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -616,14 +616,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "aa0d31f914760cc4cde75479779ebed6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -632,14 +632,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "31269ed6464302ae26d22b7c87bceb23", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -648,14 +648,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "5e413433c54f48978d281c6e66d1106e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -664,14 +664,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "4fc28b0128543b2eb70f6432c4c8a980", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -680,14 +680,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3528, SectorSize = 512, Md5 = "24a7459d080cea3a60d131b8fd7dc5d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3528 } - } + ] }, new BlockImageTestExpected { @@ -696,14 +696,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3570, SectorSize = 512, Md5 = "2031b1e16ee2defc0d15f732f633df33", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3570 } - } + ] }, new BlockImageTestExpected { @@ -712,14 +712,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "5fc19ca552b6db957061e9a1750394d2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -736,14 +736,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "a33b46f042b78fe3d0b3c5dbb3908a93", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -752,14 +752,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "565d3c001cbb532154aa5d3c65b2439c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -768,14 +768,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "e60442c3ebd72c99bdd7545fdba59613", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -784,14 +784,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "058a33a129539285c9b64010496af52f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -800,14 +800,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "0726ecbc38965d30a6222c3e74cd1aa3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -824,14 +824,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c38d69ac88520f14fcc6d6ced22b065d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -840,14 +840,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "91d51964e1e64ef3f6f622fa19aa833c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -856,14 +856,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "db36d9651c952ff679ec33223c8db2d3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -872,14 +872,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2988, SectorSize = 512, Md5 = "5f1d98806309aee7f81de72e51e6d386", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2988 } - } + ] }, new BlockImageTestExpected { @@ -888,14 +888,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "1207a1cc7ff73d4f74c8984b4e7db33f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -904,14 +904,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "c97a3081fd25474b6b7945b8572d5ab8", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -920,14 +920,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 400, SectorSize = 512, Md5 = "d40a99cb549fcfb26fcf9ef01b5dfca7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 400 } - } + ] }, new BlockImageTestExpected { @@ -936,14 +936,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 410, SectorSize = 512, Md5 = "7b41dd9ca7eb32828960eb1417a6092a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 410 } - } + ] }, new BlockImageTestExpected { @@ -952,14 +952,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "126dfd25363c076727dfaab03955c931", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -968,14 +968,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 820, SectorSize = 512, Md5 = "e6492aac144f5f6f593b84c64680cf64", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 820 } - } + ] }, new BlockImageTestExpected { @@ -984,14 +984,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "7973e569ed93beb1ece2e84a5ef3a8d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1000,14 +1000,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a793047503af08e83361427b3e2806e0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1016,14 +1016,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "f01541de322c8d6d7321084d7a245e7b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1032,14 +1032,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "ba6ec1652ff41bcc687aaf9c4e32dc18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -1048,14 +1048,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "7973e569ed93beb1ece2e84a5ef3a8d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1064,14 +1064,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a793047503af08e83361427b3e2806e0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1080,14 +1080,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "ba6ec1652ff41bcc687aaf9c4e32dc18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -1096,14 +1096,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "6631b66fdfd89319323771c41334c7ba", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1112,14 +1112,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "56471a253f4d6803b634e2bbff6c0931", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -1128,14 +1128,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "7d36aee5a3071ff75b979f3acb649c40", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -1144,14 +1144,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "0ccb62039363ab544c69eca229a17fae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -1160,14 +1160,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "7851d31fad9302ff45d3ded4fba25387", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -1176,14 +1176,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "915b08c82591e8488320e001b7303b6d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1192,14 +1192,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "5e5ea6fe9adf842221fdc60e56630405", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -1208,14 +1208,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "a22e254f7e3526ec30dc4915a19fcb52", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1224,14 +1224,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ddc6c1200c60e9f7796280f50c2e5283", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1312,14 +1312,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "be05d1ff10ef8b2220546c4db962ac9e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1328,14 +1328,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 820, SectorSize = 512, Md5 = "32823b9009c99b6711e89336ad03ec7f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 820 } - } + ] }, new BlockImageTestExpected { @@ -1344,14 +1344,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "1c8b03a8550ed3e70e1c78316aa445aa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1368,14 +1368,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "0bdf9130c07bb5d558a4705249f949d0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -1384,14 +1384,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2dafeddaa99e7dc0db5ef69e128f9c8e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1400,14 +1400,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "028769dc0abefab1740cc309432588b6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1416,14 +1416,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "152023525154b45ab26687190bac94db", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1432,14 +1432,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "db38ecd93f28dd065927fed21917eed5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1448,14 +1448,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "f206c0caa4e0eda37233ab6e89ab5493", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1464,14 +1464,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "554492a7b41f4cd9068a3a2b70eb0e5f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1736,14 +1736,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "87a432496cb23b5c2299545500df3553", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -1832,14 +1832,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "5dc0d482a773043d8683a84c8220df95", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -1848,14 +1848,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "855943f9caecdcce9b06f0098d773c6b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -1864,14 +1864,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "5ac0a9fc7337f761098f816359b0f6f7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1880,14 +1880,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "1ea6ec8e663218b1372048f6e25795b5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1896,14 +1896,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "77a1167b1b9043496e32b8578cde0ff0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1912,14 +1912,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "4b07d760d65f3f0f8ffa5f2b81cee907", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -1928,14 +1928,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "32c044c5c2b0bd13806149a759c14935", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1944,14 +1944,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3040, SectorSize = 512, Md5 = "8752095abc13dba3f3467669da333891", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3040 } - } + ] }, new BlockImageTestExpected { @@ -1960,14 +1960,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "aece7cd34bbba3e75307fa70404d9d30", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1976,14 +1976,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "5289afb16a6e4a33213e3bcca56c6230", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -1992,14 +1992,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3320, SectorSize = 512, Md5 = "1aef0a0ba233476db6567878c3c2b266", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3320 } - } + ] }, new BlockImageTestExpected { @@ -2008,14 +2008,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "b96596711f4d2ee85dfda0fe3b9f26c3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2024,14 +2024,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "a4f461af7fda5e93a7ab63fcbb7e7683", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -2040,14 +2040,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "8f7f7099d4475f6631fcf0a79b031d61", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -2056,14 +2056,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "4feeaf4b4ee5dad85db727fbbda4b6d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -2072,14 +2072,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 400, SectorSize = 512, Md5 = "3c77ca681df78e4cd7baa162aa9b0859", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 400 } - } + ] }, new BlockImageTestExpected { @@ -2088,14 +2088,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "51da1f86c49657ffdb367bb2ddeb7990", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -2122,14 +2122,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "f76f92dd326c99c5efad5ee58daf72e1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -2138,14 +2138,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "b6f2c10e42908e334025bc4ffd81e771", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -2154,14 +2154,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "f2f409ea2a62a7866fd2777cc4fc9739", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2170,14 +2170,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1494, SectorSize = 512, Md5 = "3e441d69cec5c3169274e1379de4af4b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1494 } - } + ] }, new BlockImageTestExpected { @@ -2186,14 +2186,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "30a93f30dd4485c6fc037fe0775d3fc7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2202,14 +2202,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "e0caf02cce5597c98313bcc480366ec7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2218,14 +2218,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "4af4904d2b3c815da7bef7049209f5eb", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -2234,14 +2234,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "39bf5a98bcb2185d855ac06378febcfa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -2250,14 +2250,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "dc20055b6e6fd6f8e1114d4be2effeed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -2266,14 +2266,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "56af9256cf71d5aac5fd5d363674bc49", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -2282,14 +2282,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "bbba1e2d1418e05c3a4e7b4d585d160b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -2298,14 +2298,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "bca3a045e81617f7f5ebb5a8818eac47", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -2314,14 +2314,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "a296663cb8e75e94603221352f29cfff", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2330,14 +2330,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ecda36ebf0e1100233cb0ec722c18583", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2346,14 +2346,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "cef2f4fe9b1a32d5c0544f814e634264", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -2362,14 +2362,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "bbe58e26b8f8f822cd3edfd37a4e4924", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2378,14 +2378,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "b9b6ebdf711364c979de7cf70c3a438a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -2394,14 +2394,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "d37424f367f545acbb397f2bed766843", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2410,14 +2410,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "9963dd6f19ce6bd56eabeccdfbbd821a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2426,14 +2426,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "acf6604559ae8217f7869823e2429024", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2442,14 +2442,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "23bf2139cdfdc4c16db058fd31ea6481", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -2458,14 +2458,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "fa26adda0415f02057b113ad29c80c8d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2474,14 +2474,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "4f2a8d036fefd6c6c88d99eda3aa12b7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2490,14 +2490,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1386, SectorSize = 512, Md5 = "e794a3ffa4069ea999fdf7146710fa9e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1386 } - } + ] }, new BlockImageTestExpected { @@ -2506,14 +2506,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "de3f85896f771b7e5bc4c9e3926d64e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2522,14 +2522,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "c533488a21098a62c85f1649abda2803", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2538,14 +2538,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "1ff7649b679ba22ff20d39ff717dbec8", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2554,14 +2554,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "b4a602f67903c46eef62addb0780aa56", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2570,14 +2570,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "b4a602f67903c46eef62addb0780aa56", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2586,14 +2586,14 @@ public class CopyQm : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "03c2af6a8ebf4bd6f530335de34ae5dd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2603,5 +2603,5 @@ public class CopyQm : BlockMediaImageTest SectorSize = 512, Md5 = "1a9f2eeb3cbeeb057b9a9a5c6e9b0cc6" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/CopyTape.cs b/Aaru.Tests/Images/CopyTape.cs index 56b6c35a7..b473c50ae 100644 --- a/Aaru.Tests/Images/CopyTape.cs +++ b/Aaru.Tests/Images/CopyTape.cs @@ -40,8 +40,8 @@ public class CopyTape : TapeMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "copytape"); public override IMediaImage Plugin => new Aaru.Images.CopyTape(); - public override TapeImageTestExpected[] Tests => new[] - { + public override TapeImageTestExpected[] Tests => + [ new TapeImageTestExpected { TestFile = "Nonstop-UX System V Release 4 B32 (Boot Tape).cptp.lz", @@ -49,17 +49,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 1604, SectorSize = 10240, Md5 = "a6334d975523b3422fea522b0cc118a9", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 1603, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -67,7 +67,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 1603, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -76,17 +76,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 15485, SectorSize = 512, Md5 = "17ef78d9e5c53b976f530d4ca44223fd", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 15484, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -94,7 +94,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 15484, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -103,17 +103,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 15, SectorSize = 32256, Md5 = "76c0ae10f4ec70ef8681b212f02a71c8", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 14, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -121,7 +121,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 14, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -130,17 +130,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 3298, SectorSize = 32256, Md5 = "e331c9d0ae7c25c81c6580bc9965e2d0", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 3297, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -148,7 +148,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 3297, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -157,17 +157,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 3152, SectorSize = 32256, Md5 = "018c37c40f8df91ab9b098d643c9ae6c", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 3151, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -175,7 +175,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 3151, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -184,17 +184,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 818, SectorSize = 32256, Md5 = "eb3ce36b2c3afeeec59e5b8ed802a393", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 817, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -202,7 +202,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 817, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -211,17 +211,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 7, SectorSize = 32256, Md5 = "b057656698a224187afb2bdbb8caf7f3", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 6, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -229,7 +229,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 6, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -238,17 +238,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 684, SectorSize = 32256, Md5 = "8e48e388e7094f3170065718ab618b53", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 683, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -256,7 +256,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 683, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -265,17 +265,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 73525, SectorSize = 1024, Md5 = "8861f8c06a2e93ca5a81d729ad3e1de1", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 73524, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -311,7 +311,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 73524, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -320,17 +320,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 290, SectorSize = 262144, Md5 = "bfc402b23af0cf1ad22d9fb2ea29b58f", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 289, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -366,7 +366,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 289, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -375,17 +375,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 37587, SectorSize = 8192, Md5 = "e4a3e2fe26c72ca025ac0c017ec73ee9", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 37586, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -617,7 +617,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 37586, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -626,17 +626,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 25046, SectorSize = 1024, Md5 = "e625c03d7493dc22fe49f91f731446e8", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 25045, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -679,7 +679,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 25045, Partition = 0 } - } + ] }, new TapeImageTestExpected { @@ -688,17 +688,17 @@ public class CopyTape : TapeMediaImageTest Sectors = 102, SectorSize = 262144, Md5 = "198464b1daf8e674debf8eda0fcbf016", - Partitions = new[] - { + Partitions = + [ new TapePartition { FirstBlock = 0, LastBlock = 101, Number = 0 } - }, - Files = new[] - { + ], + Files = + [ new TapeFile { File = 0, @@ -741,7 +741,7 @@ public class CopyTape : TapeMediaImageTest LastBlock = 101, Partition = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/D88.cs b/Aaru.Tests/Images/D88.cs index 30683a24d..499831336 100644 --- a/Aaru.Tests/Images/D88.cs +++ b/Aaru.Tests/Images/D88.cs @@ -39,8 +39,8 @@ public class D88 : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "D88"); public override IMediaImage Plugin => new Aaru.Images.D88(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "1942 (1987)(ASCII)(JP).d77.lz", @@ -128,14 +128,14 @@ public class D88 : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "be916f25847b9cfc9776d88cc150ae7e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -144,14 +144,14 @@ public class D88 : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "ccc7f98e216db35c2b7a08634a9f3e20", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -168,14 +168,14 @@ public class D88 : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "62f5be96a8b8ccab9ee4aebf557cfcf7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -192,14 +192,14 @@ public class D88 : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "1f73980e45a384bed331eaa33c9ef65b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -216,14 +216,14 @@ public class D88 : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "bb48546ced9c61462e1c89dca4987143", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -233,5 +233,5 @@ public class D88 : BlockMediaImageTest SectorSize = 256, Md5 = "c7df67f4e66dad658fe856d3c8b36c7a" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiscJuggler.cs b/Aaru.Tests/Images/DiscJuggler.cs index 07272b257..4c0f8ac19 100644 --- a/Aaru.Tests/Images/DiscJuggler.cs +++ b/Aaru.Tests/Images/DiscJuggler.cs @@ -49,8 +49,8 @@ public class DiscJuggler : OpticalMediaImageTest Md5 = "01de32dcb21ac62be269ddd3bc99ab3e", LongMd5 = "01de32dcb21ac62be269ddd3bc99ab3e", SubchannelMd5 = "214794f37c41d1e2727eba68efdd369d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -139,7 +139,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 149, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -149,8 +149,8 @@ public class DiscJuggler : OpticalMediaImageTest Md5 = "0c355a31a7a488ec387c4508c498d6c0", LongMd5 = "0c355a31a7a488ec387c4508c498d6c0", SubchannelMd5 = "ac79fa4b07a042bcdd033a3e0319a0ae", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -239,7 +239,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -248,8 +248,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 83063, Md5 = "9f1251feaed14a62326ab399b73342e3", LongMd5 = "8ae1725d36537af9395ece058992e2b3", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -258,7 +258,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -267,8 +267,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 83077, Md5 = "68d39977149d3062b41dba6c1ff475cf", LongMd5 = "382b5d7957ee7e19b0e9dd7db866e4c4", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -277,7 +277,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -286,8 +286,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 84896, Md5 = "5240b794f12174da73915e8c1f38b6a4", LongMd5 = "5240b794f12174da73915e8c1f38b6a4", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -295,7 +295,7 @@ public class DiscJuggler : OpticalMediaImageTest End = 84895, Pregap = 0 } - } + ] }, new OpticalImageTestExpected { @@ -304,8 +304,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 335666, Md5 = "ce5de948ef5d1fccd1c1664451b1ba10", LongMd5 = "fe4165656cc6023b999d9fbf05501b25", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -402,7 +402,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -411,8 +411,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 360909, Md5 = "a5eba1d1bfeae8d6eea6c8abfdf79be4", LongMd5 = "b981912374fe50f91c91085e31028886", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -509,7 +509,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -518,15 +518,15 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 86560, Md5 = "95388d443073217e7cc4cf6b0391ec7f", LongMd5 = "95388d443073217e7cc4cf6b0391ec7f", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, Start = 0, End = 86559 } - } + ] }, new OpticalImageTestExpected { @@ -535,8 +535,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 642, Md5 = "36477c851cd6184034c86cc61cdd0e60", LongMd5 = "1b11183918ed5a2295f89272e2fa5810", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -545,7 +545,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -554,8 +554,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 656, Md5 = "ea2e0354dccd3dfdca6242154f024b59", LongMd5 = "18c580f0621cabdd9fc81be6275c41f0", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -564,7 +564,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -574,8 +574,8 @@ public class DiscJuggler : OpticalMediaImageTest Md5 = "4fc2665cec77b289a68d35edbdd50730", LongMd5 = "afabe77571db99e29cf4e6854b6f523e", SubchannelMd5 = "c2026374c196855ee95f19de967f3ba1", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -592,15 +592,15 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 225, Flags = 0, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 28672, ClusterSize = 2048, Type = "pcengine" } - } + ] }, new TrackInfoTestExpected { @@ -714,7 +714,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 225, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -723,8 +723,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 246680, Md5 = "2e872a5cfa43959183677398ede15c08", LongMd5 = "a8939e0fd28ee0bd876101b218af3572", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -741,8 +741,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 0, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -751,7 +751,7 @@ public class DiscJuggler : OpticalMediaImageTest Type = "pcfx", VolumeName = "同級生2" } - } + ] }, new TrackInfoTestExpected { @@ -801,7 +801,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 0, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -811,8 +811,8 @@ public class DiscJuggler : OpticalMediaImageTest Md5 = "9f8abbb08746f86d7c3d0b1b22f1fcc2", LongMd5 = "9f8abbb08746f86d7c3d0b1b22f1fcc2", SubchannelMd5 = "1045e621183bf4c8a9d641f8a5767fec", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -925,7 +925,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -935,8 +935,8 @@ public class DiscJuggler : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "dc02efe9c59c0d0e72bb7d26d7f01bce", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -945,8 +945,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -961,9 +961,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -973,8 +973,8 @@ public class DiscJuggler : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "e0d121ac5c0e4e30a823ac445942feae", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -983,8 +983,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -999,9 +999,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1011,8 +1011,8 @@ public class DiscJuggler : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "82e9a16a532717d7b733258d674073c3", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1021,8 +1021,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -1031,9 +1031,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1042,8 +1042,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 1218961, Md5 = "b04c88635c5d493c250c289964018a7a", LongMd5 = "b04c88635c5d493c250c289964018a7a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1051,8 +1051,8 @@ public class DiscJuggler : OpticalMediaImageTest End = 1218960, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -1061,9 +1061,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1072,16 +1072,16 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 2236705, Md5 = "c0823b070513d02c9f272986f23e74e8", LongMd5 = "c0823b070513d02c9f272986f23e74e8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, Start = 0, End = 2236704, Pregap = 0, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -1090,9 +1090,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1101,8 +1101,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 2146368, Md5 = "106f141400355476b499213f36a363f9", LongMd5 = "106f141400355476b499213f36a363f9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1110,8 +1110,8 @@ public class DiscJuggler : OpticalMediaImageTest End = 2146367, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -1120,9 +1120,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1131,8 +1131,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 3455936, Md5 = "692148a01b4204160b088141fb52bd70", LongMd5 = "692148a01b4204160b088141fb52bd70", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1140,8 +1140,8 @@ public class DiscJuggler : OpticalMediaImageTest End = 3455935, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 3455936, @@ -1150,9 +1150,9 @@ public class DiscJuggler : OpticalMediaImageTest VolumeName = "Test DVD", VolumeSerial = "483E25D50034BBB0" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1161,8 +1161,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 2146368, Md5 = "106f141400355476b499213f36a363f9", LongMd5 = "106f141400355476b499213f36a363f9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1170,8 +1170,8 @@ public class DiscJuggler : OpticalMediaImageTest End = 2146367, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -1180,9 +1180,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1191,8 +1191,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 2295104, Md5 = "759e9c19389aee07f88a994132b6f8d9", LongMd5 = "759e9c19389aee07f88a994132b6f8d9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1200,8 +1200,8 @@ public class DiscJuggler : OpticalMediaImageTest End = 2295103, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -1210,9 +1210,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1221,8 +1221,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 2146368, Md5 = "106f141400355476b499213f36a363f9", LongMd5 = "106f141400355476b499213f36a363f9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1230,8 +1230,8 @@ public class DiscJuggler : OpticalMediaImageTest End = 2146367, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -1240,9 +1240,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1252,8 +1252,8 @@ public class DiscJuggler : OpticalMediaImageTest Md5 = "7a76c22590401d57b84396c9fc2925e4", LongMd5 = "63a318522c436ccd6b3ac3959bdb417f", SubchannelMd5 = "2581844f8192c719da44ba57e8e5512b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1366,8 +1366,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -1375,9 +1375,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1386,8 +1386,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 277696, Md5 = "52d7a2793b7600dc94d007f5e7dfd942", LongMd5 = "52d7a2793b7600dc94d007f5e7dfd942", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1476,7 +1476,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 0, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -1485,8 +1485,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 59206, Md5 = "31054e6b8f4d51fe502ac340490bcd46", LongMd5 = "2fc4b8966350322ed3fd553b9e628164", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1511,8 +1511,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 18853, @@ -1520,9 +1520,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "New" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1531,8 +1531,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 350134, Md5 = "d976a8d0131bf48926542160bb41fc13", LongMd5 = "cd55978d00f1bc127a0e652259ba2418", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1541,8 +1541,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 7, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 600, @@ -1558,9 +1558,9 @@ public class DiscJuggler : OpticalMediaImageTest VolumeName = "InCD", VolumeSerial = "40888C15CA13D401InCD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1570,8 +1570,8 @@ public class DiscJuggler : OpticalMediaImageTest Md5 = "a34e29e42b60023a6ae59f37d2bd4bea", LongMd5 = "e981f7dfdb522ba937fe75474e23a446", SubchannelMd5 = "62164333675c194acbe14eed5213e4f4", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1580,8 +1580,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -1589,7 +1589,7 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -1711,7 +1711,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1720,8 +1720,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 65536, Md5 = "9315c6fc3cf5371ae3795df2b624bd5e", LongMd5 = "9315c6fc3cf5371ae3795df2b624bd5e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1762,7 +1762,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 0, Flags = 1 } - } + ] }, new OpticalImageTestExpected { @@ -1771,8 +1771,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 51168, Md5 = "46e43ed4712e5ae61b653b4d19f27080", LongMd5 = "cac33e71b4693b2902f086a0a433129d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1781,8 +1781,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 7876, @@ -1798,7 +1798,7 @@ public class DiscJuggler : OpticalMediaImageTest VolumeName = "Session 1", VolumeSerial = "50958B61AF6A749E" } - } + ] }, new TrackInfoTestExpected { @@ -1808,8 +1808,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 6170, @@ -1825,7 +1825,7 @@ public class DiscJuggler : OpticalMediaImageTest VolumeName = "Session 2", VolumeSerial = "50958BBBAF6A7444" } - } + ] }, new TrackInfoTestExpected { @@ -1835,8 +1835,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 5360, @@ -1852,7 +1852,7 @@ public class DiscJuggler : OpticalMediaImageTest VolumeName = "Session 3", VolumeSerial = "50958C19AF6A73E6" } - } + ] }, new TrackInfoTestExpected { @@ -1862,7 +1862,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1871,8 +1871,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 230624, Md5 = "020993315e49ab0d36bc7248819162ea", LongMd5 = "020993315e49ab0d36bc7248819162ea", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1880,8 +1880,8 @@ public class DiscJuggler : OpticalMediaImageTest End = 230623, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 22016, @@ -1889,9 +1889,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "Session 1" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1900,8 +1900,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 257264, Md5 = "dff8f2107a4ea9633a88ce38ff609b8e", LongMd5 = "dff8f2107a4ea9633a88ce38ff609b8e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1909,8 +1909,8 @@ public class DiscJuggler : OpticalMediaImageTest End = 257263, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 206560, @@ -1918,9 +1918,9 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "Session 1" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1929,8 +1929,8 @@ public class DiscJuggler : OpticalMediaImageTest Sectors = 48794, Md5 = "e5b596e73f46f646a51e1315b59e7cb9", LongMd5 = "acd1a8de676ebe6feeb9d6964ccd63ea", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1939,8 +1939,8 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -1948,7 +1948,7 @@ public class DiscJuggler : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -1958,7 +1958,7 @@ public class DiscJuggler : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, #region These test images violate the specifications and are not expected to work yet diff --git a/Aaru.Tests/Images/DiskCopy42.cs b/Aaru.Tests/Images/DiskCopy42.cs index 65fda5829..c2b0dc636 100644 --- a/Aaru.Tests/Images/DiskCopy42.cs +++ b/Aaru.Tests/Images/DiskCopy42.cs @@ -39,8 +39,8 @@ public class DiskCopy42 : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "DiskCopy 4.2"); public override IMediaImage Plugin => new Aaru.Images.DiskCopy42(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "hfs.dsk.lz", @@ -113,5 +113,5 @@ public class DiskCopy42 : BlockMediaImageTest SectorSize = 512, Md5 = "fcf747bd356b48d442ff74adb8f3516b" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskCopy633/DiskCopy42.cs b/Aaru.Tests/Images/DiskCopy633/DiskCopy42.cs index 7074a466e..880a290a7 100644 --- a/Aaru.Tests/Images/DiskCopy633/DiskCopy42.cs +++ b/Aaru.Tests/Images/DiskCopy633/DiskCopy42.cs @@ -41,8 +41,8 @@ public class DiskCopy42 : BlockMediaImageTest public override IMediaImage Plugin => new Aaru.Images.DiskCopy42(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DC6_42_DOS_1440.img", @@ -50,14 +50,14 @@ public class DiskCopy42 : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -66,14 +66,14 @@ public class DiskCopy42 : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -107,5 +107,5 @@ public class DiskCopy42 : BlockMediaImageTest SectorSize = 512, Md5 = "a72da7aedadbe194c22a3d71c62e4766" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskCopy633/NDIF/ROCo.cs b/Aaru.Tests/Images/DiskCopy633/NDIF/ROCo.cs index 5554ea9ef..d5df528e0 100644 --- a/Aaru.Tests/Images/DiskCopy633/NDIF/ROCo.cs +++ b/Aaru.Tests/Images/DiskCopy633/NDIF/ROCo.cs @@ -44,8 +44,8 @@ public class ROCo : BlockMediaImageTest public override IMediaImage Plugin => new Ndif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DC6_RC_DOS_1440.img", @@ -53,14 +53,14 @@ public class ROCo : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class ROCo : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class ROCo : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -101,14 +101,14 @@ public class ROCo : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -117,14 +117,14 @@ public class ROCo : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -133,14 +133,14 @@ public class ROCo : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -238,5 +238,5 @@ public class ROCo : BlockMediaImageTest SectorSize = 512, Md5 = "7fbf0251a93cb36d98e68b7d19624de5" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskCopy633/NDIF/RdWr.cs b/Aaru.Tests/Images/DiskCopy633/NDIF/RdWr.cs index 698afa4a0..d01fce032 100644 --- a/Aaru.Tests/Images/DiskCopy633/NDIF/RdWr.cs +++ b/Aaru.Tests/Images/DiskCopy633/NDIF/RdWr.cs @@ -42,8 +42,8 @@ public class RdWr : BlockMediaImageTest public override IMediaImage Plugin => new Ndif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DC6_RW_DOS_1440.img", @@ -51,14 +51,14 @@ public class RdWr : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -67,14 +67,14 @@ public class RdWr : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -83,14 +83,14 @@ public class RdWr : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -140,5 +140,5 @@ public class RdWr : BlockMediaImageTest SectorSize = 512, Md5 = "7fbf0251a93cb36d98e68b7d19624de5" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskCopy633/NDIF/Rdxx.cs b/Aaru.Tests/Images/DiskCopy633/NDIF/Rdxx.cs index ec3e39179..17686431d 100644 --- a/Aaru.Tests/Images/DiskCopy633/NDIF/Rdxx.cs +++ b/Aaru.Tests/Images/DiskCopy633/NDIF/Rdxx.cs @@ -42,8 +42,8 @@ public class Rdxx : BlockMediaImageTest public override IMediaImage Plugin => new Ndif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DC6_RO_DOS_1440.img", @@ -51,14 +51,14 @@ public class Rdxx : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -67,14 +67,14 @@ public class Rdxx : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -83,14 +83,14 @@ public class Rdxx : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -140,5 +140,5 @@ public class Rdxx : BlockMediaImageTest SectorSize = 512, Md5 = "7fbf0251a93cb36d98e68b7d19624de5" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskCopy65/UDCO.cs b/Aaru.Tests/Images/DiskCopy65/UDCO.cs index 3cdab6282..d6b7ac0fc 100644 --- a/Aaru.Tests/Images/DiskCopy65/UDCO.cs +++ b/Aaru.Tests/Images/DiskCopy65/UDCO.cs @@ -44,8 +44,8 @@ public class UDCO : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DC6_UDCO_DOS_1440.dmg", @@ -53,14 +53,14 @@ public class UDCO : BlockMediaImageTest Sectors = 2884, SectorSize = 512, Md5 = "4306922864c6cf40a419fd5876b5879d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 4, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -146,5 +146,5 @@ public class UDCO : BlockMediaImageTest SectorSize = 512, Md5 = "e7b1de07a1f402e4663c3dee4fd3d6fe" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskCopy65/UDCo_obsolete.cs b/Aaru.Tests/Images/DiskCopy65/UDCo_obsolete.cs index efbc88fa5..1a39bea01 100644 --- a/Aaru.Tests/Images/DiskCopy65/UDCo_obsolete.cs +++ b/Aaru.Tests/Images/DiskCopy65/UDCo_obsolete.cs @@ -44,8 +44,8 @@ public class UDCo_obsolete : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DC6_UDCo_DOS_1440.dmg", @@ -53,14 +53,14 @@ public class UDCo_obsolete : BlockMediaImageTest Sectors = 2884, SectorSize = 512, Md5 = "4306922864c6cf40a419fd5876b5879d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 4, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -146,5 +146,5 @@ public class UDCo_obsolete : BlockMediaImageTest SectorSize = 512, Md5 = "e7b1de07a1f402e4663c3dee4fd3d6fe" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskCopy65/UDRAW.cs b/Aaru.Tests/Images/DiskCopy65/UDRAW.cs index 56aad3664..ff9912618 100644 --- a/Aaru.Tests/Images/DiskCopy65/UDRAW.cs +++ b/Aaru.Tests/Images/DiskCopy65/UDRAW.cs @@ -44,8 +44,8 @@ public class UDRAW : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DC6_UDRAW_DOS_1440.dmg", @@ -53,14 +53,14 @@ public class UDRAW : BlockMediaImageTest Sectors = 2884, SectorSize = 512, Md5 = "4306922864c6cf40a419fd5876b5879d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 4, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -146,5 +146,5 @@ public class UDRAW : BlockMediaImageTest SectorSize = 512, Md5 = "e7b1de07a1f402e4663c3dee4fd3d6fe" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskCopy65/UDRO.cs b/Aaru.Tests/Images/DiskCopy65/UDRO.cs index 10ab44f6c..52a04bd14 100644 --- a/Aaru.Tests/Images/DiskCopy65/UDRO.cs +++ b/Aaru.Tests/Images/DiskCopy65/UDRO.cs @@ -44,8 +44,8 @@ public class UDRO : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DC6_UDRO_DOS_1440.dmg", @@ -53,14 +53,14 @@ public class UDRO : BlockMediaImageTest Sectors = 2884, SectorSize = 512, Md5 = "4306922864c6cf40a419fd5876b5879d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 4, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -146,5 +146,5 @@ public class UDRO : BlockMediaImageTest SectorSize = 512, Md5 = "e7b1de07a1f402e4663c3dee4fd3d6fe" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskCopy65/UDRo_obsolete.cs b/Aaru.Tests/Images/DiskCopy65/UDRo_obsolete.cs index 64baf3164..9436e5ce5 100644 --- a/Aaru.Tests/Images/DiskCopy65/UDRo_obsolete.cs +++ b/Aaru.Tests/Images/DiskCopy65/UDRo_obsolete.cs @@ -44,8 +44,8 @@ public class UDRo_obsolete : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DC6_UDRo_DOS_1440.dmg", @@ -53,14 +53,14 @@ public class UDRo_obsolete : BlockMediaImageTest Sectors = 2884, SectorSize = 512, Md5 = "4306922864c6cf40a419fd5876b5879d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 4, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -146,5 +146,5 @@ public class UDRo_obsolete : BlockMediaImageTest SectorSize = 512, Md5 = "e7b1de07a1f402e4663c3dee4fd3d6fe" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskDupe.cs b/Aaru.Tests/Images/DiskDupe.cs index ee1ac4cc8..7c6e3c2de 100644 --- a/Aaru.Tests/Images/DiskDupe.cs +++ b/Aaru.Tests/Images/DiskDupe.cs @@ -40,8 +40,8 @@ public class DiskDupe : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "DiskDupe"); public override IMediaImage Plugin => new Aaru.Images.DiskDupe(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "1.DDI.lz", @@ -85,14 +85,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "f63e676310b2f1a9e44e9a471c7cf1f2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -109,14 +109,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "9fbe4254ed34991d38a4cde57e867360", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -125,14 +125,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2302991363cb3681cffdc4388915b51e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -141,14 +141,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "015f4f812fd5b03741e3dcad534a4a8d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -157,14 +157,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "dc2b7b7eb6d83ce25a6f51d1e457ca24", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -181,14 +181,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "1cc0a19579c841ace37c36ef1cd57a05", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -197,14 +197,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "323322148c4c7394a92fa6a73542e32a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -213,14 +213,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "f01541de322c8d6d7321084d7a245e7b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -229,14 +229,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "28f3cda83fa1e22a420e06704abc6139", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -245,14 +245,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "b057202adb98964e8f630a3299e86490", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -261,14 +261,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "d987313a46843017e906ee122163ded6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -277,14 +277,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "c64ef58dc6d875b9f6e7c0a7362c6832", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -293,14 +293,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "be05d1ff10ef8b2220546c4db962ac9e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -309,14 +309,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "1c8b03a8550ed3e70e1c78316aa445aa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -325,14 +325,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "0bdf9130c07bb5d558a4705249f949d0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -341,14 +341,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2dafeddaa99e7dc0db5ef69e128f9c8e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -375,14 +375,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "0e002201126260afa26b03df227175d7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -391,14 +391,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "07eefdd2a6261be61af5b29de9dd56ee", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -407,14 +407,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "b7c377c7456071b7e886210d9b002bf3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -423,14 +423,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "fe4ce9782a5a42bf2bf6b41f7a51d744", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -439,14 +439,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "b28f4850eaca9909db3aa8d9b185d1a2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -455,14 +455,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "0c438ab43509da1863b1fecff8d806aa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, // TODO: CP/M false positive @@ -481,14 +481,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "834cf0380eba331b4dc43ad55edd42a6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -497,14 +497,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "3201d13f82cb3d933158d2c5208c20a1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -513,14 +513,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "b4b8eea68483ad5ba983c865e93f2ec6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -529,14 +529,14 @@ public class DiskDupe : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "3335dc14ff1efa58d410afc045a9b425", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/DiskCopy42.cs b/Aaru.Tests/Images/DiskImagesFramework/DiskCopy42.cs index 92ba97771..4f2e3837b 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/DiskCopy42.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/DiskCopy42.cs @@ -41,8 +41,8 @@ public class DiskCopy42 : BlockMediaImageTest public override IMediaImage Plugin => new Aaru.Images.DiskCopy42(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.img.lz", @@ -50,14 +50,14 @@ public class DiskCopy42 : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -66,14 +66,14 @@ public class DiskCopy42 : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -131,5 +131,5 @@ public class DiskCopy42 : BlockMediaImageTest SectorSize = 512, Md5 = "85574aebeef03eb355bf8541955d06ea" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/NDIF/ROCo.cs b/Aaru.Tests/Images/DiskImagesFramework/NDIF/ROCo.cs index e00cb49ee..f4903c456 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/NDIF/ROCo.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/NDIF/ROCo.cs @@ -44,8 +44,8 @@ public class ROCo : BlockMediaImageTest public override IMediaImage Plugin => new Ndif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.img", @@ -53,14 +53,14 @@ public class ROCo : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class ROCo : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class ROCo : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -101,14 +101,14 @@ public class ROCo : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -206,5 +206,5 @@ public class ROCo : BlockMediaImageTest SectorSize = 512, Md5 = "cdfebf3f8b8f250dc6905a90dd1bc90f" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/NDIF/RdWr.cs b/Aaru.Tests/Images/DiskImagesFramework/NDIF/RdWr.cs index 888aef379..940ee5f71 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/NDIF/RdWr.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/NDIF/RdWr.cs @@ -42,8 +42,8 @@ public class RdWr : BlockMediaImageTest public override IMediaImage Plugin => new Ndif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.img", @@ -51,14 +51,14 @@ public class RdWr : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -67,14 +67,14 @@ public class RdWr : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -83,14 +83,14 @@ public class RdWr : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -99,14 +99,14 @@ public class RdWr : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -204,5 +204,5 @@ public class RdWr : BlockMediaImageTest SectorSize = 512, Md5 = "cdfebf3f8b8f250dc6905a90dd1bc90f" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/NDIF/Rdxx.cs b/Aaru.Tests/Images/DiskImagesFramework/NDIF/Rdxx.cs index 792d13fac..db2d92dcf 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/NDIF/Rdxx.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/NDIF/Rdxx.cs @@ -42,8 +42,8 @@ public class Rdxx : BlockMediaImageTest public override IMediaImage Plugin => new Ndif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.img", @@ -51,14 +51,14 @@ public class Rdxx : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -67,14 +67,14 @@ public class Rdxx : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -83,14 +83,14 @@ public class Rdxx : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -99,14 +99,14 @@ public class Rdxx : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -204,5 +204,5 @@ public class Rdxx : BlockMediaImageTest SectorSize = 512, Md5 = "cdfebf3f8b8f250dc6905a90dd1bc90f" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/UDIF/IPOD.cs b/Aaru.Tests/Images/DiskImagesFramework/UDIF/IPOD.cs index 950ed0bc4..046149baf 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/UDIF/IPOD.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/UDIF/IPOD.cs @@ -44,8 +44,8 @@ public class IPOD : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.dmg.lz", @@ -53,14 +53,14 @@ public class IPOD : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class IPOD : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class IPOD : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -101,14 +101,14 @@ public class IPOD : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -214,5 +214,5 @@ public class IPOD : BlockMediaImageTest SectorSize = 512, Md5 = "b7d4ad55c7702658081b6578b588a57f" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDBZ.cs b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDBZ.cs index 2724d31fe..cd135825c 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDBZ.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDBZ.cs @@ -44,8 +44,8 @@ public class UDBZ : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.dmg.lz", @@ -53,14 +53,14 @@ public class UDBZ : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class UDBZ : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class UDBZ : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -101,14 +101,14 @@ public class UDBZ : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -214,5 +214,5 @@ public class UDBZ : BlockMediaImageTest SectorSize = 512, Md5 = "b7d4ad55c7702658081b6578b588a57f" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDCO.cs b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDCO.cs index 77319d519..97101ccb0 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDCO.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDCO.cs @@ -44,8 +44,8 @@ public class UDCO : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.dmg.lz", @@ -53,14 +53,14 @@ public class UDCO : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class UDCO : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class UDCO : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -101,14 +101,14 @@ public class UDCO : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -214,5 +214,5 @@ public class UDCO : BlockMediaImageTest SectorSize = 512, Md5 = "b7d4ad55c7702658081b6578b588a57f" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDRO.cs b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDRO.cs index 79fe06358..a4d1ae984 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDRO.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDRO.cs @@ -44,8 +44,8 @@ public class UDRO : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.dmg.lz", @@ -53,14 +53,14 @@ public class UDRO : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class UDRO : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class UDRO : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -101,14 +101,14 @@ public class UDRO : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -214,5 +214,5 @@ public class UDRO : BlockMediaImageTest SectorSize = 512, Md5 = "b7d4ad55c7702658081b6578b588a57f" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDRW.cs b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDRW.cs index 497f75972..493434f05 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDRW.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDRW.cs @@ -44,8 +44,8 @@ public class UDRW : BlockMediaImageTest public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.dmg", @@ -53,14 +53,14 @@ public class UDRW : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class UDRW : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class UDRW : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -101,14 +101,14 @@ public class UDRW : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -214,5 +214,5 @@ public class UDRW : BlockMediaImageTest SectorSize = 512, Md5 = "b7d4ad55c7702658081b6578b588a57f" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDTO.cs b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDTO.cs index 1d7b8e60b..fc06404d8 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDTO.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDTO.cs @@ -44,8 +44,8 @@ public class UDTO : BlockMediaImageTest public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.dmg", @@ -53,14 +53,14 @@ public class UDTO : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class UDTO : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class UDTO : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -101,14 +101,14 @@ public class UDTO : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -214,5 +214,5 @@ public class UDTO : BlockMediaImageTest SectorSize = 512, Md5 = "ad555f90bad6a75e8b6ba6cdaafc4458" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDZO.cs b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDZO.cs index 5b9e11118..89964cb40 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDZO.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UDZO.cs @@ -44,8 +44,8 @@ public class UDZO : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.dmg.lz", @@ -53,14 +53,14 @@ public class UDZO : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class UDZO : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class UDZO : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -101,14 +101,14 @@ public class UDZO : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -214,5 +214,5 @@ public class UDZO : BlockMediaImageTest SectorSize = 512, Md5 = "b7d4ad55c7702658081b6578b588a57f" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UFBI.cs b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UFBI.cs index c0c9d9047..e8dae9b67 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/UDIF/UFBI.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/UDIF/UFBI.cs @@ -44,8 +44,8 @@ public class UFBI : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DOS_1440.dmg.lz", @@ -53,14 +53,14 @@ public class UFBI : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class UFBI : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class UFBI : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -101,14 +101,14 @@ public class UFBI : BlockMediaImageTest Sectors = 10240, SectorSize = 512, Md5 = "df3b4331a4a5652393ff55f001998439", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10240 } - } + ] }, new BlockImageTestExpected { @@ -214,5 +214,5 @@ public class UFBI : BlockMediaImageTest SectorSize = 512, Md5 = "b7d4ad55c7702658081b6578b588a57f" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskImagesFramework/UDIF/ULMO.cs b/Aaru.Tests/Images/DiskImagesFramework/UDIF/ULMO.cs index b5d8ca6db..627531fe3 100644 --- a/Aaru.Tests/Images/DiskImagesFramework/UDIF/ULMO.cs +++ b/Aaru.Tests/Images/DiskImagesFramework/UDIF/ULMO.cs @@ -43,8 +43,8 @@ public class ULMO : BlockMediaImageTest public override IMediaImage Plugin => new Udif(); - public override BlockImageTestExpected[] Tests => new BlockImageTestExpected[] - { + public override BlockImageTestExpected[] Tests => + [ /* TODO: Chunks compressed with lzma are not yet supported. new BlockImageTestExpected { @@ -215,5 +215,5 @@ public class ULMO : BlockMediaImageTest MD5 = "b7d4ad55c7702658081b6578b588a57f" } */ - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskUtilities/ImageDisk.cs b/Aaru.Tests/Images/DiskUtilities/ImageDisk.cs index c6be20e33..7ffa10d5c 100644 --- a/Aaru.Tests/Images/DiskUtilities/ImageDisk.cs +++ b/Aaru.Tests/Images/DiskUtilities/ImageDisk.cs @@ -42,8 +42,8 @@ public class ImageDisk : BlockMediaImageTest public override IMediaImage Plugin => new Imd(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "mf2dd_acorn.imd.lz", @@ -76,5 +76,5 @@ public class ImageDisk : BlockMediaImageTest SectorSize = 512, Md5 = "9dea1e119a73a21a38d134f36b2e5564" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DiskUtilities/Raw.cs b/Aaru.Tests/Images/DiskUtilities/Raw.cs index 17f13294c..413537926 100644 --- a/Aaru.Tests/Images/DiskUtilities/Raw.cs +++ b/Aaru.Tests/Images/DiskUtilities/Raw.cs @@ -42,8 +42,8 @@ public class Raw : BlockMediaImageTest public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "mf2dd_acorn.img.lz", @@ -102,5 +102,5 @@ public class Raw : BlockMediaImageTest MD5 = "UNKNOWN" } */ - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/DriDiskCopy.cs b/Aaru.Tests/Images/DriDiskCopy.cs index d45dc297c..30822bb89 100644 --- a/Aaru.Tests/Images/DriDiskCopy.cs +++ b/Aaru.Tests/Images/DriDiskCopy.cs @@ -39,8 +39,8 @@ public class DriDiskCopy : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "DRI DISKCOPY"); public override IMediaImage Plugin => new Aaru.Images.DriDiskCopy(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DSKA0000.IMG.lz", @@ -64,14 +64,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "95ea232f59e44db374b994cfe7f1c07f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -88,14 +88,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2302991363cb3681cffdc4388915b51e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -112,14 +112,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "af83d011608042d35021e39aa5e10b2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -128,14 +128,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "6642c1a32d2c58e93481d664974fc202", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -144,14 +144,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "846f01b8b60cb3c775bd66419e977926", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -160,14 +160,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "5101f89850dc28efbcfb7622086a9ddf", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -176,14 +176,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "8e570be2ed1f00ddea82e50a2d9c446a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -192,14 +192,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "abba2a1ddd60a649047a9c44d94bbeae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -208,14 +208,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "e3bc48bec81be5b35be73d41fdffd2ab", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -224,14 +224,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "43b5068af9d016d1432eb2e12d2b802a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -240,14 +240,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "5bf2ad4dc300592604b6e32f8b8e2656", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -256,14 +256,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "cb9a832ca6a4097b8ccc30d2108e1f7d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -272,14 +272,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "56d181a6bb8713e6b2854fe8887faab6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -288,14 +288,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "41aef7cff26aefda1add8d49c5b962c2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -304,14 +304,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2460, SectorSize = 512, Md5 = "2437c5f089f1cba3866b36360b016f16", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2460 } - } + ] }, new BlockImageTestExpected { @@ -320,14 +320,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1280, SectorSize = 512, Md5 = "bdaa8f17373b265830fdf3a06b794367", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1280 } - } + ] }, new BlockImageTestExpected { @@ -336,14 +336,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "629932c285478d0540ff7936aa008351", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -352,14 +352,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1476, SectorSize = 512, Md5 = "7a2abef5d4701e2e49abb05af8d4da50", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1476 } - } + ] }, new BlockImageTestExpected { @@ -368,14 +368,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "e3507522c914264f44fb2c92c3170c09", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -384,14 +384,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "824fe65dbb1a42b6b94f05405ef984f2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -400,14 +400,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "1a8c2e78e7132cf9ba5d6c2b75876be0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -416,14 +416,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "936b20bb0966fe693b4d5e2353e24846", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -440,14 +440,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "aa0d31f914760cc4cde75479779ebed6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -456,14 +456,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "31269ed6464302ae26d22b7c87bceb23", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -472,14 +472,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "5e413433c54f48978d281c6e66d1106e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -488,14 +488,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "4fc28b0128543b2eb70f6432c4c8a980", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -504,14 +504,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3528, SectorSize = 512, Md5 = "24a7459d080cea3a60d131b8fd7dc5d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3528 } - } + ] }, new BlockImageTestExpected { @@ -520,14 +520,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3570, SectorSize = 512, Md5 = "2031b1e16ee2defc0d15f732f633df33", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3570 } - } + ] }, new BlockImageTestExpected { @@ -536,14 +536,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "5fc19ca552b6db957061e9a1750394d2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -552,14 +552,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "a33b46f042b78fe3d0b3c5dbb3908a93", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -568,14 +568,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "565d3c001cbb532154aa5d3c65b2439c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -584,14 +584,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "e60442c3ebd72c99bdd7545fdba59613", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -600,14 +600,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "058a33a129539285c9b64010496af52f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -616,14 +616,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "0726ecbc38965d30a6222c3e74cd1aa3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -640,14 +640,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c38d69ac88520f14fcc6d6ced22b065d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -656,14 +656,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "91d51964e1e64ef3f6f622fa19aa833c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -672,14 +672,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "db36d9651c952ff679ec33223c8db2d3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -688,14 +688,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2988, SectorSize = 512, Md5 = "5f1d98806309aee7f81de72e51e6d386", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2988 } - } + ] }, new BlockImageTestExpected { @@ -704,14 +704,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "1207a1cc7ff73d4f74c8984b4e7db33f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -720,14 +720,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "c97a3081fd25474b6b7945b8572d5ab8", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -752,14 +752,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "0a432572a28d3b53a0cf2b5c211fe777", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -768,14 +768,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1804, SectorSize = 512, Md5 = "cd84fa2d62ac7c36783224c3ba0be664", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1804 } - } + ] }, new BlockImageTestExpected { @@ -784,14 +784,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "63d29a9d867d924421c10793a0f22965", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -800,14 +800,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3116, SectorSize = 512, Md5 = "21778906886c0314f0f33c4b0040ba16", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3116 } - } + ] }, new BlockImageTestExpected { @@ -816,14 +816,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3608, SectorSize = 512, Md5 = "6b8e89b1d5117ba19c3e52544ffe041e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3608 } - } + ] }, new BlockImageTestExpected { @@ -832,14 +832,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3772, SectorSize = 512, Md5 = "543fc539902eb66b5c312d7908ecf97a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3772 } - } + ] }, new BlockImageTestExpected { @@ -848,14 +848,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1952, SectorSize = 512, Md5 = "b30709f798bfb8469d02a82c882f780c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1952 } - } + ] }, new BlockImageTestExpected { @@ -864,14 +864,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "0f3e923010b50b550591a89ea2dee62b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -880,14 +880,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3944, SectorSize = 512, Md5 = "d5b927503abcd1978496bc679bb9c2f7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3944 } - } + ] }, new BlockImageTestExpected { @@ -904,14 +904,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 410, SectorSize = 512, Md5 = "7b41dd9ca7eb32828960eb1417a6092a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 410 } - } + ] }, new BlockImageTestExpected { @@ -920,14 +920,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "126dfd25363c076727dfaab03955c931", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -936,14 +936,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 820, SectorSize = 512, Md5 = "e6492aac144f5f6f593b84c64680cf64", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 820 } - } + ] }, new BlockImageTestExpected { @@ -952,14 +952,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "7973e569ed93beb1ece2e84a5ef3a8d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -968,14 +968,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a793047503af08e83361427b3e2806e0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -984,14 +984,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "f01541de322c8d6d7321084d7a245e7b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1000,14 +1000,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "ba6ec1652ff41bcc687aaf9c4e32dc18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -1016,14 +1016,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "7973e569ed93beb1ece2e84a5ef3a8d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1032,14 +1032,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a793047503af08e83361427b3e2806e0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1048,14 +1048,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "ba6ec1652ff41bcc687aaf9c4e32dc18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -1064,14 +1064,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "6631b66fdfd89319323771c41334c7ba", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1080,14 +1080,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "56471a253f4d6803b634e2bbff6c0931", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -1096,14 +1096,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "7d36aee5a3071ff75b979f3acb649c40", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -1112,14 +1112,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "0ccb62039363ab544c69eca229a17fae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -1128,14 +1128,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "7851d31fad9302ff45d3ded4fba25387", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -1144,14 +1144,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "915b08c82591e8488320e001b7303b6d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1160,14 +1160,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "5e5ea6fe9adf842221fdc60e56630405", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -1176,14 +1176,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "a22e254f7e3526ec30dc4915a19fcb52", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1192,14 +1192,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ddc6c1200c60e9f7796280f50c2e5283", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1208,14 +1208,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "be05d1ff10ef8b2220546c4db962ac9e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1224,14 +1224,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 820, SectorSize = 512, Md5 = "32823b9009c99b6711e89336ad03ec7f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 820 } - } + ] }, new BlockImageTestExpected { @@ -1240,14 +1240,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "1c8b03a8550ed3e70e1c78316aa445aa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1256,14 +1256,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "0bdf9130c07bb5d558a4705249f949d0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -1272,14 +1272,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2dafeddaa99e7dc0db5ef69e128f9c8e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1296,14 +1296,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "152023525154b45ab26687190bac94db", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1312,14 +1312,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "db38ecd93f28dd065927fed21917eed5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1328,14 +1328,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "f206c0caa4e0eda37233ab6e89ab5493", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1344,14 +1344,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "554492a7b41f4cd9068a3a2b70eb0e5f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1360,14 +1360,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "36dd03967a2a3369538cad29b8b74b71", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -1376,14 +1376,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "4f5c02448e75bbc086e051c728414513", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -1392,14 +1392,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "5ac0a9fc7337f761098f816359b0f6f7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1408,14 +1408,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "1ea6ec8e663218b1372048f6e25795b5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1424,14 +1424,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "77a1167b1b9043496e32b8578cde0ff0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1440,14 +1440,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "4b07d760d65f3f0f8ffa5f2b81cee907", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -1456,14 +1456,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "32c044c5c2b0bd13806149a759c14935", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1472,14 +1472,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3040, SectorSize = 512, Md5 = "8752095abc13dba3f3467669da333891", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3040 } - } + ] }, new BlockImageTestExpected { @@ -1488,14 +1488,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "aece7cd34bbba3e75307fa70404d9d30", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1504,14 +1504,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "5289afb16a6e4a33213e3bcca56c6230", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -1520,14 +1520,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3320, SectorSize = 512, Md5 = "1aef0a0ba233476db6567878c3c2b266", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3320 } - } + ] }, new BlockImageTestExpected { @@ -1536,14 +1536,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "b96596711f4d2ee85dfda0fe3b9f26c3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1552,14 +1552,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "a4f461af7fda5e93a7ab63fcbb7e7683", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -1568,14 +1568,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "8f7f7099d4475f6631fcf0a79b031d61", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -1584,14 +1584,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "4feeaf4b4ee5dad85db727fbbda4b6d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -1600,14 +1600,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 400, SectorSize = 512, Md5 = "3c77ca681df78e4cd7baa162aa9b0859", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 400 } - } + ] }, new BlockImageTestExpected { @@ -1616,14 +1616,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "51da1f86c49657ffdb367bb2ddeb7990", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -1650,14 +1650,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "f76f92dd326c99c5efad5ee58daf72e1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -1666,14 +1666,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "b6f2c10e42908e334025bc4ffd81e771", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -1682,14 +1682,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "f2f409ea2a62a7866fd2777cc4fc9739", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1698,14 +1698,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1494, SectorSize = 512, Md5 = "3e441d69cec5c3169274e1379de4af4b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1494 } - } + ] }, new BlockImageTestExpected { @@ -1714,14 +1714,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "30a93f30dd4485c6fc037fe0775d3fc7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1730,14 +1730,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "e0caf02cce5597c98313bcc480366ec7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1746,14 +1746,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "4af4904d2b3c815da7bef7049209f5eb", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -1762,14 +1762,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "39bf5a98bcb2185d855ac06378febcfa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -1778,14 +1778,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "dc20055b6e6fd6f8e1114d4be2effeed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -1794,14 +1794,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "56af9256cf71d5aac5fd5d363674bc49", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -1810,14 +1810,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "bbba1e2d1418e05c3a4e7b4d585d160b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1826,14 +1826,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "bca3a045e81617f7f5ebb5a8818eac47", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -1842,14 +1842,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "a296663cb8e75e94603221352f29cfff", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1858,14 +1858,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ecda36ebf0e1100233cb0ec722c18583", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1874,14 +1874,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "bbe58e26b8f8f822cd3edfd37a4e4924", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1890,14 +1890,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "b9b6ebdf711364c979de7cf70c3a438a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -1906,14 +1906,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "d37424f367f545acbb397f2bed766843", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1922,14 +1922,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "9963dd6f19ce6bd56eabeccdfbbd821a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1938,14 +1938,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "acf6604559ae8217f7869823e2429024", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1954,14 +1954,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "23bf2139cdfdc4c16db058fd31ea6481", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -1970,14 +1970,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "fa26adda0415f02057b113ad29c80c8d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1986,14 +1986,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "4f2a8d036fefd6c6c88d99eda3aa12b7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2002,14 +2002,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1386, SectorSize = 512, Md5 = "e794a3ffa4069ea999fdf7146710fa9e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1386 } - } + ] }, new BlockImageTestExpected { @@ -2018,14 +2018,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "d81f5cb64fd0b99f138eab34110bbc3c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -2034,14 +2034,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "a89006a75d13bee9202d1d6e52721ccb", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -2050,14 +2050,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "319fa8bef964c2a63e34bdb48e77cc4e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2066,14 +2066,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1804, SectorSize = 512, Md5 = "306a61469b4c3c83f3e5f9ae409d83cd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1804 } - } + ] }, new BlockImageTestExpected { @@ -2082,14 +2082,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "beef1cdb004dc69391d6b3d508988b95", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -2114,14 +2114,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "c91e852828c2aeee2fc94a6adbeed0ae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2130,14 +2130,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "efb6cfe53a6770f0ae388cb2c7f46264", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -2146,14 +2146,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1476, SectorSize = 512, Md5 = "6116f7c1397cadd55ba8d79c2aadc9dd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1476 } - } + ] }, new BlockImageTestExpected { @@ -2162,14 +2162,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "93100f8d86e5d0d0e6340f59c52a5e0d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2178,14 +2178,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "cf7b7d43aa70863bedcc4a8432a5af67", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2194,14 +2194,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "215198cf2a336e718208fc207bb62c6d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -2210,14 +2210,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3116, SectorSize = 512, Md5 = "2c96964b5d91444302e21721c25ea120", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3116 } - } + ] }, new BlockImageTestExpected { @@ -2226,14 +2226,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "02259cd5fbcc20f8484aa6bece7a37c6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -2242,14 +2242,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2788, SectorSize = 512, Md5 = "09ca721aa883d5bbaa422c7943b0782c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2788 } - } + ] }, new BlockImageTestExpected { @@ -2274,14 +2274,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1968, SectorSize = 512, Md5 = "9a8670fbaf6307b8d5f32aa10e1be435", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1968 } - } + ] }, new BlockImageTestExpected { @@ -2290,14 +2290,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1968, SectorSize = 512, Md5 = "05d29642cdcddafa0dcaff91682f8fe0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1968 } - } + ] }, new BlockImageTestExpected { @@ -2314,14 +2314,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2132, SectorSize = 512, Md5 = "a99603cd3219aab1299e66b2999f0e57", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2132 } - } + ] }, new BlockImageTestExpected { @@ -2330,14 +2330,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2132, SectorSize = 512, Md5 = "3da419125f45e1fe3b46f6fad3acc1c2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2132 } - } + ] }, new BlockImageTestExpected { @@ -2346,14 +2346,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "de3f85896f771b7e5bc4c9e3926d64e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2362,14 +2362,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "c533488a21098a62c85f1649abda2803", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2378,14 +2378,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "81d3bfec7b201f6a4503eb24c4394d4a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2394,14 +2394,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "d07f7ffaee89742c6477aaaf94eb5715", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2410,14 +2410,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "1ff7649b679ba22ff20d39ff717dbec8", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2426,14 +2426,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "9827ba1b3e9cac41263caabd862e78f9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2442,14 +2442,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "56af87802a9852e6e01e08d544740816", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2458,14 +2458,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1494, SectorSize = 512, Md5 = "fd7fb1ba11cdfe11db54af0322abf59d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1494 } - } + ] }, new BlockImageTestExpected { @@ -2474,14 +2474,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "d9db52d992a76bf3bbc626ff844215a5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2490,14 +2490,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "5949d0be57ce8bffcda7c4be4d1348ee", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -2506,14 +2506,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 5760, SectorSize = 512, Md5 = "4aeafaf2a088d6a7406856dce8118567", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 5760 } - } + ] }, new BlockImageTestExpected { @@ -2530,14 +2530,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3608, SectorSize = 512, Md5 = "967726aede85c68f66887672078f8856", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3608 } - } + ] }, new BlockImageTestExpected { @@ -2554,14 +2554,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3772, SectorSize = 512, Md5 = "3fa4f87d7058ba940b88e0d80f0d7ded", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3772 } - } + ] }, new BlockImageTestExpected { @@ -2570,14 +2570,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3772, SectorSize = 512, Md5 = "5a6d961ed5f089364f2816692bcbe685", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3772 } - } + ] }, new BlockImageTestExpected { @@ -2586,14 +2586,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "b042310181410227d0072fef1e98a989", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2602,14 +2602,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "b4a602f67903c46eef62addb0780aa56", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2618,14 +2618,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "1e06f21a1c11ea3347212da115bca08f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2634,14 +2634,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "3fc3a03d049416d81f81cc3b9ea8e5de", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -2650,14 +2650,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "2bfd2e0a81bad704f8fc7758358cfcca", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2666,14 +2666,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "a79ec33c623697b4562dacaed31523b8", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -2682,14 +2682,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "00e61c06bf29f0c04a7eabe2dbd7efb6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2698,14 +2698,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "3c4becd695ed25866d39966a9a93c2d9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -2722,14 +2722,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2460, SectorSize = 512, Md5 = "72282e11f7d91bf9c090b550fabfe80d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2460 } - } + ] }, new BlockImageTestExpected { @@ -2738,14 +2738,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2720, SectorSize = 512, Md5 = "457c1126dc7f36bbbabe9e17e90372e3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2720 } - } + ] }, new BlockImageTestExpected { @@ -2754,14 +2754,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2788, SectorSize = 512, Md5 = "852181d5913c6f290872c66bbe992314", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2788 } - } + ] }, new BlockImageTestExpected { @@ -2770,14 +2770,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2980cc32504c945598dc50f1db576994", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2786,14 +2786,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "c1c58d74fffb3656dd7f60f74ae8a629", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -2802,14 +2802,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 2988, SectorSize = 512, Md5 = "097bb2fd34cee5ebde7b5641975ffd60", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2988 } - } + ] }, new BlockImageTestExpected { @@ -2818,14 +2818,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "e45d41a61fbe48f328c995fcc10a5548", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -2834,14 +2834,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3320, SectorSize = 512, Md5 = "c25f2a57c71db1cd4fea2263598f544a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3320 } - } + ] }, new BlockImageTestExpected { @@ -2850,14 +2850,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "15f71b92bd72aba5d80bf70eca4d5b1e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2866,14 +2866,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "d88c8d818e238c9e52b8588b5fd52efe", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -2882,14 +2882,14 @@ public class DriDiskCopy : BlockMediaImageTest Sectors = 3680, SectorSize = 512, Md5 = "3d5fcdaf627257ae9f50a06bdba26965", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3680 } - } + ] }, new BlockImageTestExpected { @@ -2899,5 +2899,5 @@ public class DriDiskCopy : BlockMediaImageTest SectorSize = 512, Md5 = "4cb9398cf02ed9e08d0972c1ccba804b" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/GameJack6.cs b/Aaru.Tests/Images/GameJack6.cs index 6f047c1e4..e7301503f 100644 --- a/Aaru.Tests/Images/GameJack6.cs +++ b/Aaru.Tests/Images/GameJack6.cs @@ -39,8 +39,8 @@ public class GameJack6 : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "GameJack 6"); public override IMediaImage Plugin => new Aaru.Images.Alcohol120(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "report_cdrom_cooked_nodpm.xmd", @@ -49,8 +49,8 @@ public class GameJack6 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "1994c303674718c74b35f9a4ea1d3515", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -59,8 +59,8 @@ public class GameJack6 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -75,9 +75,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -87,8 +87,8 @@ public class GameJack6 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "1994c303674718c74b35f9a4ea1d3515", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -97,8 +97,8 @@ public class GameJack6 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -113,9 +113,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -125,8 +125,8 @@ public class GameJack6 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "66518892168f9bd5003e14979573861c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -135,8 +135,8 @@ public class GameJack6 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -151,9 +151,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -163,8 +163,8 @@ public class GameJack6 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "8f0313d7a5f85e23be0d254f3c091004", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -173,8 +173,8 @@ public class GameJack6 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -189,9 +189,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -201,8 +201,8 @@ public class GameJack6 : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "124df553ac9337d1b36c611aa1a3e16f", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -211,8 +211,8 @@ public class GameJack6 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -221,9 +221,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -233,8 +233,8 @@ public class GameJack6 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "248dd7375479f40267b6d4f9fd889d5b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -243,8 +243,8 @@ public class GameJack6 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -259,9 +259,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -270,8 +270,8 @@ public class GameJack6 : OpticalMediaImageTest Sectors = 471091, Md5 = "b6fe37716c05c1d52ef19c28946f3b76", LongMd5 = "b6fe37716c05c1d52ef19c28946f3b76", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -279,8 +279,8 @@ public class GameJack6 : OpticalMediaImageTest End = 471090, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -289,9 +289,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -300,8 +300,8 @@ public class GameJack6 : OpticalMediaImageTest Sectors = 471091, Md5 = "b6fe37716c05c1d52ef19c28946f3b76", LongMd5 = "b6fe37716c05c1d52ef19c28946f3b76", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -309,8 +309,8 @@ public class GameJack6 : OpticalMediaImageTest End = 471090, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -319,9 +319,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -330,8 +330,8 @@ public class GameJack6 : OpticalMediaImageTest Sectors = 2146358, Md5 = "ae08c024d6942e62884abe137f66a80f", LongMd5 = "ae08c024d6942e62884abe137f66a80f", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -339,8 +339,8 @@ public class GameJack6 : OpticalMediaImageTest End = 2146357, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -349,9 +349,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -360,8 +360,8 @@ public class GameJack6 : OpticalMediaImageTest Sectors = 2146358, Md5 = "cea717c199230bef889ce268a473d2e6", LongMd5 = "cea717c199230bef889ce268a473d2e6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -369,8 +369,8 @@ public class GameJack6 : OpticalMediaImageTest End = 2146357, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -379,9 +379,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -390,8 +390,8 @@ public class GameJack6 : OpticalMediaImageTest Sectors = 2146369, Md5 = "a60ea0383c5b39e14e09f47e749a3f46", LongMd5 = "a60ea0383c5b39e14e09f47e749a3f46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -399,8 +399,8 @@ public class GameJack6 : OpticalMediaImageTest End = 2146368, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -409,9 +409,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -420,8 +420,8 @@ public class GameJack6 : OpticalMediaImageTest Sectors = 2146358, Md5 = "cea717c199230bef889ce268a473d2e6", LongMd5 = "cea717c199230bef889ce268a473d2e6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -429,8 +429,8 @@ public class GameJack6 : OpticalMediaImageTest End = 2146357, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -439,9 +439,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -450,8 +450,8 @@ public class GameJack6 : OpticalMediaImageTest Sectors = 2146358, Md5 = "6ba700d9b40b7ef1a9e4f78e317f124d", LongMd5 = "6ba700d9b40b7ef1a9e4f78e317f124d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -459,8 +459,8 @@ public class GameJack6 : OpticalMediaImageTest End = 2146357, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -469,9 +469,9 @@ public class GameJack6 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/HDCopy.cs b/Aaru.Tests/Images/HDCopy.cs index 3d3cf2160..5b98ed6dd 100644 --- a/Aaru.Tests/Images/HDCopy.cs +++ b/Aaru.Tests/Images/HDCopy.cs @@ -42,8 +42,8 @@ public class HDCopy : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "HD-COPY"); public override IMediaImage Plugin => new HdCopy(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DSKA0000.IMG.lz", @@ -67,14 +67,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "9fbe4254ed34991d38a4cde57e867360", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -91,14 +91,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "72abac3d635b24555b3b8fe4d71c6c50", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -115,14 +115,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "dacbe6b6677a76004bc0f8fbeb6c3a83", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -131,14 +131,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "1a642606e79b5fb8e41536c320ba81ea", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -147,14 +147,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2460, SectorSize = 512, Md5 = "66a8bec544008abcd735e51fd19ed00b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2460 } - } + ] }, new BlockImageTestExpected { @@ -163,14 +163,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1280, SectorSize = 512, Md5 = "2840b7b7fb457cbabe3cc8b2f50411d9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1280 } - } + ] }, new BlockImageTestExpected { @@ -179,14 +179,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "28c7d3ee80055b4fd19cd154ac610a3c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -195,14 +195,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1476, SectorSize = 512, Md5 = "19c6430529da8f390bf2cbfc0eaf21e3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1476 } - } + ] }, new BlockImageTestExpected { @@ -211,14 +211,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "0c7ba41e67b07f0f203165b10c0a4e89", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -227,14 +227,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "63267008556ad5704b2cf91049e5e255", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -243,14 +243,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "015f4f812fd5b03741e3dcad534a4a8d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -259,14 +259,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "60ebe39494bccd4d74daaa47003395e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -275,14 +275,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "00260b1a20f19fa618d2acdee59dc471", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -291,14 +291,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "dfb67a1f3c1fe596db30eeac92887583", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -307,14 +307,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "fa5a213b8827cf7341b946e3fd1866cd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -323,14 +323,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "f59f095594fc408cb2de1a977538afad", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -339,14 +339,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "1826a1a29d65411a2d21ed28998d7c43", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -355,14 +355,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3528, SectorSize = 512, Md5 = "16a5d02a2e73be36fec6abb8a671c13e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3528 } - } + ] }, /* TODO: Open error new BlockImageTestExpected @@ -380,14 +380,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "4c45b8baeef58e9ed76eb6782dd8535b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -396,14 +396,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "3c1e16778895a28f15d119c426ed4332", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -412,14 +412,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "dc2b7b7eb6d83ce25a6f51d1e457ca24", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -436,14 +436,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "4e502fab83012d988d9c915cfea00901", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -452,14 +452,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "323322148c4c7394a92fa6a73542e32a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -468,14 +468,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "38d8177e53175fb2cd60362339a548c1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -484,14 +484,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "126dfd25363c076727dfaab03955c931", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -500,14 +500,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 820, SectorSize = 512, Md5 = "e6492aac144f5f6f593b84c64680cf64", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 820 } - } + ] }, new BlockImageTestExpected { @@ -516,14 +516,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "f01541de322c8d6d7321084d7a245e7b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -532,14 +532,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "ba6ec1652ff41bcc687aaf9c4e32dc18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -548,14 +548,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "7973e569ed93beb1ece2e84a5ef3a8d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -564,14 +564,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a793047503af08e83361427b3e2806e0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -580,14 +580,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "ba6ec1652ff41bcc687aaf9c4e32dc18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -596,14 +596,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "6631b66fdfd89319323771c41334c7ba", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -612,14 +612,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "56471a253f4d6803b634e2bbff6c0931", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -628,14 +628,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "9f91d2cfe918c6701d6b267294b092bc", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -644,14 +644,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "28f3cda83fa1e22a420e06704abc6139", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -660,14 +660,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "b057202adb98964e8f630a3299e86490", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -676,14 +676,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "387f7d0468559b619e929db4451b3074", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -692,14 +692,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "c64ef58dc6d875b9f6e7c0a7362c6832", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -708,14 +708,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "be05d1ff10ef8b2220546c4db962ac9e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -724,14 +724,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 820, SectorSize = 512, Md5 = "32823b9009c99b6711e89336ad03ec7f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 820 } - } + ] }, new BlockImageTestExpected { @@ -740,14 +740,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "0bdf9130c07bb5d558a4705249f949d0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -756,14 +756,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2dafeddaa99e7dc0db5ef69e128f9c8e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -772,14 +772,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "589ae671a19e78ffcba5032092c4c0d5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -788,14 +788,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2988, SectorSize = 512, Md5 = "cf0c71b65b56cb6b617d29525bd719dd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2988 } - } + ] }, new BlockImageTestExpected { @@ -804,14 +804,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "152023525154b45ab26687190bac94db", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -820,14 +820,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "db38ecd93f28dd065927fed21917eed5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -836,14 +836,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "716262401bc69f2f440a9c156c21c9e9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -852,14 +852,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "83213865ca6a40c289b22324a32a2608", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -868,14 +868,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "f206c0caa4e0eda37233ab6e89ab5493", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -884,14 +884,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "554492a7b41f4cd9068a3a2b70eb0e5f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -900,14 +900,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "36dd03967a2a3369538cad29b8b74b71", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -916,14 +916,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "4f5c02448e75bbc086e051c728414513", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -932,14 +932,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "f8f951518283d395b6dd662a303e088d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -948,14 +948,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "e6a87175b9dbac1916a735eb2418abd0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -964,14 +964,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "2f576fb4c408d16fa49ef3093a2a3969", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -980,14 +980,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "dab393b265b3b8d82b0eb920bc316299", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -996,14 +996,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "7c13a4f0c223d30916ba218186a42fad", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1012,14 +1012,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3040, SectorSize = 512, Md5 = "e3797cf190f00a7205c0cc68e3977e04", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3040 } - } + ] }, new BlockImageTestExpected { @@ -1028,14 +1028,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "e9de4f065fd056b90b16c3464d501daa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1044,14 +1044,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "cb7cedbe89c2859779f921c44ff0807a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -1060,14 +1060,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3320, SectorSize = 512, Md5 = "db5f924b17bd7f1bf29784ede7b45dbb", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3320 } - } + ] }, new BlockImageTestExpected { @@ -1076,14 +1076,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "2df2eaef283e5be894c0be29ba2feae1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1092,14 +1092,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "57af8042541c13d673ebb04bcdbca81b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -1108,14 +1108,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "afcf6b2f8d762295ea8450aadf8b4319", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -1124,14 +1124,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "ecfc55db0d383c1a2c5e639014954f85", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -1176,14 +1176,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "976b335e4fe2356d16f45c123330249c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -1192,14 +1192,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "9812da7e10dc3ff388907c135360b8bc", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -1208,14 +1208,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "07eefdd2a6261be61af5b29de9dd56ee", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1224,14 +1224,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "6539a5d8ed493940e6a97e39eae0ca3e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -1240,14 +1240,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "01f01805a6b22cad7e82a9cf614b8040", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1256,14 +1256,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "fe4ce9782a5a42bf2bf6b41f7a51d744", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1272,14 +1272,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "f8514aa0d100ad7eb14ef0f472416b67", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -1288,14 +1288,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "5487ed4ca8e165d10ac0f04d8b96bbce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1304,14 +1304,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "0c438ab43509da1863b1fecff8d806aa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1320,14 +1320,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "cd0a831f1668b6ccd99d284513b86461", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1336,14 +1336,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "2a09063703e21f2440d2a9128c29147f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -1352,14 +1352,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "ca24bcbfe70de3c1fd4955a6c12b9a0f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1368,14 +1368,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "ca24bcbfe70de3c1fd4955a6c12b9a0f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1384,14 +1384,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "a22e254f7e3526ec30dc4915a19fcb52", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1400,14 +1400,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "a22e254f7e3526ec30dc4915a19fcb52", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1416,14 +1416,14 @@ public class HDCopy : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "387f7d0468559b619e929db4451b3074", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/HxC/ImageDisk.cs b/Aaru.Tests/Images/HxC/ImageDisk.cs index 5faad5135..3d5b2947a 100644 --- a/Aaru.Tests/Images/HxC/ImageDisk.cs +++ b/Aaru.Tests/Images/HxC/ImageDisk.cs @@ -40,8 +40,8 @@ public class ImageDisk : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "HxC", "ImageDisk"); public override IMediaImage Plugin => new Imd(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "md1dd_8.imd.lz", @@ -89,14 +89,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "fd54916f713d01b670c1a5df5e74a97f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -145,14 +145,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "c533488a21098a62c85f1649abda2803", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -169,14 +169,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "456390a9c6ab05cb458a03c47296de08", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -185,14 +185,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "de3f85896f771b7e5bc4c9e3926d64e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -225,14 +225,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3372, SectorSize = 512, Md5 = "7f9164dc43bffc895db751ba1d9b55a9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3372 } - } + ] }, new BlockImageTestExpected { @@ -249,14 +249,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "dbd52e9e684f97d9e2292811242bb24e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -291,14 +291,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "ccd4431139755c58f340681f63510642", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] } /* TODO: Sector type 119 is not implemented new BlockImageTestExpected @@ -318,5 +318,5 @@ public class ImageDisk : BlockMediaImageTest MD5 = "UNKNOWN" } */ - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/HxC/Raw.cs b/Aaru.Tests/Images/HxC/Raw.cs index 7187d35f4..ec9554702 100644 --- a/Aaru.Tests/Images/HxC/Raw.cs +++ b/Aaru.Tests/Images/HxC/Raw.cs @@ -40,8 +40,8 @@ public class Raw : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "HxC", "raw"); public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "md1dd_8.img.lz", @@ -89,14 +89,14 @@ public class Raw : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "fd54916f713d01b670c1a5df5e74a97f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -153,14 +153,14 @@ public class Raw : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "c533488a21098a62c85f1649abda2803", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -177,14 +177,14 @@ public class Raw : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "456390a9c6ab05cb458a03c47296de08", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -193,14 +193,14 @@ public class Raw : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "de3f85896f771b7e5bc4c9e3926d64e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -233,14 +233,14 @@ public class Raw : BlockMediaImageTest Sectors = 3372, SectorSize = 512, Md5 = "7f9164dc43bffc895db751ba1d9b55a9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3372 } - } + ] }, new BlockImageTestExpected { @@ -257,14 +257,14 @@ public class Raw : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "dbd52e9e684f97d9e2292811242bb24e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -273,14 +273,14 @@ public class Raw : BlockMediaImageTest Sectors = 2888, SectorSize = 512, Md5 = "f5fff7704fb677ebf23d27cd937c9403", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2888 } - } + ] }, new BlockImageTestExpected { @@ -297,14 +297,14 @@ public class Raw : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "ccd4431139755c58f340681f63510642", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] } /* TODO: XDF reading is not implemented new BlockImageTestExpected @@ -324,5 +324,5 @@ public class Raw : BlockMediaImageTest MD5 = "UNKNOWN" } */ - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/HyperV.cs b/Aaru.Tests/Images/HyperV.cs index a079bb7d6..d9a887906 100644 --- a/Aaru.Tests/Images/HyperV.cs +++ b/Aaru.Tests/Images/HyperV.cs @@ -40,8 +40,8 @@ public class HyperV : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "Hyper-V"); public override IMediaImage Plugin => new Vhdx(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "dynamic_exfat.vhdx.lz", @@ -57,8 +57,8 @@ public class HyperV : BlockMediaImageTest Sectors = 409600, SectorSize = 512, Md5 = "f2a720176adb4cf70c04c56b58339024", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 34, @@ -69,7 +69,7 @@ public class HyperV : BlockMediaImageTest Start = 65664, Length = 339968 } - } + ] }, new BlockImageTestExpected { @@ -119,5 +119,5 @@ public class HyperV : BlockMediaImageTest SectorSize = 512, Md5 = "338ba2043d7f9cb2693c35e3194e6c9c" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/ImageDisk.cs b/Aaru.Tests/Images/ImageDisk.cs index 2e447887c..664c00511 100644 --- a/Aaru.Tests/Images/ImageDisk.cs +++ b/Aaru.Tests/Images/ImageDisk.cs @@ -40,8 +40,8 @@ public class ImageDisk : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "ImageDisk"); public override IMediaImage Plugin => new Imd(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "CPM1_ALL.IMD.lz", @@ -49,14 +49,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1280, SectorSize = 512, Md5 = "b5ab1915fc3d7fceecfcd7fda82f6b0d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1280 } - } + ] }, new BlockImageTestExpected { @@ -113,14 +113,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "95ea232f59e44db374b994cfe7f1c07f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -217,14 +217,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2302991363cb3681cffdc4388915b51e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -273,14 +273,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "af83d011608042d35021e39aa5e10b2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -321,14 +321,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "6642c1a32d2c58e93481d664974fc202", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -337,14 +337,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "6642c1a32d2c58e93481d664974fc202", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -353,14 +353,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "5101f89850dc28efbcfb7622086a9ddf", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -369,14 +369,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "8e570be2ed1f00ddea82e50a2d9c446a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -385,14 +385,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "abba2a1ddd60a649047a9c44d94bbeae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -401,14 +401,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "e3bc48bec81be5b35be73d41fdffd2ab", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -417,14 +417,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "43b5068af9d016d1432eb2e12d2b802a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -433,14 +433,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "5bf2ad4dc300592604b6e32f8b8e2656", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -449,14 +449,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "cb9a832ca6a4097b8ccc30d2108e1f7d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -465,14 +465,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "56d181a6bb8713e6b2854fe8887faab6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -481,14 +481,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "41aef7cff26aefda1add8d49c5b962c2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -497,14 +497,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2460, SectorSize = 512, Md5 = "2437c5f089f1cba3866b36360b016f16", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2460 } - } + ] }, new BlockImageTestExpected { @@ -513,14 +513,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1280, SectorSize = 512, Md5 = "bdaa8f17373b265830fdf3a06b794367", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1280 } - } + ] }, new BlockImageTestExpected { @@ -529,14 +529,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "629932c285478d0540ff7936aa008351", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -545,14 +545,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1476, SectorSize = 512, Md5 = "7a2abef5d4701e2e49abb05af8d4da50", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1476 } - } + ] }, new BlockImageTestExpected { @@ -561,14 +561,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "e3507522c914264f44fb2c92c3170c09", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -577,14 +577,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "824fe65dbb1a42b6b94f05405ef984f2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -593,14 +593,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "1a8c2e78e7132cf9ba5d6c2b75876be0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -609,14 +609,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "936b20bb0966fe693b4d5e2353e24846", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -625,14 +625,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "803b01a0b440c2837d37c21308f30cd5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -641,14 +641,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "aa0d31f914760cc4cde75479779ebed6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -657,14 +657,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "5e413433c54f48978d281c6e66d1106e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -673,14 +673,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "4fc28b0128543b2eb70f6432c4c8a980", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -689,14 +689,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3528, SectorSize = 512, Md5 = "24a7459d080cea3a60d131b8fd7dc5d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3528 } - } + ] }, new BlockImageTestExpected { @@ -705,14 +705,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3570, SectorSize = 512, Md5 = "2031b1e16ee2defc0d15f732f633df33", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3570 } - } + ] }, new BlockImageTestExpected { @@ -721,14 +721,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 5100, SectorSize = 512, Md5 = "79e5f1fbd63b87c087d85904d45964e6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 5100 } - } + ] }, new BlockImageTestExpected { @@ -737,14 +737,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 6604, SectorSize = 512, Md5 = "1b2495a8f2274852b6fae80ae6fbff2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 6604 } - } + ] }, new BlockImageTestExpected { @@ -753,14 +753,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 9180, SectorSize = 512, Md5 = "3a70851950ad06c20e3063ad6f128eef", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 9180 } - } + ] }, new BlockImageTestExpected { @@ -769,14 +769,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 10710, SectorSize = 512, Md5 = "98a91bbdbe8454cf64e20d0ec5c35017", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10710 } - } + ] }, new BlockImageTestExpected { @@ -785,14 +785,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 10710, SectorSize = 512, Md5 = "666706f299a1362cb30f34a3a7f555be", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 10710 } - } + ] }, new BlockImageTestExpected { @@ -801,14 +801,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 13770, SectorSize = 512, Md5 = "2fa1eedb57fac492d6f6b71e2c0a079c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 13770 } - } + ] }, new BlockImageTestExpected { @@ -817,14 +817,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "3152c8e3544bbfaceff14b7522faf5af", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -833,14 +833,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "5fc19ca552b6db957061e9a1750394d2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -857,14 +857,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "a33b46f042b78fe3d0b3c5dbb3908a93", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -873,14 +873,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "565d3c001cbb532154aa5d3c65b2439c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -889,14 +889,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "e60442c3ebd72c99bdd7545fdba59613", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -905,14 +905,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "058a33a129539285c9b64010496af52f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -921,14 +921,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "0726ecbc38965d30a6222c3e74cd1aa3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -945,14 +945,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c38d69ac88520f14fcc6d6ced22b065d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -961,14 +961,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "91d51964e1e64ef3f6f622fa19aa833c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -977,14 +977,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "db36d9651c952ff679ec33223c8db2d3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -993,14 +993,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2988, SectorSize = 512, Md5 = "5f1d98806309aee7f81de72e51e6d386", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2988 } - } + ] }, new BlockImageTestExpected { @@ -1009,14 +1009,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "1207a1cc7ff73d4f74c8984b4e7db33f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1025,14 +1025,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "c97a3081fd25474b6b7945b8572d5ab8", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -1041,14 +1041,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "31269ed6464302ae26d22b7c87bceb23", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1145,14 +1145,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 400, SectorSize = 512, Md5 = "d40a99cb549fcfb26fcf9ef01b5dfca7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 400 } - } + ] }, new BlockImageTestExpected { @@ -1161,14 +1161,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 410, SectorSize = 512, Md5 = "7b41dd9ca7eb32828960eb1417a6092a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 410 } - } + ] }, new BlockImageTestExpected { @@ -1177,14 +1177,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "126dfd25363c076727dfaab03955c931", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -1193,14 +1193,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 820, SectorSize = 512, Md5 = "e6492aac144f5f6f593b84c64680cf64", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 820 } - } + ] }, new BlockImageTestExpected { @@ -1209,14 +1209,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "7973e569ed93beb1ece2e84a5ef3a8d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1225,14 +1225,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a793047503af08e83361427b3e2806e0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1241,14 +1241,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "f01541de322c8d6d7321084d7a245e7b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1257,14 +1257,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "ba6ec1652ff41bcc687aaf9c4e32dc18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -1273,14 +1273,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "7973e569ed93beb1ece2e84a5ef3a8d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1289,14 +1289,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a793047503af08e83361427b3e2806e0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1305,14 +1305,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "ba6ec1652ff41bcc687aaf9c4e32dc18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -1321,14 +1321,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "6631b66fdfd89319323771c41334c7ba", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1345,14 +1345,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "7d36aee5a3071ff75b979f3acb649c40", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -1369,14 +1369,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "7851d31fad9302ff45d3ded4fba25387", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -1385,14 +1385,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "915b08c82591e8488320e001b7303b6d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1401,14 +1401,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "5e5ea6fe9adf842221fdc60e56630405", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -1417,14 +1417,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "a22e254f7e3526ec30dc4915a19fcb52", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1433,14 +1433,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ddc6c1200c60e9f7796280f50c2e5283", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1553,14 +1553,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "be05d1ff10ef8b2220546c4db962ac9e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1569,14 +1569,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 820, SectorSize = 512, Md5 = "32823b9009c99b6711e89336ad03ec7f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 820 } - } + ] }, new BlockImageTestExpected { @@ -1585,14 +1585,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "1c8b03a8550ed3e70e1c78316aa445aa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1609,14 +1609,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "0bdf9130c07bb5d558a4705249f949d0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -1625,14 +1625,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2dafeddaa99e7dc0db5ef69e128f9c8e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1641,14 +1641,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "589ae671a19e78ffcba5032092c4c0d5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -1657,14 +1657,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2988, SectorSize = 512, Md5 = "cf0c71b65b56cb6b617d29525bd719dd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2988 } - } + ] }, new BlockImageTestExpected { @@ -1673,14 +1673,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "028769dc0abefab1740cc309432588b6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1689,14 +1689,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "152023525154b45ab26687190bac94db", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1705,14 +1705,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "db38ecd93f28dd065927fed21917eed5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1721,14 +1721,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "716262401bc69f2f440a9c156c21c9e9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1737,14 +1737,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "83213865ca6a40c289b22324a32a2608", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -1753,14 +1753,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "f206c0caa4e0eda37233ab6e89ab5493", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1769,14 +1769,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "554492a7b41f4cd9068a3a2b70eb0e5f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2169,14 +2169,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "87a432496cb23b5c2299545500df3553", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -2265,14 +2265,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "5dc0d482a773043d8683a84c8220df95", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -2289,14 +2289,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "855943f9caecdcce9b06f0098d773c6b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -2305,14 +2305,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "5ac0a9fc7337f761098f816359b0f6f7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2321,14 +2321,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "1ea6ec8e663218b1372048f6e25795b5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2345,14 +2345,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "4b07d760d65f3f0f8ffa5f2b81cee907", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -2361,14 +2361,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "32c044c5c2b0bd13806149a759c14935", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2377,14 +2377,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3040, SectorSize = 512, Md5 = "8752095abc13dba3f3467669da333891", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3040 } - } + ] }, new BlockImageTestExpected { @@ -2393,14 +2393,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "aece7cd34bbba3e75307fa70404d9d30", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -2409,14 +2409,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "5289afb16a6e4a33213e3bcca56c6230", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -2433,14 +2433,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "b96596711f4d2ee85dfda0fe3b9f26c3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2457,14 +2457,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "8f7f7099d4475f6631fcf0a79b031d61", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -2473,14 +2473,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "4feeaf4b4ee5dad85db727fbbda4b6d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -2489,14 +2489,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 400, SectorSize = 512, Md5 = "3c77ca681df78e4cd7baa162aa9b0859", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 400 } - } + ] }, new BlockImageTestExpected { @@ -2505,14 +2505,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "51da1f86c49657ffdb367bb2ddeb7990", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -2539,14 +2539,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "f76f92dd326c99c5efad5ee58daf72e1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -2555,14 +2555,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "b6f2c10e42908e334025bc4ffd81e771", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -2571,14 +2571,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "f2f409ea2a62a7866fd2777cc4fc9739", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2587,14 +2587,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1494, SectorSize = 512, Md5 = "3e441d69cec5c3169274e1379de4af4b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1494 } - } + ] }, new BlockImageTestExpected { @@ -2603,14 +2603,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "30a93f30dd4485c6fc037fe0775d3fc7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2619,14 +2619,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "e0caf02cce5597c98313bcc480366ec7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2635,14 +2635,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "4af4904d2b3c815da7bef7049209f5eb", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -2651,14 +2651,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "39bf5a98bcb2185d855ac06378febcfa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -2667,14 +2667,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "dc20055b6e6fd6f8e1114d4be2effeed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -2691,14 +2691,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "bbba1e2d1418e05c3a4e7b4d585d160b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -2707,14 +2707,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "bca3a045e81617f7f5ebb5a8818eac47", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -2723,14 +2723,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "a296663cb8e75e94603221352f29cfff", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2739,14 +2739,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ecda36ebf0e1100233cb0ec722c18583", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2755,14 +2755,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "cef2f4fe9b1a32d5c0544f814e634264", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -2795,14 +2795,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "9963dd6f19ce6bd56eabeccdfbbd821a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2811,14 +2811,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "acf6604559ae8217f7869823e2429024", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2827,14 +2827,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "23bf2139cdfdc4c16db058fd31ea6481", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -2843,14 +2843,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "fa26adda0415f02057b113ad29c80c8d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2859,14 +2859,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "4f2a8d036fefd6c6c88d99eda3aa12b7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2875,14 +2875,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1386, SectorSize = 512, Md5 = "e794a3ffa4069ea999fdf7146710fa9e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1386 } - } + ] }, new BlockImageTestExpected { @@ -2899,14 +2899,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "ccd4431139755c58f340681f63510642", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -2915,14 +2915,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "fd54916f713d01b670c1a5df5e74a97f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -2947,14 +2947,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "c533488a21098a62c85f1649abda2803", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2963,14 +2963,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "db9cfb6eea18820b7a7e0b5b45594471", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2979,14 +2979,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "1ff7649b679ba22ff20d39ff717dbec8", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2995,14 +2995,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "de3f85896f771b7e5bc4c9e3926d64e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -3027,14 +3027,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "03c2af6a8ebf4bd6f530335de34ae5dd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -3051,14 +3051,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "dbd52e9e684f97d9e2292811242bb24e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -3067,14 +3067,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "b4a602f67903c46eef62addb0780aa56", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -3084,5 +3084,5 @@ public class ImageDisk : BlockMediaImageTest SectorSize = 2048, Md5 = "71194f8dba31d29780bd0a6ecee5ab2b" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/IsoBuster/Cuesheet.cs b/Aaru.Tests/Images/IsoBuster/Cuesheet.cs index 7ee1571f8..a33af7968 100644 --- a/Aaru.Tests/Images/IsoBuster/Cuesheet.cs +++ b/Aaru.Tests/Images/IsoBuster/Cuesheet.cs @@ -42,8 +42,8 @@ public class Cuesheet : OpticalMediaImageTest public override IMediaImage Plugin => new CdrWin(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "gigarec.cue", @@ -51,8 +51,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 469652, Md5 = "b7659466b925296a36390c58c480e4bb", LongMd5 = "51bf2c54fee363520906709cc42a710a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -61,8 +61,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 469652, @@ -70,9 +70,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "New Volume" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -81,8 +81,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 243587, Md5 = "e20824bc6258d8434096c84548f1c4cf", LongMd5 = "e20824bc6258d8434096c84548f1c4cf", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -171,7 +171,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -180,8 +180,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 160956, Md5 = "989122b6c1f0fc135ee6d481bc347295", LongMd5 = "2f58bc40012040bd3c9e4ae56fbbfad3", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -198,15 +198,15 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 34816, ClusterSize = 2048, Type = "pcengine" } - } + ] }, new TrackInfoTestExpected { @@ -320,7 +320,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -329,8 +329,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 246680, Md5 = "0034c2e54afd76387797c7221c4a054b", LongMd5 = "77a9dcd8f5a69d939e076e45602923e0", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -347,8 +347,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -357,7 +357,7 @@ public class Cuesheet : OpticalMediaImageTest Type = "pcfx", VolumeName = "同級生2" } - } + ] }, new TrackInfoTestExpected { @@ -407,7 +407,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -416,8 +416,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 254265, Md5 = "aacfe792d28a17f641c7218ccd35f5ff", LongMd5 = "73e38276225ec2d26c0ace10d42513e1", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -426,8 +426,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -442,9 +442,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -453,8 +453,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 254265, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -463,8 +463,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -479,9 +479,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -490,8 +490,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 308224, Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -500,8 +500,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -510,9 +510,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -521,8 +521,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 277696, Md5 = "b236def899758bd04b8a3105b47126db", LongMd5 = "b236def899758bd04b8a3105b47126db", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -611,7 +611,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -620,8 +620,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 59206, Md5 = "04b7bcd252635eaa8e6b21c1597d44ba", LongMd5 = "b480c86b959c246294a2cc4ad3180cbf", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -646,8 +646,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 18853, @@ -655,9 +655,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "New" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -666,8 +666,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 350134, Md5 = "7b3e4a952c369cd4837cee40f1a567f2", LongMd5 = "d6555969dd70fb2772cd5b979c6fa284", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -676,8 +676,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 600, @@ -693,9 +693,9 @@ public class Cuesheet : OpticalMediaImageTest VolumeName = "InCD", VolumeSerial = "40888C15CA13D401InCD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -704,8 +704,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 329158, Md5 = "546f85b167c61c2e80dec709f4a4bfb5", LongMd5 = "82e40f2e2e36a1ec2eeb89ea154aa7f3", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -714,8 +714,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -723,7 +723,7 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -845,7 +845,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -854,8 +854,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 65536, Md5 = "4bc4eb89184a69d902ecc1f2745ecf32", LongMd5 = "4bc4eb89184a69d902ecc1f2745ecf32", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -896,7 +896,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -905,8 +905,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 51168, Md5 = "671f5b747692780a979b3c4b59b39597", LongMd5 = "4171f86df9f3b8c277958324a48c54d8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -915,8 +915,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 7876, @@ -932,7 +932,7 @@ public class Cuesheet : OpticalMediaImageTest VolumeName = "Session 1", VolumeSerial = "50958B61AF6A749E" } - } + ] }, new TrackInfoTestExpected { @@ -942,8 +942,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 6170, @@ -959,7 +959,7 @@ public class Cuesheet : OpticalMediaImageTest VolumeName = "Session 2", VolumeSerial = "50958BBBAF6A7444" } - } + ] }, new TrackInfoTestExpected { @@ -969,8 +969,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 5360, @@ -986,7 +986,7 @@ public class Cuesheet : OpticalMediaImageTest VolumeName = "Session 3", VolumeSerial = "50958C19AF6A73E6" } - } + ] }, new TrackInfoTestExpected { @@ -996,8 +996,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 4, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 45796, @@ -1013,9 +1013,9 @@ public class Cuesheet : OpticalMediaImageTest VolumeName = "Session 4", VolumeSerial = "50958C82AF6A737D" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1024,8 +1024,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 230624, Md5 = "020993315e49ab0d36bc7248819162ea", LongMd5 = "020993315e49ab0d36bc7248819162ea", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1033,8 +1033,8 @@ public class Cuesheet : OpticalMediaImageTest End = 24063, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 22016, @@ -1042,7 +1042,7 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "Session 1" } - } + ] }, new TrackInfoTestExpected { @@ -1061,7 +1061,7 @@ public class Cuesheet : OpticalMediaImageTest } }*/ } - } + ] }, new OpticalImageTestExpected { @@ -1070,8 +1070,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 257264, Md5 = "dff8f2107a4ea9633a88ce38ff609b8e", LongMd5 = "dff8f2107a4ea9633a88ce38ff609b8e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1079,8 +1079,8 @@ public class Cuesheet : OpticalMediaImageTest End = 235247, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 206560, @@ -1088,7 +1088,7 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "Session 1" } - } + ] }, new TrackInfoTestExpected { @@ -1107,7 +1107,7 @@ public class Cuesheet : OpticalMediaImageTest } }*/ } - } + ] }, new OpticalImageTestExpected { @@ -1116,8 +1116,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 48794, Md5 = "22d646f182b79efcf8915fd01f484391", LongMd5 = "72243676a71ff7a3161dce368d3ddc71", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1126,8 +1126,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -1135,7 +1135,7 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -1145,7 +1145,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 152, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/KryoFlux/Raw.cs b/Aaru.Tests/Images/KryoFlux/Raw.cs index c5795214b..00bfa9fe6 100644 --- a/Aaru.Tests/Images/KryoFlux/Raw.cs +++ b/Aaru.Tests/Images/KryoFlux/Raw.cs @@ -40,8 +40,8 @@ public class Raw : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "KryoFlux", "raw"); public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "mf1dd_gcr_s0.img.lz", @@ -90,5 +90,5 @@ public class Raw : BlockMediaImageTest SectorSize = 512, Md5 = "9dea1e119a73a21a38d134f36b2e5564" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/Lisa/Raw.cs b/Aaru.Tests/Images/Lisa/Raw.cs index 62236fe42..2f724c8ba 100644 --- a/Aaru.Tests/Images/Lisa/Raw.cs +++ b/Aaru.Tests/Images/Lisa/Raw.cs @@ -42,8 +42,8 @@ public class Raw : BlockMediaImageTest public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "profile_los202.raw.lz", @@ -92,5 +92,5 @@ public class Raw : BlockMediaImageTest SectorSize = 512, Md5 = "dd146bc14be87d5ad98b961dd462f469" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/MAME/v1.cs b/Aaru.Tests/Images/MAME/v1.cs index fdaac67a1..ba18aaca0 100644 --- a/Aaru.Tests/Images/MAME/v1.cs +++ b/Aaru.Tests/Images/MAME/v1.cs @@ -40,8 +40,8 @@ public class V1 : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "MAME", "v1"); public override IMediaImage Plugin => new Chd(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "hdd.chd", @@ -50,5 +50,5 @@ public class V1 : BlockMediaImageTest SectorSize = 512, Md5 = "43476343f53a177dd57b68dd769917aa" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/MAME/v3.cs b/Aaru.Tests/Images/MAME/v3.cs index 235ff7453..a627c2c65 100644 --- a/Aaru.Tests/Images/MAME/v3.cs +++ b/Aaru.Tests/Images/MAME/v3.cs @@ -40,8 +40,8 @@ public class V3 : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "MAME", "v3"); public override IMediaImage Plugin => new Chd(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "gigarec.chd", @@ -51,8 +51,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -61,7 +61,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -80,8 +80,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -210,7 +210,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -221,8 +221,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -287,7 +287,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -298,8 +298,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -412,7 +412,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -423,8 +423,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -433,7 +433,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -444,8 +444,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -454,7 +454,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -465,8 +465,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -475,7 +475,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -486,8 +486,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -504,7 +504,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -515,8 +515,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -645,7 +645,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -656,8 +656,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -666,7 +666,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -677,8 +677,8 @@ public class V3 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -695,7 +695,7 @@ public class V3 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/MAME/v4.cs b/Aaru.Tests/Images/MAME/v4.cs index 77b509051..8feefbd12 100644 --- a/Aaru.Tests/Images/MAME/v4.cs +++ b/Aaru.Tests/Images/MAME/v4.cs @@ -40,8 +40,8 @@ public class V4 : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "MAME", "v4"); public override IMediaImage Plugin => new Chd(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "gigarec.chd", @@ -51,8 +51,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -61,7 +61,7 @@ public class V4 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -80,8 +80,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -170,7 +170,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -181,8 +181,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -311,7 +311,7 @@ public class V4 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -322,8 +322,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -388,7 +388,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -399,8 +399,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -513,7 +513,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -524,8 +524,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -534,7 +534,7 @@ public class V4 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -545,8 +545,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -555,7 +555,7 @@ public class V4 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -566,8 +566,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -576,7 +576,7 @@ public class V4 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -587,8 +587,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -677,7 +677,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -688,8 +688,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -714,7 +714,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -725,8 +725,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -735,7 +735,7 @@ public class V4 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -746,8 +746,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -876,7 +876,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -887,8 +887,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -929,7 +929,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -940,8 +940,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -974,7 +974,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -985,8 +985,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1003,7 +1003,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1014,8 +1014,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1032,7 +1032,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1043,8 +1043,8 @@ public class V4 : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1061,7 +1061,7 @@ public class V4 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/MAME/v5/compressed.cs b/Aaru.Tests/Images/MAME/v5/compressed.cs index acb225d56..79f96d63d 100644 --- a/Aaru.Tests/Images/MAME/v5/compressed.cs +++ b/Aaru.Tests/Images/MAME/v5/compressed.cs @@ -42,8 +42,8 @@ public class Compressed : OpticalMediaImageTest public override IMediaImage Plugin => new Chd(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "gigarec.chd", @@ -53,8 +53,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -63,7 +63,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -82,8 +82,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -172,7 +172,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -183,8 +183,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -313,7 +313,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -324,8 +324,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -390,7 +390,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -401,8 +401,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -515,7 +515,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -526,8 +526,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -536,7 +536,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -547,8 +547,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -557,7 +557,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -568,8 +568,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -578,7 +578,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -589,8 +589,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -679,7 +679,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -690,8 +690,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -716,7 +716,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -727,8 +727,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -737,7 +737,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -748,8 +748,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -878,7 +878,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -889,8 +889,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -931,7 +931,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -942,8 +942,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -976,7 +976,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -987,8 +987,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1005,7 +1005,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1016,8 +1016,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1034,7 +1034,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1045,8 +1045,8 @@ public class Compressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1063,7 +1063,7 @@ public class Compressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/MAME/v5/uncompressed.cs b/Aaru.Tests/Images/MAME/v5/uncompressed.cs index 66f1e41b8..5787f5a9c 100644 --- a/Aaru.Tests/Images/MAME/v5/uncompressed.cs +++ b/Aaru.Tests/Images/MAME/v5/uncompressed.cs @@ -42,8 +42,8 @@ public class Uncompressed : OpticalMediaImageTest public override IMediaImage Plugin => new Chd(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "gigarec.chd", @@ -53,8 +53,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -63,7 +63,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -82,8 +82,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -172,7 +172,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -183,8 +183,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -313,7 +313,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -324,8 +324,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -390,7 +390,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -401,8 +401,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -515,7 +515,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -526,8 +526,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -536,7 +536,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -547,8 +547,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -557,7 +557,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -568,8 +568,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -578,7 +578,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -589,8 +589,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -679,7 +679,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -690,8 +690,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -716,7 +716,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -727,8 +727,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -737,7 +737,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -748,8 +748,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -878,7 +878,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -889,8 +889,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -931,7 +931,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -942,8 +942,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -976,7 +976,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -987,8 +987,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1005,7 +1005,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1016,8 +1016,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1034,7 +1034,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1045,8 +1045,8 @@ public class Uncompressed : OpticalMediaImageTest Md5 = "UNKNOWN", LongMd5 = "UNKNOWN", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1063,7 +1063,7 @@ public class Uncompressed : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/MagicISO/Cuesheet.cs b/Aaru.Tests/Images/MagicISO/Cuesheet.cs index 9383e2117..4ed6bddce 100644 --- a/Aaru.Tests/Images/MagicISO/Cuesheet.cs +++ b/Aaru.Tests/Images/MagicISO/Cuesheet.cs @@ -42,8 +42,8 @@ public class Cuesheet : OpticalMediaImageTest public override IMediaImage Plugin => new CdrWin(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "cdiready_the_apprentice.cue", @@ -51,8 +51,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 279299, Md5 = "ab350df419f96d967f51d0161ebeba63", LongMd5 = "ab350df419f96d967f51d0161ebeba63", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -229,7 +229,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -238,8 +238,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 247072, Md5 = "277e98295297f618cc63687e98288d7e", LongMd5 = "277e98295297f618cc63687e98288d7e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -352,7 +352,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -361,8 +361,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 254264, Md5 = "2de6dd5eaa71c1a97625bab68382da60", LongMd5 = "222edd2c920b63aefe2087ed6278abe6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -371,8 +371,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -387,9 +387,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -398,8 +398,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 308223, Md5 = "f1510c82ea4ff535415833242adddac6", LongMd5 = "22bd168e59e075229821448b60d1820b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -408,8 +408,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -418,9 +418,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -429,16 +429,16 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 1218959, Md5 = "fa58d5645e091cc3f0c87998c819955e", LongMd5 = "fa58d5645e091cc3f0c87998c819955e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, Start = 0, End = 1218958, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -447,9 +447,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -458,16 +458,16 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 2236703, Md5 = "c02a2cf88af17ed8333af2e7d4560e40", LongMd5 = "c02a2cf88af17ed8333af2e7d4560e40", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, Start = 0, End = 2236702, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -476,9 +476,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -487,15 +487,15 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 3455935, Md5 = "e71164a331f656e30025c39956e35372", LongMd5 = "e71164a331f656e30025c39956e35372", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, Start = 0, End = 3455934 } - } + ] }, new OpticalImageTestExpected { @@ -504,16 +504,16 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 2146367, Md5 = "fa1beeef4c4f1493f306a13f4fd113b2", LongMd5 = "fa1beeef4c4f1493f306a13f4fd113b2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, Start = 0, End = 2146366, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -522,9 +522,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -533,16 +533,16 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 2295103, Md5 = "767692b526a7ea7020e7144d6d7cadab", LongMd5 = "767692b526a7ea7020e7144d6d7cadab", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, Start = 0, End = 2295102, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -551,9 +551,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, /* This image is invalid an impossible to process properly due to a bug in MagicISO new OpticalImageTestExpected @@ -686,8 +686,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 329157, Md5 = "cc6354d06b009b0446012842c7f94be7", LongMd5 = "bb3ebf139ebb76fff1b229a379d289e4", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -816,7 +816,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/MagicISO/Nero.cs b/Aaru.Tests/Images/MagicISO/Nero.cs index d65ce4ed2..7d5666e53 100644 --- a/Aaru.Tests/Images/MagicISO/Nero.cs +++ b/Aaru.Tests/Images/MagicISO/Nero.cs @@ -39,8 +39,8 @@ public class Nero : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "MagicISO", "Nero"); public override IMediaImage Plugin => new Aaru.Images.Nero(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "cdiready_the_apprentice.nrg", @@ -48,8 +48,8 @@ public class Nero : OpticalMediaImageTest Sectors = 279300, Md5 = "7557c72d4cf6df8bc1896388b863727a", LongMd5 = "7557c72d4cf6df8bc1896388b863727a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -226,7 +226,7 @@ public class Nero : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -235,8 +235,8 @@ public class Nero : OpticalMediaImageTest Sectors = 247073, Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -349,7 +349,7 @@ public class Nero : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -358,8 +358,8 @@ public class Nero : OpticalMediaImageTest Sectors = 254265, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -368,8 +368,8 @@ public class Nero : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -384,9 +384,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -395,8 +395,8 @@ public class Nero : OpticalMediaImageTest Sectors = 308224, Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -405,8 +405,8 @@ public class Nero : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -415,9 +415,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -426,8 +426,8 @@ public class Nero : OpticalMediaImageTest Sectors = 1218811, Md5 = "e2d40f64b4ae274c3ef55252fbda99cf", LongMd5 = "e2d40f64b4ae274c3ef55252fbda99cf", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -435,8 +435,8 @@ public class Nero : OpticalMediaImageTest End = 1218810, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -445,9 +445,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -456,8 +456,8 @@ public class Nero : OpticalMediaImageTest Sectors = 2236555, Md5 = "d46730ef92b0115505d9035f78d90ca3", LongMd5 = "d46730ef92b0115505d9035f78d90ca3", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -465,8 +465,8 @@ public class Nero : OpticalMediaImageTest End = 2236554, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -475,9 +475,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -486,8 +486,8 @@ public class Nero : OpticalMediaImageTest Sectors = 13099755, Md5 = "3b36362c20c5a75cb4726d64a7e2729c", LongMd5 = "3b36362c20c5a75cb4726d64a7e2729c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -495,8 +495,8 @@ public class Nero : OpticalMediaImageTest End = 13099754, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 13099755, @@ -505,9 +505,9 @@ public class Nero : OpticalMediaImageTest VolumeName = "Test DVD", VolumeSerial = "483E25D50034BBB0" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -516,8 +516,8 @@ public class Nero : OpticalMediaImageTest Sectors = 2146219, Md5 = "117c7207751e4d94d6b396f77d3ef367", LongMd5 = "117c7207751e4d94d6b396f77d3ef367", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -525,8 +525,8 @@ public class Nero : OpticalMediaImageTest End = 2146218, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -535,9 +535,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -546,8 +546,8 @@ public class Nero : OpticalMediaImageTest Sectors = 2294955, Md5 = "3313752e2493fce618ced27aecffc79b", LongMd5 = "3313752e2493fce618ced27aecffc79b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -555,8 +555,8 @@ public class Nero : OpticalMediaImageTest End = 2294954, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -565,9 +565,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -576,8 +576,8 @@ public class Nero : OpticalMediaImageTest Sectors = 303316, Md5 = "ca5698b203534de70dd82916d33aae99", LongMd5 = "bf1cd9a3b5dca86ac03ffe51c962840e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -690,8 +690,8 @@ public class Nero : OpticalMediaImageTest Pregap = 11398, Flags = 4, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -699,9 +699,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -710,8 +710,8 @@ public class Nero : OpticalMediaImageTest Sectors = 329158, Md5 = "d22fde4f71e3faa8f048770ae9d7635e", LongMd5 = "bced53ad182fe1b13ecd05caf1fe73a7", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -720,8 +720,8 @@ public class Nero : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -729,7 +729,7 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -851,7 +851,7 @@ public class Nero : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -860,8 +860,8 @@ public class Nero : OpticalMediaImageTest Sectors = 2146219, Md5 = "117c7207751e4d94d6b396f77d3ef367", LongMd5 = "117c7207751e4d94d6b396f77d3ef367", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -869,8 +869,8 @@ public class Nero : OpticalMediaImageTest End = 2146218, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -879,9 +879,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -890,8 +890,8 @@ public class Nero : OpticalMediaImageTest Sectors = 2146219, Md5 = "117c7207751e4d94d6b396f77d3ef367", LongMd5 = "117c7207751e4d94d6b396f77d3ef367", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -899,8 +899,8 @@ public class Nero : OpticalMediaImageTest End = 2146218, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -909,9 +909,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/MaxiDisk.cs b/Aaru.Tests/Images/MaxiDisk.cs index d4bb591ce..278680fc9 100644 --- a/Aaru.Tests/Images/MaxiDisk.cs +++ b/Aaru.Tests/Images/MaxiDisk.cs @@ -39,8 +39,8 @@ public class MaxiDisk : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "MaxiDisk"); public override IMediaImage Plugin => new Aaru.Images.MaxiDisk(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "3DF800.HDK.lz", @@ -48,14 +48,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "26532a62985b51a2c3b877a57f6d257b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -64,14 +64,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "9827ba1b3e9cac41263caabd862e78f9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -80,14 +80,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 5760, SectorSize = 512, Md5 = "4aeafaf2a088d6a7406856dce8118567", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 5760 } - } + ] }, new BlockImageTestExpected { @@ -96,14 +96,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "2bfd2e0a81bad704f8fc7758358cfcca", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -112,14 +112,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "7e3bf04f3660dd1052a335dc99441e44", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -128,14 +128,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "8eb8cb310feaf03c69fffd4f6e729847", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -144,14 +144,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "a58fd062f024b95714f1223a8bc2232f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -160,14 +160,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "00e61c06bf29f0c04a7eabe2dbd7efb6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -176,14 +176,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "d81f5cb64fd0b99f138eab34110bbc3c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -192,14 +192,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "a89006a75d13bee9202d1d6e52721ccb", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -208,14 +208,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "beef1cdb004dc69391d6b3d508988b95", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -232,14 +232,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "073a172879a71339ef4b00ebb47b67fc", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -248,14 +248,14 @@ public class MaxiDisk : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "02259cd5fbcc20f8484aa6bece7a37c6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/NHDr0.cs b/Aaru.Tests/Images/NHDr0.cs index ccacba151..5624f4a76 100644 --- a/Aaru.Tests/Images/NHDr0.cs +++ b/Aaru.Tests/Images/NHDr0.cs @@ -42,8 +42,8 @@ public class NHDr0 : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "T-98 Next"); public override IMediaImage Plugin => new Nhdr0(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "t98n_128.nhd.lz", @@ -100,5 +100,5 @@ public class NHDr0 : BlockMediaImageTest SectorSize = 512, Md5 = "fe9ecc6f0b5beb9635a1595155941925" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/Nero/V1.cs b/Aaru.Tests/Images/Nero/V1.cs index 501ead965..bddfb89b7 100644 --- a/Aaru.Tests/Images/Nero/V1.cs +++ b/Aaru.Tests/Images/Nero/V1.cs @@ -50,8 +50,8 @@ public class V1 : OpticalMediaImageTest Sectors = 279300, Md5 = "7557c72d4cf6df8bc1896388b863727a", LongMd5 = "7557c72d4cf6df8bc1896388b863727a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -228,7 +228,7 @@ public class V1 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -238,8 +238,8 @@ public class V1 : OpticalMediaImageTest Md5 = "79ade978aad90667f272a693012c11ca", LongMd5 = "79ade978aad90667f272a693012c11ca", SubchannelMd5 = "83ec1010fc44694d69dc48bacec5481a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -328,7 +328,7 @@ public class V1 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -338,8 +338,8 @@ public class V1 : OpticalMediaImageTest Md5 = "8218b4aeea658111957fa3815a139e74", LongMd5 = "58b875ac8cb3b6b1f426bc734c3400e4", SubchannelMd5 = "9e9a6b51bc2e5ec67400cb33ad0ca33f", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -356,15 +356,15 @@ public class V1 : OpticalMediaImageTest Pregap = 225, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 28672, ClusterSize = 2048, Type = "pcengine" } - } + ] }, new TrackInfoTestExpected { @@ -478,7 +478,7 @@ public class V1 : OpticalMediaImageTest Pregap = 225, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -488,8 +488,8 @@ public class V1 : OpticalMediaImageTest Md5 = "24ff2f3451489a71ee502475137cccc3", LongMd5 = "891ebf5e6bd2eda7445f02958cc4fbd5", SubchannelMd5 = "e3a0d78b6c32f5795b1b513bd13a6bda", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -506,8 +506,8 @@ public class V1 : OpticalMediaImageTest Pregap = 225, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -516,7 +516,7 @@ public class V1 : OpticalMediaImageTest Type = "pcfx", VolumeName = "同級生2" } - } + ] }, new TrackInfoTestExpected { @@ -566,7 +566,7 @@ public class V1 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -576,8 +576,8 @@ public class V1 : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "9da6ad8f6f0cadd92509c10809da7296", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -690,7 +690,7 @@ public class V1 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -700,8 +700,8 @@ public class V1 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "1994c303674718c74b35f9a4ea1d3515", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -710,8 +710,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -726,9 +726,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -738,8 +738,8 @@ public class V1 : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "6fe81a972e750c68e08f6935e4d91e34", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -748,8 +748,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -758,9 +758,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -770,8 +770,8 @@ public class V1 : OpticalMediaImageTest Md5 = "97e5bf1caf3998e818d40cd845c6ecc9", LongMd5 = "07b4d88c8f38cc0168a2f5725b31c52e", SubchannelMd5 = "e6f7319532f46c3fa4fd3569c65546e1", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -884,8 +884,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -893,9 +893,9 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -905,8 +905,8 @@ public class V1 : OpticalMediaImageTest Md5 = "7c8fc7bb768cff15d702ac8cd10108d7", LongMd5 = "7c8fc7bb768cff15d702ac8cd10108d7", SubchannelMd5 = "ca781a7afc4eb77c51f7c551ed45c03c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -995,7 +995,7 @@ public class V1 : OpticalMediaImageTest Pregap = 0, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -1005,8 +1005,8 @@ public class V1 : OpticalMediaImageTest Md5 = "684122981d4d762daf7b9e559584bccf", LongMd5 = "f3c26446201534c3635f4d2633310e45", SubchannelMd5 = "65f938f7f9ac34fabd3ab94c14eb76b5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1015,8 +1015,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 6, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 600, @@ -1032,9 +1032,9 @@ public class V1 : OpticalMediaImageTest VolumeName = "InCD", VolumeSerial = "40888C15CA13D401InCD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1044,8 +1044,8 @@ public class V1 : OpticalMediaImageTest Md5 = "a34e29e42b60023a6ae59f37d2bd4bea", LongMd5 = "e981f7dfdb522ba937fe75474e23a446", SubchannelMd5 = "f8c96f120cac18c52178b99ef4c4e2a9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1054,8 +1054,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -1063,7 +1063,7 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -1185,7 +1185,7 @@ public class V1 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1195,8 +1195,8 @@ public class V1 : OpticalMediaImageTest Md5 = "1b13a8f8aeb23f0b8bbc68518217e771", LongMd5 = "1b13a8f8aeb23f0b8bbc68518217e771", SubchannelMd5 = "25bae9e30657e2f64a45e5f690e3ae9e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1237,7 +1237,7 @@ public class V1 : OpticalMediaImageTest Pregap = 0, Flags = 1 } - } + ] }, new OpticalImageTestExpected { @@ -1247,8 +1247,8 @@ public class V1 : OpticalMediaImageTest Md5 = "5c35db53f7d4d9acce660de76eb81654", LongMd5 = "e8737ac5b670175abfa6dc927098abab", SubchannelMd5 = "48656afdbc40b6df06486a04a4d62401", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1257,8 +1257,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 7876, @@ -1274,7 +1274,7 @@ public class V1 : OpticalMediaImageTest VolumeName = "Session 1", VolumeSerial = "50958B61AF6A749E" } - } + ] }, new TrackInfoTestExpected { @@ -1284,8 +1284,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 6170, @@ -1301,7 +1301,7 @@ public class V1 : OpticalMediaImageTest VolumeName = "Session 2", VolumeSerial = "50958BBBAF6A7444" } - } + ] }, new TrackInfoTestExpected { @@ -1311,8 +1311,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 5360, @@ -1328,7 +1328,7 @@ public class V1 : OpticalMediaImageTest VolumeName = "Session 3", VolumeSerial = "50958C19AF6A73E6" } - } + ] }, new TrackInfoTestExpected { @@ -1338,8 +1338,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 4, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 45796, @@ -1355,9 +1355,9 @@ public class V1 : OpticalMediaImageTest VolumeName = "Session 4", VolumeSerial = "50958C82AF6A737D" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1367,8 +1367,8 @@ public class V1 : OpticalMediaImageTest Md5 = "5412af85d30455e1466644ea97d1adae", LongMd5 = "610f972fa2e1c5988e4bd0f912b0f12f", SubchannelMd5 = "935a91f5850352818d92b71f1c87c393", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1377,8 +1377,8 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -1386,7 +1386,7 @@ public class V1 : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -1396,7 +1396,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1405,8 +1405,8 @@ public class V1 : OpticalMediaImageTest Sectors = 279196, Md5 = "cce718c0d4d60eb9a0571cd0ae7e2ff2", LongMd5 = "cce718c0d4d60eb9a0571cd0ae7e2ff2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1495,7 +1495,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1504,8 +1504,8 @@ public class V1 : OpticalMediaImageTest Sectors = 277696, Md5 = "0c355a31a7a488ec387c4508c498d6c0", LongMd5 = "0c355a31a7a488ec387c4508c498d6c0", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1594,7 +1594,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1603,8 +1603,8 @@ public class V1 : OpticalMediaImageTest Sectors = 83078, Md5 = "6cdbcf18acc4c5edd7cc8d6e744dfda7", LongMd5 = "25fee97101ad661bb719ee008a1404c0", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1613,7 +1613,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1622,8 +1622,8 @@ public class V1 : OpticalMediaImageTest Sectors = 83084, Md5 = "25f3dca4291f9c79bfa5592a3e050e8f", LongMd5 = "3acc918a3633f16c4242a39b76af3b35", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1632,7 +1632,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1641,8 +1641,8 @@ public class V1 : OpticalMediaImageTest Sectors = 83084, Md5 = "25f3dca4291f9c79bfa5592a3e050e8f", LongMd5 = "3acc918a3633f16c4242a39b76af3b35", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1651,7 +1651,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1660,8 +1660,8 @@ public class V1 : OpticalMediaImageTest Sectors = 83078, Md5 = "6cdbcf18acc4c5edd7cc8d6e744dfda7", LongMd5 = "25fee97101ad661bb719ee008a1404c0", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1670,7 +1670,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1679,8 +1679,8 @@ public class V1 : OpticalMediaImageTest Sectors = 85733, Md5 = "d4088d90592000fbe3f8da5d6822aab1", LongMd5 = "761122bad9da6699773436a9f6ce753b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1689,7 +1689,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1698,8 +1698,8 @@ public class V1 : OpticalMediaImageTest Sectors = 85733, Md5 = "1ec9d3cb33dd32b82d338ebf5c4da09c", LongMd5 = "f85fd68d3d159dbe417ccd39b221827a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1708,7 +1708,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1717,8 +1717,8 @@ public class V1 : OpticalMediaImageTest Sectors = 83092, Md5 = "d9627277c18e16ab83da11e0c86afb8f", LongMd5 = "1ccd0e946b422fea751bddfde2ef245c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1727,7 +1727,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1736,8 +1736,8 @@ public class V1 : OpticalMediaImageTest Sectors = 83092, Md5 = "50e24226e31ad48de312135a5d3410bb", LongMd5 = "99f99437dadf65e1acac27fa68495525", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1746,7 +1746,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1755,8 +1755,8 @@ public class V1 : OpticalMediaImageTest Sectors = 83092, Md5 = "50e24226e31ad48de312135a5d3410bb", LongMd5 = "99f99437dadf65e1acac27fa68495525", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1765,7 +1765,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1774,8 +1774,8 @@ public class V1 : OpticalMediaImageTest Sectors = 83092, Md5 = "d9627277c18e16ab83da11e0c86afb8f", LongMd5 = "1ccd0e946b422fea751bddfde2ef245c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1784,7 +1784,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1793,8 +1793,8 @@ public class V1 : OpticalMediaImageTest Sectors = 85747, Md5 = "9eef8934d6354be6fe6d03630d19de9e", LongMd5 = "c7ac66550c45dae54bc456070f408ff7", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1803,7 +1803,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1812,8 +1812,8 @@ public class V1 : OpticalMediaImageTest Sectors = 85747, Md5 = "046d55938e6d075f40e738d0f3f1161a", LongMd5 = "86c65c7e9fcf61eb6fe28d3bfc749da8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1822,7 +1822,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1831,8 +1831,8 @@ public class V1 : OpticalMediaImageTest Sectors = 325928, Md5 = "666cf279a98e99a28af0347cac190118", LongMd5 = "d7dc3fe279da7643882818751b9e0ac0", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1929,7 +1929,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1938,8 +1938,8 @@ public class V1 : OpticalMediaImageTest Sectors = 324278, Md5 = "7a82a04d2e6b283337e42b93a52f5083", LongMd5 = "c17ccaaf93dc07444cd9f03dc27a3b9f", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2036,7 +2036,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -2045,8 +2045,8 @@ public class V1 : OpticalMediaImageTest Sectors = 84985, Md5 = "34ef81d7871dcb2911cd4c682c8413fe", LongMd5 = "22f62fe5f6b6fe696e582ab879d44508", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2055,7 +2055,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2064,8 +2064,8 @@ public class V1 : OpticalMediaImageTest Sectors = 84985, Md5 = "549c2a6729fbecf222b85a0fc71a8ce5", LongMd5 = "a1236fa2aa68dc2fea157930ec0d0b62", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2074,7 +2074,7 @@ public class V1 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] } #region These test images violate the specifications and are not expected to work yet diff --git a/Aaru.Tests/Images/Nero/V2.cs b/Aaru.Tests/Images/Nero/V2.cs index 4df95e33e..b8e1822af 100644 --- a/Aaru.Tests/Images/Nero/V2.cs +++ b/Aaru.Tests/Images/Nero/V2.cs @@ -51,8 +51,8 @@ public class V2 : OpticalMediaImageTest Md5 = "7557c72d4cf6df8bc1896388b863727a", LongMd5 = "7557c72d4cf6df8bc1896388b863727a", SubchannelMd5 = "08cda0c6092a6d831712f56e676c021a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -229,7 +229,7 @@ public class V2 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -239,8 +239,8 @@ public class V2 : OpticalMediaImageTest Md5 = "49dbfa68a7b3873d376fabec174be493", LongMd5 = "49dbfa68a7b3873d376fabec174be493", SubchannelMd5 = "aaa144eb86936ebd352193c836e62d48", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -329,7 +329,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -339,8 +339,8 @@ public class V2 : OpticalMediaImageTest Md5 = "95fa1df73ec2dbe008cb691495af6344", LongMd5 = "6649f47b6829715c1d1ca74e17ac7c0b", SubchannelMd5 = "8527822753d8123e9a01507a9acc8956", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -349,7 +349,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -359,8 +359,8 @@ public class V2 : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "9da6ad8f6f0cadd92509c10809da7296", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -473,7 +473,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -483,8 +483,8 @@ public class V2 : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "1994c303674718c74b35f9a4ea1d3515", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -493,8 +493,8 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -509,9 +509,9 @@ public class V2 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -521,8 +521,8 @@ public class V2 : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "6fe81a972e750c68e08f6935e4d91e34", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -531,8 +531,8 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -541,9 +541,9 @@ public class V2 : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -552,8 +552,8 @@ public class V2 : OpticalMediaImageTest Sectors = 3455936, Md5 = "692148a01b4204160b088141fb52bd70", LongMd5 = "692148a01b4204160b088141fb52bd70", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -561,8 +561,8 @@ public class V2 : OpticalMediaImageTest End = 3455935, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 3455936, @@ -571,9 +571,9 @@ public class V2 : OpticalMediaImageTest VolumeName = "Test DVD", VolumeSerial = "483E25D50034BBB0" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -582,8 +582,8 @@ public class V2 : OpticalMediaImageTest Sectors = 2295104, Md5 = "759e9c19389aee07f88a994132b6f8d9", LongMd5 = "759e9c19389aee07f88a994132b6f8d9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -591,8 +591,8 @@ public class V2 : OpticalMediaImageTest End = 2295103, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -601,9 +601,9 @@ public class V2 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -612,8 +612,8 @@ public class V2 : OpticalMediaImageTest Sectors = 1218960, Md5 = "c22b7796791cd4299d74863ed04496c6", LongMd5 = "c22b7796791cd4299d74863ed04496c6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -621,8 +621,8 @@ public class V2 : OpticalMediaImageTest End = 1218959, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -631,9 +631,9 @@ public class V2 : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -642,8 +642,8 @@ public class V2 : OpticalMediaImageTest Sectors = 2236704, Md5 = "00b1d7c5e9855959a4d2f6b796aeaf4c", LongMd5 = "00b1d7c5e9855959a4d2f6b796aeaf4c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -651,8 +651,8 @@ public class V2 : OpticalMediaImageTest End = 2236703, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -661,9 +661,9 @@ public class V2 : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -672,8 +672,8 @@ public class V2 : OpticalMediaImageTest Sectors = 2146368, Md5 = "106f141400355476b499213f36a363f9", LongMd5 = "106f141400355476b499213f36a363f9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -681,8 +681,8 @@ public class V2 : OpticalMediaImageTest End = 2146367, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -691,9 +691,9 @@ public class V2 : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -703,8 +703,8 @@ public class V2 : OpticalMediaImageTest Md5 = "7174351b366e423082846c7e396905ff", LongMd5 = "0988146c02c49fe563894d0e24435bbc", SubchannelMd5 = "758e4933c5703b9d90db0766dcb47b79", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -817,8 +817,8 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -826,9 +826,9 @@ public class V2 : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -838,8 +838,8 @@ public class V2 : OpticalMediaImageTest Md5 = "7c8fc7bb768cff15d702ac8cd10108d7", LongMd5 = "7c8fc7bb768cff15d702ac8cd10108d7", SubchannelMd5 = "c0bc1ac22c7e0e53407836c8f2331a94", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -928,7 +928,7 @@ public class V2 : OpticalMediaImageTest Pregap = 0, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -938,8 +938,8 @@ public class V2 : OpticalMediaImageTest Md5 = "4a76893cf5e5bee7016692b8f26504e3", LongMd5 = "f633fb0d3e63ded81118df8d955517a3", SubchannelMd5 = "d6257be337751e6f10effacaa82d8350", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -948,8 +948,8 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 6, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 600, @@ -965,9 +965,9 @@ public class V2 : OpticalMediaImageTest VolumeName = "InCD", VolumeSerial = "40888C15CA13D401InCD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -977,8 +977,8 @@ public class V2 : OpticalMediaImageTest Md5 = "a34e29e42b60023a6ae59f37d2bd4bea", LongMd5 = "e981f7dfdb522ba937fe75474e23a446", SubchannelMd5 = "d6ba23bc1118deb2db4a609e72437385", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -987,8 +987,8 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -996,7 +996,7 @@ public class V2 : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -1118,7 +1118,7 @@ public class V2 : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1128,8 +1128,8 @@ public class V2 : OpticalMediaImageTest Md5 = "1b13a8f8aeb23f0b8bbc68518217e771", LongMd5 = "1b13a8f8aeb23f0b8bbc68518217e771", SubchannelMd5 = "1a2583cb21730c2ed4f1c53fadffa60a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1170,7 +1170,7 @@ public class V2 : OpticalMediaImageTest Pregap = 0, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -1180,8 +1180,8 @@ public class V2 : OpticalMediaImageTest Md5 = "d5b4f6cd608800aa02a79eb4ddc714dc", LongMd5 = "5cd43bed94fc3e98f5ad805841c3d0a3", SubchannelMd5 = "67db42c525f3c850481e94465acd2423", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1190,8 +1190,8 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 7876, @@ -1207,7 +1207,7 @@ public class V2 : OpticalMediaImageTest VolumeName = "Session 1", VolumeSerial = "50958B61AF6A749E" } - } + ] }, new TrackInfoTestExpected { @@ -1217,8 +1217,8 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 2, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 6170, @@ -1234,7 +1234,7 @@ public class V2 : OpticalMediaImageTest VolumeName = "Session 2", VolumeSerial = "50958BBBAF6A7444" } - } + ] }, new TrackInfoTestExpected { @@ -1244,8 +1244,8 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 3, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 5360, @@ -1261,7 +1261,7 @@ public class V2 : OpticalMediaImageTest VolumeName = "Session 3", VolumeSerial = "50958C19AF6A73E6" } - } + ] }, new TrackInfoTestExpected { @@ -1271,8 +1271,8 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 4, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 45796, @@ -1288,9 +1288,9 @@ public class V2 : OpticalMediaImageTest VolumeName = "Session 4", VolumeSerial = "50958C82AF6A737D" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -1300,8 +1300,8 @@ public class V2 : OpticalMediaImageTest Md5 = "5b5e93e5477cd7e8e444d25e8ff42a2a", LongMd5 = "806eee4238d63e8330710bc141e85bc8", SubchannelMd5 = "2f111b57f8932c43a6cf4ad2fd5eb5e2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1310,8 +1310,8 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -1319,7 +1319,7 @@ public class V2 : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -1329,7 +1329,7 @@ public class V2 : OpticalMediaImageTest Pregap = 302, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1338,8 +1338,8 @@ public class V2 : OpticalMediaImageTest Sectors = 279196, Md5 = "cce718c0d4d60eb9a0571cd0ae7e2ff2", LongMd5 = "cce718c0d4d60eb9a0571cd0ae7e2ff2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1428,7 +1428,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -1437,8 +1437,8 @@ public class V2 : OpticalMediaImageTest Sectors = 279196, Md5 = "5c30e6a6fa2e85751a2e1592fbf3245d", LongMd5 = "5c30e6a6fa2e85751a2e1592fbf3245d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1527,7 +1527,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1536,8 +1536,8 @@ public class V2 : OpticalMediaImageTest Sectors = 82704, Md5 = "dac40e24aeccfe416a044bf9502d2b7e", LongMd5 = "dac40e24aeccfe416a044bf9502d2b7e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1545,7 +1545,7 @@ public class V2 : OpticalMediaImageTest End = 82703, Pregap = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1554,8 +1554,8 @@ public class V2 : OpticalMediaImageTest Sectors = 83072, Md5 = "a412c13e81a4044407a81ad794095306", LongMd5 = "a412c13e81a4044407a81ad794095306", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1563,7 +1563,7 @@ public class V2 : OpticalMediaImageTest End = 83071, Pregap = 0 } - } + ] }, new OpticalImageTestExpected { @@ -1572,8 +1572,8 @@ public class V2 : OpticalMediaImageTest Sectors = 82695, Md5 = "b14ace0656db97360e21bc9d7d3d5109", LongMd5 = "5793b471f2ef0087af63facba9485bee", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1582,7 +1582,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1591,8 +1591,8 @@ public class V2 : OpticalMediaImageTest Sectors = 82695, Md5 = "b14ace0656db97360e21bc9d7d3d5109", LongMd5 = "5793b471f2ef0087af63facba9485bee", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1601,7 +1601,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1610,8 +1610,8 @@ public class V2 : OpticalMediaImageTest Sectors = 83068, Md5 = "05dcbde7856dae96bb1fcff7d02fdb96", LongMd5 = "bf5a216352b7a025fb98d76b38afbe3d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1620,7 +1620,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1629,8 +1629,8 @@ public class V2 : OpticalMediaImageTest Sectors = 83068, Md5 = "05dcbde7856dae96bb1fcff7d02fdb96", LongMd5 = "bf5a216352b7a025fb98d76b38afbe3d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1639,7 +1639,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1648,8 +1648,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85364, Md5 = "331c02751e4c2fd505fffa163b1bc361", LongMd5 = "12f448affe38c96311c9de4633f787e1", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1658,7 +1658,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1667,8 +1667,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85364, Md5 = "52df6748a9436452e6a024d6d43cc5fb", LongMd5 = "ed6f139b0e763690d84b1f4aba2a6b78", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1677,7 +1677,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1686,8 +1686,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85364, Md5 = "45703870e27a99cdc5ee486f9b919209", LongMd5 = "d9ed9c8bafd5f218d3b7f6aee6be2d44", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1696,7 +1696,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1705,8 +1705,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85364, Md5 = "56392a983981f9e222ea18807934a3d4", LongMd5 = "9cbd519fe328fcb206c1786fbbfeeb87", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1715,7 +1715,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1724,8 +1724,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "ee86f608a9276e4bc267b8c66907ada4", LongMd5 = "f92ebc7cd69e2e060db761eba6582d67", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1734,7 +1734,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1743,8 +1743,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "6fbd06e26bbeb49b19434b8630b4711d", LongMd5 = "68692050b99c94dc61c38c2b315ac8f5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1753,7 +1753,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1762,8 +1762,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85368, Md5 = "408ff544e060baa6b67cce490aba1f77", LongMd5 = "c48e0ec4b399399507e1da52e569db33", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1772,7 +1772,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1781,8 +1781,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85368, Md5 = "79fc10eb1b87a95cc46581a6680fed02", LongMd5 = "1ba7ebd3904756d07f28c8cca5df3176", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1791,7 +1791,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1800,8 +1800,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85366, Md5 = "cfd56ea81d9927f3bd84303e2e46f3d0", LongMd5 = "5906fae5ed3eae8b34d7b1c3768254f3", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1810,7 +1810,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1819,8 +1819,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85366, Md5 = "45a74e0240eafd4a25f3719fcb63c423", LongMd5 = "5d2ebb99b0aaaacd08294f910b95ea25", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1829,7 +1829,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1838,8 +1838,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "a36f10b5881798f73a60dcabfdbda2e5", LongMd5 = "cbef2b2fa29347456f2d2c6aadf0a65a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1848,7 +1848,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1857,8 +1857,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "20484d666fdb7be5cb4783853f1d5e11", LongMd5 = "3fd901634fca7ec9979b69ae8b242d5c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1867,7 +1867,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1876,8 +1876,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85370, Md5 = "477788d0e383b9dbd9bf179c6eae1950", LongMd5 = "b688819e815a7dea55ab894666d98a36", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1886,7 +1886,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1895,8 +1895,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85370, Md5 = "884633f3720b20c36c2f56032456ff42", LongMd5 = "520c0da95e556285f264055309d0643d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1905,7 +1905,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1914,8 +1914,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85366, Md5 = "8703cbb59eb1dfb6f7b3748f9e410698", LongMd5 = "750009655962df0f01d3261ed71e2b06", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1924,7 +1924,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1933,8 +1933,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85366, Md5 = "5a8ee84276bdf1b1d0b07b64639892a4", LongMd5 = "2b89eb05149632731bc07aef7bd85518", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1943,7 +1943,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1952,8 +1952,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "b88ca672a6f86f84072a626b62ba9f14", LongMd5 = "131c8da49d40e850f4e956cc8770445d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1962,7 +1962,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1971,8 +1971,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "7b7558a98a0ade5e3d5046eb24983c2b", LongMd5 = "2d625d5192a506cf2baf91f8b04ff722", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -1981,7 +1981,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -1990,8 +1990,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85370, Md5 = "2b96f44ee072f04cb7477abc23c0ac78", LongMd5 = "bf7ad9935df332783848f815458e1687", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2000,7 +2000,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2009,8 +2009,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85370, Md5 = "70ea1fca4e5929514d15be2b16156961", LongMd5 = "929cff7615d84c900c637067e6bf44e6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2019,7 +2019,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2028,8 +2028,8 @@ public class V2 : OpticalMediaImageTest Sectors = 82697, Md5 = "9712faa85483cf520e0efae0bbd53164", LongMd5 = "c7a5031c12fcac644f20384c8cafe3a8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2038,7 +2038,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2047,8 +2047,8 @@ public class V2 : OpticalMediaImageTest Sectors = 82697, Md5 = "9712faa85483cf520e0efae0bbd53164", LongMd5 = "c7a5031c12fcac644f20384c8cafe3a8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2057,7 +2057,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2066,8 +2066,8 @@ public class V2 : OpticalMediaImageTest Sectors = 83082, Md5 = "2a391c84479c34267439103ca6abf7bf", LongMd5 = "dd5fd9f1e45acff0c2c9b85f6abb3ab8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2076,7 +2076,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2085,8 +2085,8 @@ public class V2 : OpticalMediaImageTest Sectors = 83082, Md5 = "2a391c84479c34267439103ca6abf7bf", LongMd5 = "dd5fd9f1e45acff0c2c9b85f6abb3ab8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2095,7 +2095,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2104,8 +2104,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85378, Md5 = "0861eb66287123d470b7945debe8fb12", LongMd5 = "139d794e62632e4845ab24daff3685f0", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2114,7 +2114,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2123,8 +2123,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85378, Md5 = "b2b0772bbc6b950bbdbaaac90831c9f2", LongMd5 = "9cd6841be3c35cd3ea012fbb4f5b313d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2133,7 +2133,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2142,8 +2142,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85378, Md5 = "8329b3663619eca9d424eb1fbc7036b7", LongMd5 = "451bc347c53260b50c48b101e64e9023", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2152,7 +2152,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2161,8 +2161,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85378, Md5 = "055310ad3609d44011081863d617d33f", LongMd5 = "a9d37132e6b519bb774f603129c1b7dd", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2171,7 +2171,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2180,8 +2180,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "cc9ece6ddcbb456ff5cf197d0f21b785", LongMd5 = "d0042821851343b7149231e13f60677d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2190,7 +2190,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2199,8 +2199,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "ae08aedc15e623ed2a035b9813e5360d", LongMd5 = "260416feefd735fbfa9d428197fc31ce", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2209,7 +2209,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2218,8 +2218,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85382, Md5 = "23ba6f2deb635e408e7938345aaecd5e", LongMd5 = "3c3cc0829c0f5b3dc90552cd06f6caca", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2228,7 +2228,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2237,8 +2237,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85382, Md5 = "1b7b0d16a910b65173fd777c974e94b6", LongMd5 = "cb9495de8c27af64b84925b32351ceb2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2247,7 +2247,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2256,8 +2256,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85380, Md5 = "7f550c2b0b587275a63ccf13a732bb55", LongMd5 = "629a18aa832bc0336d7f5eeb69d179c8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2266,7 +2266,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2275,8 +2275,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85380, Md5 = "119fe576b2a81e0070b48748545ed691", LongMd5 = "aae875760f7a1e6e41b1b93b71de3b20", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2285,7 +2285,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2294,8 +2294,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "2b4b5af6ac9d988a2dc38dc5b873d574", LongMd5 = "5c18f49d07d53fd799e74f24d4d53484", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2304,7 +2304,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2313,8 +2313,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "0613ae6e1c5b87ae563b3f7f572a8b18", LongMd5 = "a6169364cb292c245e435eb63cb47057", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2323,7 +2323,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2332,8 +2332,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85384, Md5 = "d45ffe1153db6f5c71596cbd905fc488", LongMd5 = "a902f86d13d56f2e6f227a52634089d9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2342,7 +2342,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2351,8 +2351,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85384, Md5 = "779eecd0085b18b1d9918b41423dd339", LongMd5 = "d0513c7eee273befeff5ce89f9238560", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2361,7 +2361,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2370,8 +2370,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85380, Md5 = "4c81ffc4fa384850de42910b35a5aca3", LongMd5 = "b3a211be5fdae118e301a64de7fcb179", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2380,7 +2380,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2389,8 +2389,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85380, Md5 = "55785037c6349fa1f7fdd0b908181818", LongMd5 = "eab4b4988478a929abb00456c79bdd93", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2399,7 +2399,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2408,8 +2408,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "92ce7748584f7e6ed60c4bd507b4dc0f", LongMd5 = "685810f81bfdf3726b29c6bfb3fe6240", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2418,7 +2418,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2427,8 +2427,8 @@ public class V2 : OpticalMediaImageTest Sectors = 86529, Md5 = "2a546c0c5eabb2bdcf23f30b463bb275", LongMd5 = "50de9b1be03914910e6c60f7bfa0e077", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2437,7 +2437,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2446,8 +2446,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85384, Md5 = "8122aa37899aea7ca6edd5da216ea172", LongMd5 = "20a452a3389e06af32a79137b005dc66", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2456,7 +2456,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2465,8 +2465,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85384, Md5 = "92b7c6ba9530389f8189f5ca271dfb25", LongMd5 = "f7c3a968839604a0317132c76387617c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2475,7 +2475,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2484,8 +2484,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84616, Md5 = "d15dc18c94c1800c578dc50130395a3e", LongMd5 = "e133b2452e7f8a3fb0993e6626b81dbf", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2494,7 +2494,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2503,8 +2503,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84616, Md5 = "897d2c63f0e181854191c859d9aa8bd2", LongMd5 = "00b91fff0f255a541f9e6ce1484f7853", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2513,7 +2513,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2522,8 +2522,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84616, Md5 = "d3dd0903e74a4a714114751fe3071ceb", LongMd5 = "9764d6dcd88081043d12592ec529739e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2532,7 +2532,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2541,8 +2541,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84616, Md5 = "076f320539c8171246e4d24a5cf3d533", LongMd5 = "70a988b0c6c9ecd3ae3b12a18dd4dc0e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2551,7 +2551,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2560,8 +2560,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85793, Md5 = "fac65be4def378788d467966e2b795d8", LongMd5 = "0c221dec63b409a3785d7183b4149176", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2570,7 +2570,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2579,8 +2579,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85793, Md5 = "366195d1e5140c0a690d2b256891db60", LongMd5 = "934e4d7fde8b1ad40c8135e43159e74b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2589,7 +2589,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2598,8 +2598,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84620, Md5 = "a40b83ad5ba0de4a1e19426c0bd05934", LongMd5 = "4b7698c901b19739c5911db97eb1ca55", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2608,7 +2608,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2617,8 +2617,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84620, Md5 = "cc0ebb19ee2fa513c7fcdc6c4916536d", LongMd5 = "7cee40146211ed2bbd50dbe5082bd290", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2627,7 +2627,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2636,8 +2636,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84618, Md5 = "86d67a9f66ff43f89f5a58b785598b08", LongMd5 = "1bb6cc5f1db38a4bb4598cd8776d5aaf", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2646,7 +2646,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2655,8 +2655,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84618, Md5 = "ca9cee749466053ab344a27a4b5c2e11", LongMd5 = "3880fae96c3fb170fb4f337985adc5c5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2665,7 +2665,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2674,8 +2674,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85793, Md5 = "803526863c0ec3f64c2a89cdb7ebce77", LongMd5 = "5f16344d375502a1082c635f5e27ea4e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2684,7 +2684,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2693,8 +2693,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85793, Md5 = "00570af53cea4275c7191ba52e65f1bf", LongMd5 = "2efedcd2a6bfb1658015221ecfba0752", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2703,7 +2703,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2712,8 +2712,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84622, Md5 = "b0b56d1663c508e7d0ceb33f3bb5cc78", LongMd5 = "20a0714daaff2d41798d97f72cd95b3a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2722,7 +2722,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2731,8 +2731,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84622, Md5 = "de4c155829449b40632bb9165dba0839", LongMd5 = "f12ca7d65ddad197d3075926ad7c3aaf", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2741,7 +2741,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2750,8 +2750,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84618, Md5 = "bd83c27796677aa75f067c474952226e", LongMd5 = "220904f85af94dff3b899e36c30c6511", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2760,7 +2760,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2769,8 +2769,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84618, Md5 = "fa86ee2ecaf7a0b9e06b1e0ea3e66a16", LongMd5 = "e6e3a29fc6642716c1c302c63586f7cb", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2779,7 +2779,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2788,8 +2788,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85793, Md5 = "7f6b97cd47875e397de275b56a3cfd86", LongMd5 = "1b50de41d291308c1aa678da06a38978", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2798,7 +2798,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2807,8 +2807,8 @@ public class V2 : OpticalMediaImageTest Sectors = 85793, Md5 = "c3bed9a87c42cafe1f7a1239eaa0fac6", LongMd5 = "0c5c3ab226f73c3c36636abdb6ac289e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2817,7 +2817,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2826,8 +2826,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84622, Md5 = "54ba4fe1ac87998dd0cb7dddfea97664", LongMd5 = "a946851e149714a084ea3d1794964fc5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2836,7 +2836,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2845,8 +2845,8 @@ public class V2 : OpticalMediaImageTest Sectors = 84622, Md5 = "372d1a672f8ec1310c8665024b35b483", LongMd5 = "e4e2304b1cccffdac1e781bae228dee4", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2855,7 +2855,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2864,8 +2864,8 @@ public class V2 : OpticalMediaImageTest Sectors = 337261, Md5 = "9f1272614a307e3fac0b3e6ba90098e8", LongMd5 = "b5d6a75d73752f78a978e51e7f4c4adf", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -2962,7 +2962,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -2971,8 +2971,8 @@ public class V2 : OpticalMediaImageTest Sectors = 337261, Md5 = "7bbe7fd534a37882924c718604c9a6e9", LongMd5 = "c3053f05e4f371fcceeaf001bd1b235c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -3069,7 +3069,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -3078,8 +3078,8 @@ public class V2 : OpticalMediaImageTest Sectors = 727605, Md5 = "f47418bf60ea47be64e97c17192e2d5f", LongMd5 = "e7daf8bc5100fd211028cf0f6491d343", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -3088,7 +3088,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -3097,8 +3097,8 @@ public class V2 : OpticalMediaImageTest Sectors = 31084, Md5 = "c76c3537f1b3f3c4feecca0e35b4b859", LongMd5 = "a58449cfb0de9708f2a19d515d9d37f8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -3107,7 +3107,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] }, new OpticalImageTestExpected { @@ -3116,8 +3116,8 @@ public class V2 : OpticalMediaImageTest Sectors = 362041, Md5 = "e50fb58ee954ae5bcec18c09896095a5", LongMd5 = "1d3da4b1804a0e9aa07d8f7c2f51672b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -3214,7 +3214,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 2 } - } + ] }, new OpticalImageTestExpected { @@ -3223,8 +3223,8 @@ public class V2 : OpticalMediaImageTest Sectors = 362041, Md5 = "c1b14eec8c9bc1177926c8ef5f382cc0", LongMd5 = "8f62724f4f6bfe8898daca1b39b25eb8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -3321,7 +3321,7 @@ public class V2 : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, #region These test images violate the specifications and are not expected to work yet diff --git a/Aaru.Tests/Images/PowerISO/Cuesheet.cs b/Aaru.Tests/Images/PowerISO/Cuesheet.cs index 583d32335..a0f04d0f0 100644 --- a/Aaru.Tests/Images/PowerISO/Cuesheet.cs +++ b/Aaru.Tests/Images/PowerISO/Cuesheet.cs @@ -42,8 +42,8 @@ public class Cuesheet : OpticalMediaImageTest public override IMediaImage Plugin => new CdrWin(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "cdiready_the_apprentice.cue", @@ -51,8 +51,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 279300, Md5 = "7557c72d4cf6df8bc1896388b863727a", LongMd5 = "7557c72d4cf6df8bc1896388b863727a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -229,7 +229,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -238,8 +238,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 247073, Md5 = "c7e38c848cdaf293fc5f62df06bc574d", LongMd5 = "c7e38c848cdaf293fc5f62df06bc574d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -352,7 +352,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -361,8 +361,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 254265, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -371,8 +371,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -387,9 +387,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -398,8 +398,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 308224, Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -408,8 +408,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -418,9 +418,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, /* These images are corrupted by PowerISO beyond repair new OpticalImageTestExpected @@ -595,8 +595,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 329158, Md5 = "b91d0e8e6b486051734134dc009d8c0a", LongMd5 = "b91d0e8e6b486051734134dc009d8c0a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -725,7 +725,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/HyperV.cs b/Aaru.Tests/Images/QEMU/HyperV.cs index 49fe9931d..363bf83b4 100644 --- a/Aaru.Tests/Images/QEMU/HyperV.cs +++ b/Aaru.Tests/Images/QEMU/HyperV.cs @@ -40,8 +40,8 @@ public class HyperV : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "QEMU", "Hyper-V"); public override IMediaImage Plugin => new Vhdx(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "vhdx.vhdx.lz", @@ -49,14 +49,14 @@ public class HyperV : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/Parallels.cs b/Aaru.Tests/Images/QEMU/Parallels.cs index 7e520a94c..c229f6421 100644 --- a/Aaru.Tests/Images/QEMU/Parallels.cs +++ b/Aaru.Tests/Images/QEMU/Parallels.cs @@ -39,8 +39,8 @@ public class Parallels : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "QEMU", "Parallels"); public override IMediaImage Plugin => new Aaru.Images.Parallels(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "parallels.hdd.lz", @@ -48,14 +48,14 @@ public class Parallels : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/QCOW.cs b/Aaru.Tests/Images/QEMU/QCOW.cs index 0f3f0ccf9..645cf4534 100644 --- a/Aaru.Tests/Images/QEMU/QCOW.cs +++ b/Aaru.Tests/Images/QEMU/QCOW.cs @@ -44,8 +44,8 @@ public class QCOW : BlockMediaImageTest public override IMediaImage Plugin => new Qcow(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "qcow.qc.lz", @@ -53,14 +53,14 @@ public class QCOW : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/QCOW2.cs b/Aaru.Tests/Images/QEMU/QCOW2.cs index 5e4b6ccfa..ea284146f 100644 --- a/Aaru.Tests/Images/QEMU/QCOW2.cs +++ b/Aaru.Tests/Images/QEMU/QCOW2.cs @@ -44,8 +44,8 @@ public class QCOW2 : BlockMediaImageTest public override IMediaImage Plugin => new Qcow2(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "qcow2.qc2.lz", @@ -53,14 +53,14 @@ public class QCOW2 : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class QCOW2 : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/QCOW3.cs b/Aaru.Tests/Images/QEMU/QCOW3.cs index 6074b4e49..58d9e96f2 100644 --- a/Aaru.Tests/Images/QEMU/QCOW3.cs +++ b/Aaru.Tests/Images/QEMU/QCOW3.cs @@ -44,8 +44,8 @@ public class QCOW3 : BlockMediaImageTest public override IMediaImage Plugin => new Qcow2(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "qcow3.qc2.lz", @@ -53,14 +53,14 @@ public class QCOW3 : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] }, new BlockImageTestExpected { @@ -69,14 +69,14 @@ public class QCOW3 : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/QED.cs b/Aaru.Tests/Images/QEMU/QED.cs index b8d843110..a08acb68b 100644 --- a/Aaru.Tests/Images/QEMU/QED.cs +++ b/Aaru.Tests/Images/QEMU/QED.cs @@ -44,8 +44,8 @@ public class QED : BlockMediaImageTest public override IMediaImage Plugin => new Qed(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "qed.qed.lz", @@ -53,14 +53,14 @@ public class QED : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/Raw.cs b/Aaru.Tests/Images/QEMU/Raw.cs index 9a4a1259a..17b95e559 100644 --- a/Aaru.Tests/Images/QEMU/Raw.cs +++ b/Aaru.Tests/Images/QEMU/Raw.cs @@ -40,8 +40,8 @@ public class Raw : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "QEMU", "raw"); public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "raw.img.lz", @@ -49,14 +49,14 @@ public class Raw : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/VMware5.cs b/Aaru.Tests/Images/QEMU/VMware5.cs index c43fa8c56..9bdea763b 100644 --- a/Aaru.Tests/Images/QEMU/VMware5.cs +++ b/Aaru.Tests/Images/QEMU/VMware5.cs @@ -40,8 +40,8 @@ public class VMware5 : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "QEMU", "VMware 5"); public override IMediaImage Plugin => new VMware(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "vmdk5.vmdk.lz", @@ -49,14 +49,14 @@ public class VMware5 : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "1ad282643cc7f97c57dc874b3d4ece9b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/VMware6.cs b/Aaru.Tests/Images/QEMU/VMware6.cs index 923c6fb81..c01232556 100644 --- a/Aaru.Tests/Images/QEMU/VMware6.cs +++ b/Aaru.Tests/Images/QEMU/VMware6.cs @@ -40,8 +40,8 @@ public class VMware6 : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "QEMU", "VMware 6"); public override IMediaImage Plugin => new VMware(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "vmdk6.vmdk.lz", @@ -49,14 +49,14 @@ public class VMware6 : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "1ad282643cc7f97c57dc874b3d4ece9b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/VirtualBox.cs b/Aaru.Tests/Images/QEMU/VirtualBox.cs index 97f3e2664..c350242a9 100644 --- a/Aaru.Tests/Images/QEMU/VirtualBox.cs +++ b/Aaru.Tests/Images/QEMU/VirtualBox.cs @@ -42,8 +42,8 @@ public class VirtualBox : BlockMediaImageTest public override IMediaImage Plugin => new Vdi(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "virtualbox.vdi.lz", @@ -51,14 +51,14 @@ public class VirtualBox : BlockMediaImageTest Sectors = 251904, SectorSize = 512, Md5 = "4bfc9e9e2dd86aa52ef709e77d2617ed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/QEMU/VirtualPC.cs b/Aaru.Tests/Images/QEMU/VirtualPC.cs index 392e91691..a6d7f1ccc 100644 --- a/Aaru.Tests/Images/QEMU/VirtualPC.cs +++ b/Aaru.Tests/Images/QEMU/VirtualPC.cs @@ -40,8 +40,8 @@ public class VirtualPC : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "QEMU", "VirtualPC"); public override IMediaImage Plugin => new Vhd(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "qemu_dynamic_250mb.vhd.lz", @@ -49,14 +49,14 @@ public class VirtualPC : BlockMediaImageTest Sectors = 512064, SectorSize = 512, Md5 = "26d2745c1d614207b4bce4ee003c326d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 512064 } - } + ] }, new BlockImageTestExpected { @@ -65,14 +65,14 @@ public class VirtualPC : BlockMediaImageTest Sectors = 20536, SectorSize = 512, Md5 = "adfad4fb019f157e868baa39e7753db7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 20536 } - } + ] }, new BlockImageTestExpected { @@ -81,14 +81,14 @@ public class VirtualPC : BlockMediaImageTest Sectors = 251940, SectorSize = 512, Md5 = "7126d647c1cefc5a81b4140e10f50269", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 251841 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/RayDIM.cs b/Aaru.Tests/Images/RayDIM.cs index 9cc9021aa..97954c53d 100644 --- a/Aaru.Tests/Images/RayDIM.cs +++ b/Aaru.Tests/Images/RayDIM.cs @@ -44,8 +44,8 @@ public class RayDIM : BlockMediaImageTest public override IMediaImage Plugin => new RayDim(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "5f1dd8.dim.lz", @@ -61,14 +61,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 336, SectorSize = 512, Md5 = "59e3fecd9501694f897dbce45aa41946", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 336 } - } + ] }, new BlockImageTestExpected { @@ -85,14 +85,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 378, SectorSize = 512, Md5 = "d37559bca656484e2c91cee941f9d22b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 378 } - } + ] }, new BlockImageTestExpected { @@ -109,14 +109,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 672, SectorSize = 512, Md5 = "d865778a7b9294045d3341be57fa9278", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 672 } - } + ] }, new BlockImageTestExpected { @@ -133,14 +133,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 756, SectorSize = 512, Md5 = "efe65433ade25ce4d03d0f6a0c199b85", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 756 } - } + ] }, new BlockImageTestExpected { @@ -157,14 +157,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2460, SectorSize = 512, Md5 = "84b0b7b0b13f10b719ad3ff3ddf1b8ac", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2460 } - } + ] }, new BlockImageTestExpected { @@ -189,14 +189,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "95ea232f59e44db374b994cfe7f1c07f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -261,14 +261,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2302991363cb3681cffdc4388915b51e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -293,14 +293,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "af83d011608042d35021e39aa5e10b2f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -309,14 +309,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "6642c1a32d2c58e93481d664974fc202", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -325,14 +325,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "846f01b8b60cb3c775bd66419e977926", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -341,14 +341,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "5101f89850dc28efbcfb7622086a9ddf", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -357,14 +357,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "8e570be2ed1f00ddea82e50a2d9c446a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -373,14 +373,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "abba2a1ddd60a649047a9c44d94bbeae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -389,14 +389,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "e3bc48bec81be5b35be73d41fdffd2ab", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -405,14 +405,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "43b5068af9d016d1432eb2e12d2b802a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -421,14 +421,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "5bf2ad4dc300592604b6e32f8b8e2656", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -437,14 +437,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "cb9a832ca6a4097b8ccc30d2108e1f7d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -453,14 +453,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "56d181a6bb8713e6b2854fe8887faab6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -469,14 +469,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "41aef7cff26aefda1add8d49c5b962c2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -485,14 +485,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2460, SectorSize = 512, Md5 = "2437c5f089f1cba3866b36360b016f16", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2460 } - } + ] }, new BlockImageTestExpected { @@ -501,14 +501,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1280, SectorSize = 512, Md5 = "bdaa8f17373b265830fdf3a06b794367", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1280 } - } + ] }, new BlockImageTestExpected { @@ -517,14 +517,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "629932c285478d0540ff7936aa008351", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -533,14 +533,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1476, SectorSize = 512, Md5 = "7a2abef5d4701e2e49abb05af8d4da50", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1476 } - } + ] }, new BlockImageTestExpected { @@ -549,14 +549,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "e3507522c914264f44fb2c92c3170c09", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -565,14 +565,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "824fe65dbb1a42b6b94f05405ef984f2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -581,14 +581,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "1a8c2e78e7132cf9ba5d6c2b75876be0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -597,14 +597,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "936b20bb0966fe693b4d5e2353e24846", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -613,14 +613,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "803b01a0b440c2837d37c21308f30cd5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -629,14 +629,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "aa0d31f914760cc4cde75479779ebed6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -645,14 +645,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "31269ed6464302ae26d22b7c87bceb23", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -661,14 +661,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "5e413433c54f48978d281c6e66d1106e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -677,14 +677,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3528, SectorSize = 512, Md5 = "a9bacb3d24afd8894b4857d4ca15f1a2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3528 } - } + ] }, new BlockImageTestExpected { @@ -693,14 +693,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3528, SectorSize = 512, Md5 = "24a7459d080cea3a60d131b8fd7dc5d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3528 } - } + ] }, new BlockImageTestExpected { @@ -709,14 +709,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3612, SectorSize = 512, Md5 = "df4f196d4133f29e2735c05bb15ff6bf", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3612 } - } + ] }, new BlockImageTestExpected { @@ -725,14 +725,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 5120, SectorSize = 512, Md5 = "630f017f692e853278ab108474fc1fa5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 5120 } - } + ] }, new BlockImageTestExpected { @@ -741,14 +741,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "8f91482c56161ecbf5d86f42b03b9636", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -757,14 +757,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "5fc19ca552b6db957061e9a1750394d2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -773,14 +773,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "a33b46f042b78fe3d0b3c5dbb3908a93", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -789,14 +789,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "565d3c001cbb532154aa5d3c65b2439c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -805,14 +805,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "e60442c3ebd72c99bdd7545fdba59613", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -821,14 +821,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "058a33a129539285c9b64010496af52f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -837,14 +837,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "0726ecbc38965d30a6222c3e74cd1aa3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -861,14 +861,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c38d69ac88520f14fcc6d6ced22b065d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -877,14 +877,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "91d51964e1e64ef3f6f622fa19aa833c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -893,14 +893,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "db36d9651c952ff679ec33223c8db2d3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -909,14 +909,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3024, SectorSize = 512, Md5 = "0373d3d489e98cc1160da9b0412f6df0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3024 } - } + ] }, new BlockImageTestExpected { @@ -925,14 +925,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "1207a1cc7ff73d4f74c8984b4e7db33f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -941,14 +941,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3528, SectorSize = 512, Md5 = "2e9910e2d637eb88d58056b61a25401c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3528 } - } + ] }, new BlockImageTestExpected { @@ -957,14 +957,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 400, SectorSize = 512, Md5 = "d40a99cb549fcfb26fcf9ef01b5dfca7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 400 } - } + ] }, new BlockImageTestExpected { @@ -973,14 +973,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 420, SectorSize = 512, Md5 = "6433f8fbf8dda1e307b15a4203c1a4e6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 420 } - } + ] }, new BlockImageTestExpected { @@ -989,14 +989,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "126dfd25363c076727dfaab03955c931", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -1005,14 +1005,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "386763ae9afde1a0a19eb4a54ba462aa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -1021,14 +1021,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "7973e569ed93beb1ece2e84a5ef3a8d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1037,14 +1037,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a793047503af08e83361427b3e2806e0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1053,14 +1053,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "f01541de322c8d6d7321084d7a245e7b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1069,14 +1069,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "ba6ec1652ff41bcc687aaf9c4e32dc18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -1085,14 +1085,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "7973e569ed93beb1ece2e84a5ef3a8d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1101,14 +1101,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a793047503af08e83361427b3e2806e0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1117,14 +1117,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "ba6ec1652ff41bcc687aaf9c4e32dc18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -1133,14 +1133,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "6631b66fdfd89319323771c41334c7ba", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1149,14 +1149,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "56471a253f4d6803b634e2bbff6c0931", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -1165,14 +1165,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "7d36aee5a3071ff75b979f3acb649c40", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -1181,14 +1181,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "0ccb62039363ab544c69eca229a17fae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -1197,14 +1197,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "7851d31fad9302ff45d3ded4fba25387", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -1213,14 +1213,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "915b08c82591e8488320e001b7303b6d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1229,14 +1229,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "5e5ea6fe9adf842221fdc60e56630405", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -1245,14 +1245,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "a22e254f7e3526ec30dc4915a19fcb52", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1261,14 +1261,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ddc6c1200c60e9f7796280f50c2e5283", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1333,14 +1333,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "be05d1ff10ef8b2220546c4db962ac9e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1349,14 +1349,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "e01d813dd6c3a49428520df40d63cadd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -1365,14 +1365,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "1c8b03a8550ed3e70e1c78316aa445aa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1381,14 +1381,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "0bdf9130c07bb5d558a4705249f949d0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -1397,14 +1397,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2dafeddaa99e7dc0db5ef69e128f9c8e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1421,14 +1421,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "028769dc0abefab1740cc309432588b6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -1437,14 +1437,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "152023525154b45ab26687190bac94db", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1453,14 +1453,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "db38ecd93f28dd065927fed21917eed5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1485,14 +1485,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "f206c0caa4e0eda37233ab6e89ab5493", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1501,14 +1501,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "63b68958663987b2281b2105e704d3ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1613,14 +1613,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 630, SectorSize = 512, Md5 = "ed03778299e16ace99383487bff2228a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 630 } - } + ] }, new BlockImageTestExpected { @@ -1645,14 +1645,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "5ac0a9fc7337f761098f816359b0f6f7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1661,14 +1661,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "1ea6ec8e663218b1372048f6e25795b5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1677,14 +1677,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "77a1167b1b9043496e32b8578cde0ff0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1693,14 +1693,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1680, SectorSize = 512, Md5 = "83e62bbb301ed40d9744593b7dc05f9e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1680 } - } + ] }, new BlockImageTestExpected { @@ -1709,14 +1709,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "32c044c5c2b0bd13806149a759c14935", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1725,14 +1725,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3040, SectorSize = 512, Md5 = "8752095abc13dba3f3467669da333891", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3040 } - } + ] }, new BlockImageTestExpected { @@ -1741,14 +1741,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "aece7cd34bbba3e75307fa70404d9d30", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1757,14 +1757,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3280, SectorSize = 512, Md5 = "5289afb16a6e4a33213e3bcca56c6230", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3280 } - } + ] }, new BlockImageTestExpected { @@ -1773,14 +1773,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "700eadd757992f5da3c6c984a2f9470e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1789,14 +1789,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "b96596711f4d2ee85dfda0fe3b9f26c3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1805,14 +1805,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "a4f461af7fda5e93a7ab63fcbb7e7683", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -1821,14 +1821,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3528, SectorSize = 512, Md5 = "ac3f34b034b9f8f488379d3a4f277a3b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3528 } - } + ] }, new BlockImageTestExpected { @@ -1837,14 +1837,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "4feeaf4b4ee5dad85db727fbbda4b6d1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -1853,14 +1853,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 400, SectorSize = 512, Md5 = "3c77ca681df78e4cd7baa162aa9b0859", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 400 } - } + ] }, new BlockImageTestExpected { @@ -1869,14 +1869,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "51da1f86c49657ffdb367bb2ddeb7990", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -1903,14 +1903,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "f76f92dd326c99c5efad5ee58daf72e1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -1919,14 +1919,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "b6f2c10e42908e334025bc4ffd81e771", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -1935,14 +1935,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "f2f409ea2a62a7866fd2777cc4fc9739", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -1951,14 +1951,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1512, SectorSize = 512, Md5 = "ba3045cda36dd47443ff68c10efae573", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1512 } - } + ] }, new BlockImageTestExpected { @@ -1967,14 +1967,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "30a93f30dd4485c6fc037fe0775d3fc7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -1983,14 +1983,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "e0caf02cce5597c98313bcc480366ec7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -1999,14 +1999,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "39bf5a98bcb2185d855ac06378febcfa", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -2015,14 +2015,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "dc20055b6e6fd6f8e1114d4be2effeed", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -2031,14 +2031,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "56af9256cf71d5aac5fd5d363674bc49", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -2047,14 +2047,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 720, SectorSize = 512, Md5 = "bbba1e2d1418e05c3a4e7b4d585d160b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 720 } - } + ] }, new BlockImageTestExpected { @@ -2063,14 +2063,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "bca3a045e81617f7f5ebb5a8818eac47", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -2079,14 +2079,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "a296663cb8e75e94603221352f29cfff", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2095,14 +2095,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ecda36ebf0e1100233cb0ec722c18583", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2111,14 +2111,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "cef2f4fe9b1a32d5c0544f814e634264", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -2127,14 +2127,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "bbe58e26b8f8f822cd3edfd37a4e4924", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2143,14 +2143,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "b9b6ebdf711364c979de7cf70c3a438a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -2159,14 +2159,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "d37424f367f545acbb397f2bed766843", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2175,14 +2175,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "9963dd6f19ce6bd56eabeccdfbbd821a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2191,14 +2191,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "acf6604559ae8217f7869823e2429024", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2207,14 +2207,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "23bf2139cdfdc4c16db058fd31ea6481", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -2223,14 +2223,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "fa26adda0415f02057b113ad29c80c8d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2239,14 +2239,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "4f2a8d036fefd6c6c88d99eda3aa12b7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2255,14 +2255,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1404, SectorSize = 512, Md5 = "5e0ecf953104621b0465163205d8e9c7", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1404 } - } + ] }, new BlockImageTestExpected { @@ -2271,14 +2271,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "d81f5cb64fd0b99f138eab34110bbc3c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -2287,14 +2287,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "a89006a75d13bee9202d1d6e52721ccb", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -2303,14 +2303,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 400, SectorSize = 512, Md5 = "e1ad4a022778d7a0b24a93d8e68a59dc", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 400 } - } + ] }, new BlockImageTestExpected { @@ -2319,14 +2319,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 420, SectorSize = 512, Md5 = "56a95fcf1d6f5c3108a17207b53ec07c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 420 } - } + ] }, new BlockImageTestExpected { @@ -2335,14 +2335,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "beef1cdb004dc69391d6b3d508988b95", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -2359,14 +2359,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "0aef12c906b744101b932d799ca88a78", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -2375,14 +2375,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "e7367df9998de0030a97b5131d1bed20", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -2391,14 +2391,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "1c36b819cfe355c11360bc120c9216fe", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2407,14 +2407,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "25114403c11e337480e2afc4e6e32108", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2423,14 +2423,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "3d7760ddaa55cd258057773d15106b78", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2439,14 +2439,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "29054ef703394ee3b35e849468a412ba", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -2455,14 +2455,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "c91e852828c2aeee2fc94a6adbeed0ae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2471,14 +2471,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "efb6cfe53a6770f0ae388cb2c7f46264", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -2487,14 +2487,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1476, SectorSize = 512, Md5 = "6116f7c1397cadd55ba8d79c2aadc9dd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1476 } - } + ] }, new BlockImageTestExpected { @@ -2503,14 +2503,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "93100f8d86e5d0d0e6340f59c52a5e0d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2519,14 +2519,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "cf7b7d43aa70863bedcc4a8432a5af67", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2535,14 +2535,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "02259cd5fbcc20f8484aa6bece7a37c6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -2551,14 +2551,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "073a172879a71339ef4b00ebb47b67fc", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2567,14 +2567,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "d9890897130d0fc1eee3dbf4d9b0440f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -2583,14 +2583,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2788, SectorSize = 512, Md5 = "09ca721aa883d5bbaa422c7943b0782c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2788 } - } + ] }, new BlockImageTestExpected { @@ -2607,14 +2607,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1476, SectorSize = 512, Md5 = "affca3d8a008f74e515e11ed404214c2", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1476 } - } + ] }, new BlockImageTestExpected { @@ -2623,14 +2623,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "9827ba1b3e9cac41263caabd862e78f9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -2639,14 +2639,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "67d299c6e83f3f0fbcb8faa9ffa422c1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2655,14 +2655,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "81d3bfec7b201f6a4503eb24c4394d4a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -2671,14 +2671,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "d07f7ffaee89742c6477aaaf94eb5715", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2687,14 +2687,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "56af87802a9852e6e01e08d544740816", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2703,14 +2703,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1512, SectorSize = 512, Md5 = "9b194e5ec9cd4221bf42ae4eb1d0a7f3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1512 } - } + ] }, new BlockImageTestExpected { @@ -2719,14 +2719,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "d9db52d992a76bf3bbc626ff844215a5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -2735,14 +2735,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 1680, SectorSize = 512, Md5 = "aed103aaad0025f7010f73057d2d5765", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1680 } - } + ] }, new BlockImageTestExpected { @@ -2759,14 +2759,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 5904, SectorSize = 512, Md5 = "72f6e8f92c6edb55217a897dcfd8d69a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 5904 } - } + ] }, new BlockImageTestExpected { @@ -2783,14 +2783,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "6d505db2da80950248c66b05ab29fdd1", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -2807,14 +2807,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "084d4d75f5e780cb9ec66a2fa784c371", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2823,14 +2823,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "1e06f21a1c11ea3347212da115bca08f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2839,14 +2839,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "8eb8cb310feaf03c69fffd4f6e729847", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -2855,14 +2855,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "3fc3a03d049416d81f81cc3b9ea8e5de", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -2871,14 +2871,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "2bfd2e0a81bad704f8fc7758358cfcca", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -2887,14 +2887,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "3c4becd695ed25866d39966a9a93c2d9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -2911,14 +2911,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2460, SectorSize = 512, Md5 = "72282e11f7d91bf9c090b550fabfe80d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2460 } - } + ] }, new BlockImageTestExpected { @@ -2927,14 +2927,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2720, SectorSize = 512, Md5 = "457c1126dc7f36bbbabe9e17e90372e3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2720 } - } + ] }, new BlockImageTestExpected { @@ -2943,14 +2943,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2788, SectorSize = 512, Md5 = "852181d5913c6f290872c66bbe992314", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2788 } - } + ] }, new BlockImageTestExpected { @@ -2959,14 +2959,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2980cc32504c945598dc50f1db576994", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -2975,14 +2975,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "c1c58d74fffb3656dd7f60f74ae8a629", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -2991,14 +2991,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3024, SectorSize = 512, Md5 = "0a72fbb53701d31125adf37eef85623f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3024 } - } + ] }, new BlockImageTestExpected { @@ -3007,14 +3007,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "e45d41a61fbe48f328c995fcc10a5548", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -3023,14 +3023,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "81c604e56882d8e58b855fbc8f0b7519", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -3039,14 +3039,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "15f71b92bd72aba5d80bf70eca4d5b1e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -3055,14 +3055,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3528, SectorSize = 512, Md5 = "b1326b772a804b51001ed4f5cb0e6a18", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3528 } - } + ] }, new BlockImageTestExpected { @@ -3079,14 +3079,14 @@ public class RayDIM : BlockMediaImageTest Sectors = 3772, SectorSize = 512, Md5 = "a5bb324b948e477ca6fdeee6c429752d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3772 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/RsIde.cs b/Aaru.Tests/Images/RsIde.cs index 2ce9fac27..97d64b7e2 100644 --- a/Aaru.Tests/Images/RsIde.cs +++ b/Aaru.Tests/Images/RsIde.cs @@ -39,8 +39,8 @@ public class RsIde : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "RS-IDE"); public override IMediaImage Plugin => new Aaru.Images.RsIde(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "divide.hdf.lz", @@ -48,14 +48,14 @@ public class RsIde : BlockMediaImageTest Sectors = 20480, SectorSize = 512, Md5 = "ee7b8fe07784f2ebacc18da1fc248f5a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 20417 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/SaveDskF.cs b/Aaru.Tests/Images/SaveDskF.cs index e2866b479..60168dc87 100644 --- a/Aaru.Tests/Images/SaveDskF.cs +++ b/Aaru.Tests/Images/SaveDskF.cs @@ -39,8 +39,8 @@ public class SaveDskF : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "SaveDskF"); public override IMediaImage Plugin => new Aaru.Images.SaveDskF(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "5dd8_c.dsk", @@ -288,14 +288,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 320, SectorSize = 512, Md5 = "d81f5cb64fd0b99f138eab34110bbc3c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 320 } - } + ] }, new BlockImageTestExpected { @@ -304,14 +304,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 360, SectorSize = 512, Md5 = "a89006a75d13bee9202d1d6e52721ccb", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 360 } - } + ] }, new BlockImageTestExpected { @@ -320,14 +320,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 400, SectorSize = 512, Md5 = "e1ad4a022778d7a0b24a93d8e68a59dc", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 400 } - } + ] }, new BlockImageTestExpected { @@ -336,14 +336,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 410, SectorSize = 512, Md5 = "353f3c2125ab6f74e3a271b60ad34840", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 410 } - } + ] }, new BlockImageTestExpected { @@ -352,14 +352,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "319fa8bef964c2a63e34bdb48e77cc4e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -368,14 +368,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1804, SectorSize = 512, Md5 = "306a61469b4c3c83f3e5f9ae409d83cd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1804 } - } + ] }, new BlockImageTestExpected { @@ -384,14 +384,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "beef1cdb004dc69391d6b3d508988b95", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -408,14 +408,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "0aef12c906b744101b932d799ca88a78", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -424,14 +424,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 820, SectorSize = 512, Md5 = "348d12add1ed226cd712a4a6a10d1a34", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 820 } - } + ] }, new BlockImageTestExpected { @@ -440,14 +440,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "1c36b819cfe355c11360bc120c9216fe", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -456,14 +456,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "25114403c11e337480e2afc4e6e32108", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -472,14 +472,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "3d7760ddaa55cd258057773d15106b78", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -488,14 +488,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "29054ef703394ee3b35e849468a412ba", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -504,14 +504,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "c91e852828c2aeee2fc94a6adbeed0ae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -520,14 +520,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "efb6cfe53a6770f0ae388cb2c7f46264", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -536,14 +536,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1476, SectorSize = 512, Md5 = "6116f7c1397cadd55ba8d79c2aadc9dd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1476 } - } + ] }, new BlockImageTestExpected { @@ -552,14 +552,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "93100f8d86e5d0d0e6340f59c52a5e0d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -568,14 +568,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "cf7b7d43aa70863bedcc4a8432a5af67", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -584,14 +584,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "215198cf2a336e718208fc207bb62c6d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -600,14 +600,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3116, SectorSize = 512, Md5 = "2c96964b5d91444302e21721c25ea120", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3116 } - } + ] }, new BlockImageTestExpected { @@ -616,14 +616,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "02259cd5fbcc20f8484aa6bece7a37c6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -632,14 +632,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "073a172879a71339ef4b00ebb47b67fc", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -648,14 +648,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "d9890897130d0fc1eee3dbf4d9b0440f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -664,14 +664,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2788, SectorSize = 512, Md5 = "09ca721aa883d5bbaa422c7943b0782c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2788 } - } + ] }, new BlockImageTestExpected { @@ -688,14 +688,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1968, SectorSize = 512, Md5 = "9a8670fbaf6307b8d5f32aa10e1be435", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1968 } - } + ] }, new BlockImageTestExpected { @@ -704,14 +704,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1968, SectorSize = 512, Md5 = "05d29642cdcddafa0dcaff91682f8fe0", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1968 } - } + ] }, new BlockImageTestExpected { @@ -728,14 +728,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2132, SectorSize = 512, Md5 = "a99603cd3219aab1299e66b2999f0e57", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2132 } - } + ] }, new BlockImageTestExpected { @@ -760,14 +760,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "9827ba1b3e9cac41263caabd862e78f9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -776,14 +776,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "2e69bbd591ab736e471834ae03dde9a6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -792,14 +792,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "81d3bfec7b201f6a4503eb24c4394d4a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -808,14 +808,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "26532a62985b51a2c3b877a57f6d257b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -824,14 +824,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a7771acff766557cc23b8c6943b588f9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -840,14 +840,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "d07f7ffaee89742c6477aaaf94eb5715", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -856,14 +856,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "56af87802a9852e6e01e08d544740816", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -904,14 +904,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1494, SectorSize = 512, Md5 = "fd7fb1ba11cdfe11db54af0322abf59d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1494 } - } + ] }, new BlockImageTestExpected { @@ -920,14 +920,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "d9db52d992a76bf3bbc626ff844215a5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -936,14 +936,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "5949d0be57ce8bffcda7c4be4d1348ee", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -968,14 +968,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 5760, SectorSize = 512, Md5 = "4aeafaf2a088d6a7406856dce8118567", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 5760 } - } + ] }, new BlockImageTestExpected { @@ -1024,14 +1024,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3608, SectorSize = 512, Md5 = "967726aede85c68f66887672078f8856", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3608 } - } + ] }, new BlockImageTestExpected { @@ -1048,14 +1048,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3772, SectorSize = 512, Md5 = "3fa4f87d7058ba940b88e0d80f0d7ded", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3772 } - } + ] }, new BlockImageTestExpected { @@ -1080,14 +1080,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "b042310181410227d0072fef1e98a989", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1104,14 +1104,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "1e06f21a1c11ea3347212da115bca08f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1120,14 +1120,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "3fc3a03d049416d81f81cc3b9ea8e5de", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -1136,14 +1136,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "7e3bf04f3660dd1052a335dc99441e44", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1152,14 +1152,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "8eb8cb310feaf03c69fffd4f6e729847", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1168,14 +1168,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "a58fd062f024b95714f1223a8bc2232f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -1184,14 +1184,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "2bfd2e0a81bad704f8fc7758358cfcca", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1200,14 +1200,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "a79ec33c623697b4562dacaed31523b8", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -1216,14 +1216,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "3c4becd695ed25866d39966a9a93c2d9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1264,14 +1264,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2460, SectorSize = 512, Md5 = "72282e11f7d91bf9c090b550fabfe80d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2460 } - } + ] }, new BlockImageTestExpected { @@ -1280,14 +1280,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2720, SectorSize = 512, Md5 = "457c1126dc7f36bbbabe9e17e90372e3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2720 } - } + ] }, new BlockImageTestExpected { @@ -1296,14 +1296,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2788, SectorSize = 512, Md5 = "852181d5913c6f290872c66bbe992314", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2788 } - } + ] }, new BlockImageTestExpected { @@ -1312,14 +1312,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2980cc32504c945598dc50f1db576994", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -1328,14 +1328,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "c1c58d74fffb3656dd7f60f74ae8a629", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -1344,14 +1344,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 2988, SectorSize = 512, Md5 = "097bb2fd34cee5ebde7b5641975ffd60", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2988 } - } + ] }, new BlockImageTestExpected { @@ -1360,14 +1360,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "e45d41a61fbe48f328c995fcc10a5548", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -1376,14 +1376,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3320, SectorSize = 512, Md5 = "c25f2a57c71db1cd4fea2263598f544a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3320 } - } + ] }, new BlockImageTestExpected { @@ -1392,14 +1392,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "15f71b92bd72aba5d80bf70eca4d5b1e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -1408,14 +1408,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "d88c8d818e238c9e52b8588b5fd52efe", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -1440,14 +1440,14 @@ public class SaveDskF : BlockMediaImageTest Sectors = 3680, SectorSize = 512, Md5 = "3d5fcdaf627257ae9f50a06bdba26965", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3680 } - } + ] }, new BlockImageTestExpected { @@ -1481,5 +1481,5 @@ public class SaveDskF : BlockMediaImageTest SectorSize = 512, Md5 = "2770e5b1b7935ca6e9695a32008b936a" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/ShrinkWrap/DiskCopy42.cs b/Aaru.Tests/Images/ShrinkWrap/DiskCopy42.cs index c723263d4..d3faacc93 100644 --- a/Aaru.Tests/Images/ShrinkWrap/DiskCopy42.cs +++ b/Aaru.Tests/Images/ShrinkWrap/DiskCopy42.cs @@ -41,8 +41,8 @@ public class DiskCopy42 : BlockMediaImageTest public override IMediaImage Plugin => new Aaru.Images.DiskCopy42(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "DC6_RW_HFS_1440.image.lz", @@ -66,14 +66,14 @@ public class DiskCopy42 : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -82,14 +82,14 @@ public class DiskCopy42 : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -107,5 +107,5 @@ public class DiskCopy42 : BlockMediaImageTest SectorSize = 512, Md5 = "a72da7aedadbe194c22a3d71c62e4766" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/ShrinkWrap/DiskDup.cs b/Aaru.Tests/Images/ShrinkWrap/DiskDup.cs index 27baff4ad..ce607d321 100644 --- a/Aaru.Tests/Images/ShrinkWrap/DiskDup.cs +++ b/Aaru.Tests/Images/ShrinkWrap/DiskDup.cs @@ -42,8 +42,8 @@ public class DiskDup : BlockMediaImageTest public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "CDROM.lz", @@ -83,14 +83,14 @@ public class DiskDup : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -99,14 +99,14 @@ public class DiskDup : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -115,14 +115,14 @@ public class DiskDup : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -148,5 +148,5 @@ public class DiskDup : BlockMediaImageTest SectorSize = 512, Md5 = "7fbf0251a93cb36d98e68b7d19624de5" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/ShrinkWrap/NDIF/ROCo.cs b/Aaru.Tests/Images/ShrinkWrap/NDIF/ROCo.cs index 1bdc07460..ee52251d5 100644 --- a/Aaru.Tests/Images/ShrinkWrap/NDIF/ROCo.cs +++ b/Aaru.Tests/Images/ShrinkWrap/NDIF/ROCo.cs @@ -47,8 +47,8 @@ public class ROCo : BlockMediaImageTest public override IMediaImage Plugin => new Ndif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "CDROM.img", @@ -88,14 +88,14 @@ public class ROCo : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -104,14 +104,14 @@ public class ROCo : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -120,14 +120,14 @@ public class ROCo : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -153,5 +153,5 @@ public class ROCo : BlockMediaImageTest SectorSize = 512, Md5 = "7fbf0251a93cb36d98e68b7d19624de5" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/ShrinkWrap/NDIF/RdWr.cs b/Aaru.Tests/Images/ShrinkWrap/NDIF/RdWr.cs index 9250d037b..0c85f600c 100644 --- a/Aaru.Tests/Images/ShrinkWrap/NDIF/RdWr.cs +++ b/Aaru.Tests/Images/ShrinkWrap/NDIF/RdWr.cs @@ -46,8 +46,8 @@ public class RdWr : BlockMediaImageTest public override IMediaImage Plugin => new Ndif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "CDROM.img", @@ -87,14 +87,14 @@ public class RdWr : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -103,14 +103,14 @@ public class RdWr : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -119,14 +119,14 @@ public class RdWr : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -152,5 +152,5 @@ public class RdWr : BlockMediaImageTest SectorSize = 512, Md5 = "7fbf0251a93cb36d98e68b7d19624de5" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/ShrinkWrap/NDIF/Rdxx.cs b/Aaru.Tests/Images/ShrinkWrap/NDIF/Rdxx.cs index 0ba8821ee..d24ae988c 100644 --- a/Aaru.Tests/Images/ShrinkWrap/NDIF/Rdxx.cs +++ b/Aaru.Tests/Images/ShrinkWrap/NDIF/Rdxx.cs @@ -45,8 +45,8 @@ public class Rdxx : BlockMediaImageTest public override IMediaImage Plugin => new Ndif(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "CDROM.img", @@ -86,14 +86,14 @@ public class Rdxx : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -102,14 +102,14 @@ public class Rdxx : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -118,14 +118,14 @@ public class Rdxx : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -151,5 +151,5 @@ public class Rdxx : BlockMediaImageTest SectorSize = 512, Md5 = "7fbf0251a93cb36d98e68b7d19624de5" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/ShrinkWrap/Raw.cs b/Aaru.Tests/Images/ShrinkWrap/Raw.cs index f469189c4..905379627 100644 --- a/Aaru.Tests/Images/ShrinkWrap/Raw.cs +++ b/Aaru.Tests/Images/ShrinkWrap/Raw.cs @@ -42,8 +42,8 @@ public class Raw : BlockMediaImageTest public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "CDROM.lz", @@ -83,14 +83,14 @@ public class Raw : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "ff419213080574056ebd9adf7bab3d32", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -99,14 +99,14 @@ public class Raw : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "c2be571406cf6353269faa59a4a8c0a4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -115,14 +115,14 @@ public class Raw : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "92ea7a359957012a682ba126cfdef0ce", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -148,5 +148,5 @@ public class Raw : BlockMediaImageTest SectorSize = 512, Md5 = "7fbf0251a93cb36d98e68b7d19624de5" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/TeleDisk.cs b/Aaru.Tests/Images/TeleDisk.cs index c4a743b96..02bdcdaa0 100644 --- a/Aaru.Tests/Images/TeleDisk.cs +++ b/Aaru.Tests/Images/TeleDisk.cs @@ -39,8 +39,8 @@ public class TeleDisk : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "TeleDisk"); public override IMediaImage Plugin => new Aaru.Images.TeleDisk(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "md2dd8.td0.lz", @@ -48,14 +48,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 640, SectorSize = 512, Md5 = "beef1cdb004dc69391d6b3d508988b95", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 640 } - } + ] }, new BlockImageTestExpected { @@ -72,14 +72,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 820, SectorSize = 512, Md5 = "348d12add1ed226cd712a4a6a10d1a34", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 820 } - } + ] }, new BlockImageTestExpected { @@ -88,14 +88,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "1c36b819cfe355c11360bc120c9216fe", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -104,14 +104,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "25114403c11e337480e2afc4e6e32108", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -120,14 +120,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "3d7760ddaa55cd258057773d15106b78", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -144,14 +144,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "c91e852828c2aeee2fc94a6adbeed0ae", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -160,14 +160,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 840, SectorSize = 512, Md5 = "efb6cfe53a6770f0ae388cb2c7f46264", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 840 } - } + ] }, new BlockImageTestExpected { @@ -176,14 +176,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1476, SectorSize = 512, Md5 = "6116f7c1397cadd55ba8d79c2aadc9dd", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1476 } - } + ] }, new BlockImageTestExpected { @@ -192,14 +192,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "93100f8d86e5d0d0e6340f59c52a5e0d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -208,14 +208,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "cf7b7d43aa70863bedcc4a8432a5af67", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -232,14 +232,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "073a172879a71339ef4b00ebb47b67fc", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -248,14 +248,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "d9890897130d0fc1eee3dbf4d9b0440f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -264,14 +264,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 2788, SectorSize = 512, Md5 = "09ca721aa883d5bbaa422c7943b0782c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2788 } - } + ] }, new BlockImageTestExpected { @@ -280,14 +280,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 2400, SectorSize = 512, Md5 = "02259cd5fbcc20f8484aa6bece7a37c6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2400 } - } + ] }, new BlockImageTestExpected { @@ -304,14 +304,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "c533488a21098a62c85f1649abda2803", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -320,14 +320,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "db9cfb6eea18820b7a7e0b5b45594471", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -336,14 +336,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "26532a62985b51a2c3b877a57f6d257b", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -352,14 +352,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "a7771acff766557cc23b8c6943b588f9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -368,14 +368,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "d07f7ffaee89742c6477aaaf94eb5715", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -384,14 +384,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "456390a9c6ab05cb458a03c47296de08", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -400,14 +400,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "56af87802a9852e6e01e08d544740816", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -416,14 +416,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1494, SectorSize = 512, Md5 = "fd7fb1ba11cdfe11db54af0322abf59d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1494 } - } + ] }, new BlockImageTestExpected { @@ -432,14 +432,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "d9db52d992a76bf3bbc626ff844215a5", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -448,14 +448,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1660, SectorSize = 512, Md5 = "5949d0be57ce8bffcda7c4be4d1348ee", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1660 } - } + ] }, new BlockImageTestExpected { @@ -464,14 +464,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "de3f85896f771b7e5bc4c9e3926d64e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -552,14 +552,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "7e3bf04f3660dd1052a335dc99441e44", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -568,14 +568,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "8eb8cb310feaf03c69fffd4f6e729847", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -584,14 +584,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3444, SectorSize = 512, Md5 = "a58fd062f024b95714f1223a8bc2232f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3444 } - } + ] }, new BlockImageTestExpected { @@ -600,14 +600,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "2bfd2e0a81bad704f8fc7758358cfcca", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -616,14 +616,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "a79ec33c623697b4562dacaed31523b8", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -632,14 +632,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "dbd52e9e684f97d9e2292811242bb24e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -648,14 +648,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "3c4becd695ed25866d39966a9a93c2d9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -664,14 +664,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 2460, SectorSize = 512, Md5 = "72282e11f7d91bf9c090b550fabfe80d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2460 } - } + ] }, new BlockImageTestExpected { @@ -680,14 +680,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 2720, SectorSize = 512, Md5 = "457c1126dc7f36bbbabe9e17e90372e3", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2720 } - } + ] }, new BlockImageTestExpected { @@ -696,14 +696,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 2788, SectorSize = 512, Md5 = "852181d5913c6f290872c66bbe992314", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2788 } - } + ] }, new BlockImageTestExpected { @@ -712,14 +712,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "2980cc32504c945598dc50f1db576994", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -728,14 +728,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 2952, SectorSize = 512, Md5 = "c1c58d74fffb3656dd7f60f74ae8a629", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2952 } - } + ] }, new BlockImageTestExpected { @@ -744,14 +744,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3200, SectorSize = 512, Md5 = "e45d41a61fbe48f328c995fcc10a5548", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3200 } - } + ] }, new BlockImageTestExpected { @@ -760,14 +760,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3320, SectorSize = 512, Md5 = "c25f2a57c71db1cd4fea2263598f544a", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3320 } - } + ] }, new BlockImageTestExpected { @@ -776,14 +776,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3360, SectorSize = 512, Md5 = "15f71b92bd72aba5d80bf70eca4d5b1e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3360 } - } + ] }, new BlockImageTestExpected { @@ -792,14 +792,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "d88c8d818e238c9e52b8588b5fd52efe", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -808,14 +808,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 2880, SectorSize = 512, Md5 = "b4a602f67903c46eef62addb0780aa56", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 2880 } - } + ] }, new BlockImageTestExpected { @@ -833,5 +833,5 @@ public class TeleDisk : BlockMediaImageTest SectorSize = 512, Md5 = "a8142f403d972f96787eb76655f5d42c" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/Toast.cs b/Aaru.Tests/Images/Toast.cs index 79b5e92e0..1a4e65bb5 100644 --- a/Aaru.Tests/Images/Toast.cs +++ b/Aaru.Tests/Images/Toast.cs @@ -40,8 +40,8 @@ public class Toast : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "Roxio Toast"); public override IMediaImage Plugin => new ZZZRawImage(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "toast_3.5.7_iso9660_xa_apple.toast.lz", @@ -49,8 +49,8 @@ public class Toast : OpticalMediaImageTest Sectors = 826, Md5 = "d6bbb43811561cb9fa415b1fa05dcfdb", LongMd5 = "577e9f2b27a8181669b0e96eb55eb688", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -59,8 +59,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 946, @@ -68,9 +68,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "DISK_UTILS" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -79,8 +79,8 @@ public class Toast : OpticalMediaImageTest Sectors = 826, Md5 = "6f79117d7fc8649635896f2d0e2e9546", LongMd5 = "6dfb9b49b268392c0127664ca1e5a915", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -89,8 +89,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 946, @@ -98,9 +98,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "DISK_UTILS" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -109,8 +109,8 @@ public class Toast : OpticalMediaImageTest Sectors = 262, Md5 = "e7ce7b651b029ca8a4249ca1d8fad69c", LongMd5 = "7fa666dd62d11a537da5c48d0caf780b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -119,8 +119,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 244, @@ -128,9 +128,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "DISK_UTILS" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -139,8 +139,8 @@ public class Toast : OpticalMediaImageTest Sectors = 262, Md5 = "fc097ef49cc9b578cf31d6430dc13df2", LongMd5 = "8f4a95e750ed53e5a345e89d5cd839a6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -149,8 +149,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 244, @@ -158,9 +158,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "DISK_UTILS" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -169,8 +169,8 @@ public class Toast : OpticalMediaImageTest Sectors = 262, Md5 = "a8867952b5e0e5293871959b4b91ef48", LongMd5 = "1eb4cf2ed8f438646766b8a8a36954f7", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -179,8 +179,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 244, @@ -188,9 +188,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "DISK_UTILS" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -199,8 +199,8 @@ public class Toast : OpticalMediaImageTest Sectors = 831, Md5 = "e62b21444f0c895a396a63d136a35558", LongMd5 = "264213ffb43772397c562158d10b404a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -209,8 +209,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 951, @@ -218,9 +218,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "Disk utils" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -229,8 +229,8 @@ public class Toast : OpticalMediaImageTest Sectors = 262, Md5 = "ac825459dbbbf08c77c8b0fa7efde389", LongMd5 = "04262d65e3f09e417550d06dfc0bf9f3", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -239,8 +239,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 249, @@ -248,9 +248,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "Disk utils" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -259,8 +259,8 @@ public class Toast : OpticalMediaImageTest Sectors = 826, Md5 = "5ab7aab16d297a8cf5014e4af95acfcc", LongMd5 = "1fb4ac43c918f5a33df5920e35e05d4a", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -269,8 +269,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 946, @@ -278,9 +278,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "Disk utils" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -289,8 +289,8 @@ public class Toast : OpticalMediaImageTest Sectors = 262, Md5 = "3060b6c4a6096dd80c47c1d3b850370e", LongMd5 = "83d8b04d7bc6c77862aa9c48c75cdb4c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -299,8 +299,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 244, @@ -308,9 +308,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "Disk utils" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -319,8 +319,8 @@ public class Toast : OpticalMediaImageTest Sectors = 826, Md5 = "fd8a0d1d4faa28928afc3fc0bd5ae206", LongMd5 = "86d168eb16f47329f3e13f69d4a9300f", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -329,8 +329,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 946, @@ -338,9 +338,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "DISK_UTILS" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -349,8 +349,8 @@ public class Toast : OpticalMediaImageTest Sectors = 826, Md5 = "6284b4c7800a20b98618e29566e6e59f", LongMd5 = "103fde59a213126f6fe7319c15fea293", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -359,8 +359,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 946, @@ -368,9 +368,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "DISK_UTILS" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -379,8 +379,8 @@ public class Toast : OpticalMediaImageTest Sectors = 262, Md5 = "5c604e9b6c2caa9d23748a1b188f9614", LongMd5 = "24d5ffc906f4dd603818829f2a28c00c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -389,8 +389,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 244, @@ -398,9 +398,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "DISK_UTILS" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -409,8 +409,8 @@ public class Toast : OpticalMediaImageTest Sectors = 831, Md5 = "61c3ba8655a9076ac72c999ea5663787", LongMd5 = "964b12844c4b0159fc88631093496b91", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -419,8 +419,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 951, @@ -428,9 +428,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "Disk utils" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -439,8 +439,8 @@ public class Toast : OpticalMediaImageTest Sectors = 262, Md5 = "02d9e7c51156243c514ffe5140be4c6b", LongMd5 = "19693d6f99c6a1d59090bc47d0ca4466", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -449,8 +449,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 249, @@ -458,9 +458,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "Disk utils" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -469,8 +469,8 @@ public class Toast : OpticalMediaImageTest Sectors = 262, Md5 = "51d7be9014160e4052ce833b9511e901", LongMd5 = "34e2b00526e812272c0f980a7663284c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -479,8 +479,8 @@ public class Toast : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 244, @@ -488,9 +488,9 @@ public class Toast : OpticalMediaImageTest Type = "iso9660", VolumeName = "DISK_UTILS" } - } + ] } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/UltraISO/Alcohol.cs b/Aaru.Tests/Images/UltraISO/Alcohol.cs index 0711719dd..ec3bd8d81 100644 --- a/Aaru.Tests/Images/UltraISO/Alcohol.cs +++ b/Aaru.Tests/Images/UltraISO/Alcohol.cs @@ -41,8 +41,8 @@ public class Alcohol : OpticalMediaImageTest public override IMediaImage Plugin => new Aaru.Images.Alcohol120(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "cdiready_the_apprentice.mds", @@ -50,8 +50,8 @@ public class Alcohol : OpticalMediaImageTest Sectors = 279300, Md5 = "556d7d32e3c01c2087cc56b25fe5f66d", LongMd5 = "556d7d32e3c01c2087cc56b25fe5f66d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -228,7 +228,7 @@ public class Alcohol : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -237,8 +237,8 @@ public class Alcohol : OpticalMediaImageTest Sectors = 247073, Md5 = "c96a7bf12427078bab252d941716cc32", LongMd5 = "c96a7bf12427078bab252d941716cc32", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -351,7 +351,7 @@ public class Alcohol : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -360,8 +360,8 @@ public class Alcohol : OpticalMediaImageTest Sectors = 254265, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -370,8 +370,8 @@ public class Alcohol : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -386,9 +386,9 @@ public class Alcohol : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -397,8 +397,8 @@ public class Alcohol : OpticalMediaImageTest Sectors = 308224, Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -407,8 +407,8 @@ public class Alcohol : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -417,9 +417,9 @@ public class Alcohol : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -428,8 +428,8 @@ public class Alcohol : OpticalMediaImageTest Sectors = 471090, Md5 = "35cb08dd5fedfb8e9ad2918292e51791", LongMd5 = "35cb08dd5fedfb8e9ad2918292e51791", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -437,8 +437,8 @@ public class Alcohol : OpticalMediaImageTest End = 471089, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -447,9 +447,9 @@ public class Alcohol : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -458,8 +458,8 @@ public class Alcohol : OpticalMediaImageTest Sectors = 3455920, Md5 = "1cd9b9be5c5e337c5e6576156b84b726", LongMd5 = "1cd9b9be5c5e337c5e6576156b84b726", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -467,8 +467,8 @@ public class Alcohol : OpticalMediaImageTest End = 3455919, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 3455920, @@ -477,9 +477,9 @@ public class Alcohol : OpticalMediaImageTest VolumeName = "Test DVD", VolumeSerial = "483E25D50034BBB0" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -488,8 +488,8 @@ public class Alcohol : OpticalMediaImageTest Sectors = 2146357, Md5 = "5e1841b7cd6ac0a95b8ae6f110fd89f2", LongMd5 = "5e1841b7cd6ac0a95b8ae6f110fd89f2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -497,8 +497,8 @@ public class Alcohol : OpticalMediaImageTest End = 2146356, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -507,9 +507,9 @@ public class Alcohol : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -518,8 +518,8 @@ public class Alcohol : OpticalMediaImageTest Sectors = 303316, Md5 = "97e5bf1caf3998e818d40cd845c6ecc9", LongMd5 = "07b4d88c8f38cc0168a2f5725b31c52e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -632,8 +632,8 @@ public class Alcohol : OpticalMediaImageTest Pregap = 150, Flags = 0, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -641,9 +641,9 @@ public class Alcohol : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -652,8 +652,8 @@ public class Alcohol : OpticalMediaImageTest Sectors = 329158, Md5 = "9a19aa0df066732a8ec34025e8160248", LongMd5 = "e981f7dfdb522ba937fe75474e23a446", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -662,8 +662,8 @@ public class Alcohol : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -671,7 +671,7 @@ public class Alcohol : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -793,7 +793,7 @@ public class Alcohol : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/UltraISO/CloneCD.cs b/Aaru.Tests/Images/UltraISO/CloneCD.cs index 57fa8195c..0f08415d0 100644 --- a/Aaru.Tests/Images/UltraISO/CloneCD.cs +++ b/Aaru.Tests/Images/UltraISO/CloneCD.cs @@ -44,8 +44,8 @@ public class CloneCD : OpticalMediaImageTest public override IMediaImage Plugin => new CloneCd(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "cdiready_the_apprentice.ccd", @@ -54,8 +54,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "e159c422cba79ce772437458c11c00d8", LongMd5 = "e159c422cba79ce772437458c11c00d8", SubchannelMd5 = "f43afdef9df3fc5b3d74494f0908223f", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -232,7 +232,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -242,8 +242,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "e6b61ad780c72d162c3ceb784de1fbd2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -356,7 +356,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -366,8 +366,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "292b671b4b296a20511516557dbbd2b1", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -376,8 +376,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -392,9 +392,9 @@ public class CloneCD : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -404,8 +404,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "4b054ac37c290a91a47997c84c9978d6", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -414,8 +414,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -424,9 +424,9 @@ public class CloneCD : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -436,8 +436,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "97e5bf1caf3998e818d40cd845c6ecc9", LongMd5 = "07b4d88c8f38cc0168a2f5725b31c52e", SubchannelMd5 = "74910fc131a456fa3d39a666dcee3dcc", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -550,8 +550,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 0, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -559,9 +559,9 @@ public class CloneCD : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -571,8 +571,8 @@ public class CloneCD : OpticalMediaImageTest Md5 = "8d8493eb8eba6c67be7a8f47d4fde971", LongMd5 = "5a9eb4f35ecc39de5c011a2bac8549b5", SubchannelMd5 = "159b910e0ec1a88e004b9bcebdbde747", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -581,8 +581,8 @@ public class CloneCD : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -590,7 +590,7 @@ public class CloneCD : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -712,7 +712,7 @@ public class CloneCD : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/UltraISO/Cuesheet.cs b/Aaru.Tests/Images/UltraISO/Cuesheet.cs index 2eee40c5c..f6a127d40 100644 --- a/Aaru.Tests/Images/UltraISO/Cuesheet.cs +++ b/Aaru.Tests/Images/UltraISO/Cuesheet.cs @@ -42,8 +42,8 @@ public class Cuesheet : OpticalMediaImageTest public override IMediaImage Plugin => new CdrWin(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "cdiready_the_apprentice.cue", @@ -51,8 +51,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 279300, Md5 = "d3b069721052a1093151c6f7504ca593", LongMd5 = "d3b069721052a1093151c6f7504ca593", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -229,7 +229,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -238,8 +238,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 247073, Md5 = "c041297aca68c206d95d20aa9435e01b", LongMd5 = "c041297aca68c206d95d20aa9435e01b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -352,7 +352,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -361,8 +361,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 254265, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -371,8 +371,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -387,9 +387,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -398,8 +398,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 308224, Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -408,8 +408,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -418,9 +418,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -429,8 +429,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 471090, Md5 = "35cb08dd5fedfb8e9ad2918292e51791", LongMd5 = "c7ee3dc509bb40948c383686b6f66da9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -439,8 +439,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -449,9 +449,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -460,8 +460,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 3455920, Md5 = "ea4cfa28a4e449d7b59251b98394c7f4", LongMd5 = "282de41e0118781f8a9216b0a4a31088", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -470,8 +470,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 3455920, @@ -480,9 +480,9 @@ public class Cuesheet : OpticalMediaImageTest VolumeName = "Test DVD", VolumeSerial = "483E25D50034BBB0" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -491,8 +491,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 2146357, Md5 = "5e1841b7cd6ac0a95b8ae6f110fd89f2", LongMd5 = "8325ba263cfa419f9566de93e55248d5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -501,8 +501,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -511,9 +511,9 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, /* This image is invalid an impossible to process properly due to a bug in UltraISO new OpticalImageTestExpected @@ -646,8 +646,8 @@ public class Cuesheet : OpticalMediaImageTest Sectors = 329158, Md5 = "9a19aa0df066732a8ec34025e8160248", LongMd5 = "e981f7dfdb522ba937fe75474e23a446", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -656,8 +656,8 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -665,7 +665,7 @@ public class Cuesheet : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -787,7 +787,7 @@ public class Cuesheet : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/UltraISO/Nero.cs b/Aaru.Tests/Images/UltraISO/Nero.cs index 8c8aa2509..c5e1f3f9f 100644 --- a/Aaru.Tests/Images/UltraISO/Nero.cs +++ b/Aaru.Tests/Images/UltraISO/Nero.cs @@ -39,8 +39,8 @@ public class Nero : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "UltraISO", "Nero"); public override IMediaImage Plugin => new Aaru.Images.Nero(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "cdiready_the_apprentice.nrg", @@ -49,8 +49,8 @@ public class Nero : OpticalMediaImageTest Md5 = "f6bd226d3f249fa821460aeb1393cf3b", LongMd5 = "f6bd226d3f249fa821460aeb1393cf3b", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -227,7 +227,7 @@ public class Nero : OpticalMediaImageTest Pregap = 18446744073709482466, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -237,8 +237,8 @@ public class Nero : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -351,7 +351,7 @@ public class Nero : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -361,8 +361,8 @@ public class Nero : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -371,8 +371,8 @@ public class Nero : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -387,9 +387,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -399,8 +399,8 @@ public class Nero : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -409,8 +409,8 @@ public class Nero : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -419,9 +419,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -430,8 +430,8 @@ public class Nero : OpticalMediaImageTest Sectors = 471090, Md5 = "35cb08dd5fedfb8e9ad2918292e51791", LongMd5 = "35cb08dd5fedfb8e9ad2918292e51791", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -439,8 +439,8 @@ public class Nero : OpticalMediaImageTest End = 471089, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -449,9 +449,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "12_2_RELEASE_AMD64_CD" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -460,8 +460,8 @@ public class Nero : OpticalMediaImageTest Sectors = 3455920, Md5 = "1cd9b9be5c5e337c5e6576156b84b726", LongMd5 = "1cd9b9be5c5e337c5e6576156b84b726", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -469,8 +469,8 @@ public class Nero : OpticalMediaImageTest End = 3455919, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 3455920, @@ -479,9 +479,9 @@ public class Nero : OpticalMediaImageTest VolumeName = "Test DVD", VolumeSerial = "483E25D50034BBB0" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -490,8 +490,8 @@ public class Nero : OpticalMediaImageTest Sectors = 2146357, Md5 = "5e1841b7cd6ac0a95b8ae6f110fd89f2", LongMd5 = "5e1841b7cd6ac0a95b8ae6f110fd89f2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -499,8 +499,8 @@ public class Nero : OpticalMediaImageTest End = 2146356, Pregap = 0, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -509,9 +509,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "SU1100.001" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -521,8 +521,8 @@ public class Nero : OpticalMediaImageTest Md5 = "31d07fe62a6505c1d15a88d2c264f3b5", LongMd5 = "916333b50640479f0c989997bb6de629", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -635,8 +635,8 @@ public class Nero : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 14, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 69136, @@ -644,9 +644,9 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "Melanie C" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -656,8 +656,8 @@ public class Nero : OpticalMediaImageTest Md5 = "f09312ba25a479fb81912a2965babd22", LongMd5 = "f48603d11883593f45ec4a3824681e4e", SubchannelMd5 = "UNKNOWN", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -666,8 +666,8 @@ public class Nero : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -675,7 +675,7 @@ public class Nero : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -797,7 +797,7 @@ public class Nero : OpticalMediaImageTest Pregap = 0, Flags = 2 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/Virtual98.cs b/Aaru.Tests/Images/Virtual98.cs index 3c5e63cd1..dac94e474 100644 --- a/Aaru.Tests/Images/Virtual98.cs +++ b/Aaru.Tests/Images/Virtual98.cs @@ -39,8 +39,8 @@ public class Virtual98 : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "Virtual98"); public override IMediaImage Plugin => new Aaru.Images.Virtual98(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "v98_128.hdd.lz", @@ -97,5 +97,5 @@ public class Virtual98 : BlockMediaImageTest SectorSize = 256, Md5 = "f5906261c390ea5c5a0e46864fb066cd" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/VirtualBox/VirtualPC.cs b/Aaru.Tests/Images/VirtualBox/VirtualPC.cs index 21ac9cffa..d07adbfb9 100644 --- a/Aaru.Tests/Images/VirtualBox/VirtualPC.cs +++ b/Aaru.Tests/Images/VirtualBox/VirtualPC.cs @@ -42,8 +42,8 @@ public class VirtualPc : BlockMediaImageTest public override IMediaImage Plugin => new Vhd(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "virtualbox_linux_dynamic_250mb.vhd.lz", @@ -92,5 +92,5 @@ public class VirtualPc : BlockMediaImageTest SectorSize = 512, Md5 = "f1c9645dbc14efddc7d8a322685f26eb" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/VirtualPC/Raw.cs b/Aaru.Tests/Images/VirtualPC/Raw.cs index 1fb1ad660..ccf1a7ef5 100644 --- a/Aaru.Tests/Images/VirtualPC/Raw.cs +++ b/Aaru.Tests/Images/VirtualPC/Raw.cs @@ -40,8 +40,8 @@ public class Raw : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "VirtualPC"); public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "vpc106b_fixed_150mb_fat16.lz", @@ -81,14 +81,14 @@ public class Raw : BlockMediaImageTest Sectors = 266016, SectorSize = 512, Md5 = "5f4d4c4f268ea19c91bf4fb49f4894b6", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 17, Length = 265727 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/VirtualPC/VirtualPC.cs b/Aaru.Tests/Images/VirtualPC/VirtualPC.cs index c84ad917a..4a190a637 100644 --- a/Aaru.Tests/Images/VirtualPC/VirtualPC.cs +++ b/Aaru.Tests/Images/VirtualPC/VirtualPC.cs @@ -40,8 +40,8 @@ public class VirtualPc : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "VirtualPC"); public override IMediaImage Plugin => new Vhd(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "vpc40_dynamic_128mb.vhd.lz", @@ -49,14 +49,14 @@ public class VirtualPc : BlockMediaImageTest Sectors = 261936, SectorSize = 512, Md5 = "cc634bb9bbf2dcdd88cfe251390e2049", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 17, Length = 261647 } - } + ] }, new BlockImageTestExpected { @@ -65,14 +65,14 @@ public class VirtualPc : BlockMediaImageTest Sectors = 261936, SectorSize = 512, Md5 = "0b6f655387e101c0249e922b1714a484", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 17, Length = 261647 } - } + ] }, new BlockImageTestExpected { @@ -81,14 +81,14 @@ public class VirtualPc : BlockMediaImageTest Sectors = 1052352, SectorSize = 512, Md5 = "12ebc62199ecaae97efe406ee891d68f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 1052289 } - } + ] }, new BlockImageTestExpected { @@ -97,14 +97,14 @@ public class VirtualPc : BlockMediaImageTest Sectors = 1052352, SectorSize = 512, Md5 = "4943fc799eddd6f386b2923847824ffc", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 63, Length = 1052289 } - } + ] }, new BlockImageTestExpected { @@ -202,5 +202,5 @@ public class VirtualPc : BlockMediaImageTest SectorSize = 512, Md5 = "4b4e98a5bba2469382132f9289ae1c57" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/cdrdao/cooked/nosub.cs b/Aaru.Tests/Images/cdrdao/cooked/nosub.cs index febb11bad..393987679 100644 --- a/Aaru.Tests/Images/cdrdao/cooked/nosub.cs +++ b/Aaru.Tests/Images/cdrdao/cooked/nosub.cs @@ -44,8 +44,8 @@ public class NoSub : OpticalMediaImageTest public override IMediaImage Plugin => new Cdrdao(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "report_audiocd.toc", @@ -54,8 +54,8 @@ public class NoSub : OpticalMediaImageTest SectorSize = 2352, Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -168,7 +168,7 @@ public class NoSub : OpticalMediaImageTest Pregap = 4, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -178,8 +178,8 @@ public class NoSub : OpticalMediaImageTest SectorSize = 2048, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -188,8 +188,8 @@ public class NoSub : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -204,9 +204,9 @@ public class NoSub : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -216,8 +216,8 @@ public class NoSub : OpticalMediaImageTest SectorSize = 2048, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -226,8 +226,8 @@ public class NoSub : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -242,9 +242,9 @@ public class NoSub : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -254,8 +254,8 @@ public class NoSub : OpticalMediaImageTest SectorSize = 2048, Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -264,8 +264,8 @@ public class NoSub : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -274,9 +274,9 @@ public class NoSub : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -286,8 +286,8 @@ public class NoSub : OpticalMediaImageTest SectorSize = 2048, Md5 = "f09312ba25a479fb81912a2965babd22", LongMd5 = "f48603d11883593f45ec4a3824681e4e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -296,8 +296,8 @@ public class NoSub : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -305,7 +305,7 @@ public class NoSub : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -427,7 +427,7 @@ public class NoSub : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/cdrdao/cooked/rw.cs b/Aaru.Tests/Images/cdrdao/cooked/rw.cs index 42dfa3355..c96bcbc28 100644 --- a/Aaru.Tests/Images/cdrdao/cooked/rw.cs +++ b/Aaru.Tests/Images/cdrdao/cooked/rw.cs @@ -44,8 +44,8 @@ public class Rw : OpticalMediaImageTest public override IMediaImage Plugin => new Cdrdao(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "report_audiocd.toc", @@ -55,8 +55,8 @@ public class Rw : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "d62fd0cdca05b4b42f7c17b316610e15", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -169,7 +169,7 @@ public class Rw : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -180,8 +180,8 @@ public class Rw : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "e89c610fbf1093480603de7e4b5fe99b", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -190,8 +190,8 @@ public class Rw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -206,9 +206,9 @@ public class Rw : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -219,8 +219,8 @@ public class Rw : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "7e67d6238f1cda44cb491e5f590f5794", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -229,8 +229,8 @@ public class Rw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -245,9 +245,9 @@ public class Rw : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -258,8 +258,8 @@ public class Rw : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "2ec808f5618ef407ae1f49cb23648914", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -268,8 +268,8 @@ public class Rw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -278,9 +278,9 @@ public class Rw : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -291,8 +291,8 @@ public class Rw : OpticalMediaImageTest Md5 = "f09312ba25a479fb81912a2965babd22", LongMd5 = "f48603d11883593f45ec4a3824681e4e", SubchannelMd5 = "6841e5744d8301c219742ecd61fd9ac4", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -301,8 +301,8 @@ public class Rw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -310,7 +310,7 @@ public class Rw : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -432,7 +432,7 @@ public class Rw : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/cdrdao/cooked/rw_raw.cs b/Aaru.Tests/Images/cdrdao/cooked/rw_raw.cs index 971c5404c..af0082bcb 100644 --- a/Aaru.Tests/Images/cdrdao/cooked/rw_raw.cs +++ b/Aaru.Tests/Images/cdrdao/cooked/rw_raw.cs @@ -44,8 +44,8 @@ public class rw_raw : OpticalMediaImageTest public override IMediaImage Plugin => new Cdrdao(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "report_audiocd.toc", @@ -55,8 +55,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "e68088c7f1236c2304778e976057bd6e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -169,7 +169,7 @@ public class rw_raw : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -180,8 +180,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "8ed5c39d7435aeac23e77478625f14f1", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -190,8 +190,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -206,9 +206,9 @@ public class rw_raw : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -219,8 +219,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "0ba3fa223e887fb955458fc7b40b0396", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -229,8 +229,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -245,9 +245,9 @@ public class rw_raw : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -258,8 +258,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "eaf6dcfb86e9aca9856d736f3b04c765", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -268,8 +268,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -278,9 +278,9 @@ public class rw_raw : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -291,8 +291,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "f09312ba25a479fb81912a2965babd22", LongMd5 = "f48603d11883593f45ec4a3824681e4e", SubchannelMd5 = "7ac088d8a737d8d39b1cced86d11c7b5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -301,8 +301,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -310,7 +310,7 @@ public class rw_raw : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -432,7 +432,7 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/cdrdao/raw/nosub.cs b/Aaru.Tests/Images/cdrdao/raw/nosub.cs index 6515ce49b..9849c922e 100644 --- a/Aaru.Tests/Images/cdrdao/raw/nosub.cs +++ b/Aaru.Tests/Images/cdrdao/raw/nosub.cs @@ -44,8 +44,8 @@ public class NoSub : OpticalMediaImageTest public override IMediaImage Plugin => new Cdrdao(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "report_audiocd.toc", @@ -54,8 +54,8 @@ public class NoSub : OpticalMediaImageTest SectorSize = 2352, Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -168,7 +168,7 @@ public class NoSub : OpticalMediaImageTest Pregap = 4, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -178,8 +178,8 @@ public class NoSub : OpticalMediaImageTest SectorSize = 2048, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -188,8 +188,8 @@ public class NoSub : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -204,9 +204,9 @@ public class NoSub : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -216,8 +216,8 @@ public class NoSub : OpticalMediaImageTest SectorSize = 2048, Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -226,8 +226,8 @@ public class NoSub : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -242,9 +242,9 @@ public class NoSub : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -254,8 +254,8 @@ public class NoSub : OpticalMediaImageTest SectorSize = 2048, Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -264,8 +264,8 @@ public class NoSub : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -274,9 +274,9 @@ public class NoSub : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -286,8 +286,8 @@ public class NoSub : OpticalMediaImageTest SectorSize = 2048, Md5 = "f09312ba25a479fb81912a2965babd22", LongMd5 = "f48603d11883593f45ec4a3824681e4e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -296,8 +296,8 @@ public class NoSub : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -305,7 +305,7 @@ public class NoSub : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -427,7 +427,7 @@ public class NoSub : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/cdrdao/raw/rw.cs b/Aaru.Tests/Images/cdrdao/raw/rw.cs index 8fb41ac25..e936ae9da 100644 --- a/Aaru.Tests/Images/cdrdao/raw/rw.cs +++ b/Aaru.Tests/Images/cdrdao/raw/rw.cs @@ -44,8 +44,8 @@ public class Rw : OpticalMediaImageTest public override IMediaImage Plugin => new Cdrdao(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "report_audiocd.toc", @@ -55,8 +55,8 @@ public class Rw : OpticalMediaImageTest Md5 = "c09f408a4416634d8ac1c1ffd0ed75a5", LongMd5 = "c09f408a4416634d8ac1c1ffd0ed75a5", SubchannelMd5 = "2dc7b6159f8ba4fc8c1c58407d7741ba", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -169,7 +169,7 @@ public class Rw : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -180,8 +180,8 @@ public class Rw : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "5bdb9b11d8bc01867f629134ee635f90", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -190,8 +190,8 @@ public class Rw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -206,9 +206,9 @@ public class Rw : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -219,8 +219,8 @@ public class Rw : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "2cee3bd721e3ecee6f426cbe7c7026c2", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -229,8 +229,8 @@ public class Rw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -245,9 +245,9 @@ public class Rw : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -258,8 +258,8 @@ public class Rw : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "7e39b9ba733af2efefcc4297ec01e66e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -268,8 +268,8 @@ public class Rw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -278,9 +278,9 @@ public class Rw : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -291,8 +291,8 @@ public class Rw : OpticalMediaImageTest Md5 = "d38c92fe94f3c3ac3c7799ff9866e46b", LongMd5 = "40b4ea8170056ea27190fd0bdaec3a6c", SubchannelMd5 = "24d557ef2fafe96991d9a15474e27eae", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -301,8 +301,8 @@ public class Rw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -310,7 +310,7 @@ public class Rw : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -432,7 +432,7 @@ public class Rw : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/cdrdao/raw/rw_raw.cs b/Aaru.Tests/Images/cdrdao/raw/rw_raw.cs index 0b25bdf12..ec952eec1 100644 --- a/Aaru.Tests/Images/cdrdao/raw/rw_raw.cs +++ b/Aaru.Tests/Images/cdrdao/raw/rw_raw.cs @@ -54,8 +54,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "cafcd998298d8d1d447ab2e567638c9e", LongMd5 = "092b4207604685c6b274068b6eca52c0", SubchannelMd5 = "607c53d8ea5589bbc8a3e4ff5857cb5d", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -64,8 +64,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 469652, @@ -73,9 +73,9 @@ public class rw_raw : OpticalMediaImageTest Type = "iso9660", VolumeName = "New Volume" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -86,8 +86,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "1787cdeab550752d159a8ecca62fe386", LongMd5 = "1787cdeab550752d159a8ecca62fe386", SubchannelMd5 = "4fa3d7dd5e1710878ac318986a677fb3", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -200,7 +200,7 @@ public class rw_raw : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -211,8 +211,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "d81b6abcfa5f84ba0647f38f86cc8fc8", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -221,8 +221,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -237,9 +237,9 @@ public class rw_raw : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -250,8 +250,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "bf4bbec517101d0d6f45d2e4d50cb875", LongMd5 = "3d3f9cf7d1ba2249b1e7960071e5af46", SubchannelMd5 = "935c5d899c1cf0e46fa571df99400253", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -260,8 +260,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 63562, @@ -276,9 +276,9 @@ public class rw_raw : OpticalMediaImageTest Type = "iso9660", VolumeName = "Winpower" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -289,8 +289,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "1e55aa420ca8f8ea77d5b597c9cfc19b", LongMd5 = "3af5f943ddb9427d9c63a4ce3b704db9", SubchannelMd5 = "2e9b8107254e46b7be689105f680ee84", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -299,8 +299,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Bootable = true, @@ -309,9 +309,9 @@ public class rw_raw : OpticalMediaImageTest Type = "iso9660", VolumeName = "ARCH_201901" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -321,8 +321,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "08629b564dc094927b657b8b9d2106d6", LongMd5 = "08629b564dc094927b657b8b9d2106d6", SubchannelMd5 = "4747b7451c06564582940008522c40a4", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -339,7 +339,7 @@ public class rw_raw : OpticalMediaImageTest Pregap = 0, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -350,8 +350,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "f09312ba25a479fb81912a2965babd22", LongMd5 = "f48603d11883593f45ec4a3824681e4e", SubchannelMd5 = "ed0ca0f9bcdd0ebae2671549bf13311e", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -360,8 +360,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1587, @@ -369,7 +369,7 @@ public class rw_raw : OpticalMediaImageTest Type = "iso9660", VolumeName = "" } - } + ] }, new TrackInfoTestExpected { @@ -491,7 +491,7 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 0 } - } + ] }, new OpticalImageTestExpected { @@ -501,8 +501,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "5a62e796e3d3224d4d7c4a94fa067947", LongMd5 = "84ce0389b12772b371bf93b9ef9cd0d6", SubchannelMd5 = "90f2548c86ea8fc9cde74ac89c01fad7", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -511,8 +511,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 7876, @@ -528,9 +528,9 @@ public class rw_raw : OpticalMediaImageTest VolumeName = "Session 1", VolumeSerial = "50958B61AF6A749E" } - } + ] } - } + ] }, new OpticalImageTestExpected { @@ -540,8 +540,8 @@ public class rw_raw : OpticalMediaImageTest Md5 = "e30dbde1dbb5a384e9005f148541abbe", LongMd5 = "23e2214500204f2c42ca2989f928fea2", SubchannelMd5 = "f738847620ace3f333dbc305321820a1", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -550,8 +550,8 @@ public class rw_raw : OpticalMediaImageTest Pregap = 150, Flags = 4, Number = 1, - FileSystems = new[] - { + FileSystems = + [ new FileSystemTest { Clusters = 1102, @@ -559,7 +559,7 @@ public class rw_raw : OpticalMediaImageTest Type = "iso9660", VolumeName = "VIDEOCD" } - } + ] }, new TrackInfoTestExpected { @@ -569,7 +569,7 @@ public class rw_raw : OpticalMediaImageTest Pregap = 0, Flags = 4 } - } + ] }, #region These test images violate the specifications and are not expected to work yet diff --git a/Aaru.Tests/Images/partclone.cs b/Aaru.Tests/Images/partclone.cs index 41d3eba5b..55470503b 100644 --- a/Aaru.Tests/Images/partclone.cs +++ b/Aaru.Tests/Images/partclone.cs @@ -40,8 +40,8 @@ public class Partclone : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "partclone"); public override IMediaImage Plugin => new PartClone(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "ext2.partclone.lz", @@ -57,14 +57,14 @@ public class Partclone : BlockMediaImageTest Sectors = 1012032, SectorSize = 512, Md5 = "f98b1a51ca2e7bf047d84969a2392a3d", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1012032 } - } + ] }, new BlockImageTestExpected { @@ -100,5 +100,5 @@ public class Partclone : BlockMediaImageTest SectorSize = 512, Md5 = "61cc3faa286364e7ad5bab18120c1151" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/pce/DiskCopy42.cs b/Aaru.Tests/Images/pce/DiskCopy42.cs index 668399a17..a0cc27443 100644 --- a/Aaru.Tests/Images/pce/DiskCopy42.cs +++ b/Aaru.Tests/Images/pce/DiskCopy42.cs @@ -41,8 +41,8 @@ public class DiskCopy42 : BlockMediaImageTest public override IMediaImage Plugin => new Aaru.Images.DiskCopy42(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "mf1dd_gcr.dc42.lz", @@ -50,14 +50,14 @@ public class DiskCopy42 : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "c5d92544c3e78b7f0a9b4baaa9a64eec", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] }, new BlockImageTestExpected { @@ -66,14 +66,14 @@ public class DiskCopy42 : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "de3f85896f771b7e5bc4c9e3926d64e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -82,14 +82,14 @@ public class DiskCopy42 : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "93e71b9ecdb39d3ec9245b4f451856d4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/pce/ImageDisk.cs b/Aaru.Tests/Images/pce/ImageDisk.cs index e468df54b..c3fa7ec6b 100644 --- a/Aaru.Tests/Images/pce/ImageDisk.cs +++ b/Aaru.Tests/Images/pce/ImageDisk.cs @@ -40,8 +40,8 @@ public class ImageDisk : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "pce", "ImageDisk"); public override IMediaImage Plugin => new Imd(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "md1dd_8.imd.lz", @@ -89,14 +89,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "fd54916f713d01b670c1a5df5e74a97f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -145,14 +145,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "c533488a21098a62c85f1649abda2803", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -161,14 +161,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "db9cfb6eea18820b7a7e0b5b45594471", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -177,14 +177,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "456390a9c6ab05cb458a03c47296de08", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -201,14 +201,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "de3f85896f771b7e5bc4c9e3926d64e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -233,14 +233,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3372, SectorSize = 512, Md5 = "7f9164dc43bffc895db751ba1d9b55a9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3372 } - } + ] }, new BlockImageTestExpected { @@ -257,14 +257,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "dbd52e9e684f97d9e2292811242bb24e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -299,14 +299,14 @@ public class ImageDisk : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "ccd4431139755c58f340681f63510642", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/pce/TeleDisk.cs b/Aaru.Tests/Images/pce/TeleDisk.cs index 6c8ce9f22..6ae16d05d 100644 --- a/Aaru.Tests/Images/pce/TeleDisk.cs +++ b/Aaru.Tests/Images/pce/TeleDisk.cs @@ -39,8 +39,8 @@ public class TeleDisk : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "pce", "TeleDisk"); public override IMediaImage Plugin => new Aaru.Images.TeleDisk(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "md1dd_8.td0.lz", @@ -80,14 +80,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "fd54916f713d01b670c1a5df5e74a97f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -136,14 +136,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "c533488a21098a62c85f1649abda2803", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -152,14 +152,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "db9cfb6eea18820b7a7e0b5b45594471", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -168,14 +168,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "456390a9c6ab05cb458a03c47296de08", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -184,14 +184,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "de3f85896f771b7e5bc4c9e3926d64e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -224,14 +224,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 332, SectorSize = 512, Md5 = "323ea79c83432663669b9bc29f13785c", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 332 } - } + ] }, new BlockImageTestExpected { @@ -248,14 +248,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "dbd52e9e684f97d9e2292811242bb24e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -307,14 +307,14 @@ public class TeleDisk : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "ccd4431139755c58f340681f63510642", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/pce/XDF.cs b/Aaru.Tests/Images/pce/XDF.cs index db3b8c6f8..41827bbe5 100644 --- a/Aaru.Tests/Images/pce/XDF.cs +++ b/Aaru.Tests/Images/pce/XDF.cs @@ -42,8 +42,8 @@ public class XDF : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "pce", "XDF"); public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "mf2hd_xdf_teledisk.xdf.lz", @@ -60,5 +60,5 @@ public class XDF : BlockMediaImageTest SectorSize = 512, Md5 = "825ca9cdcb2f35ff8bbbda9cb0a27c4d" } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Images/pce/raw.cs b/Aaru.Tests/Images/pce/raw.cs index 10d3de57d..382be5996 100644 --- a/Aaru.Tests/Images/pce/raw.cs +++ b/Aaru.Tests/Images/pce/raw.cs @@ -40,8 +40,8 @@ public class Raw : BlockMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Media image formats", "pce", "raw"); public override IMediaImage Plugin => new ZZZRawImage(); - public override BlockImageTestExpected[] Tests => new[] - { + public override BlockImageTestExpected[] Tests => + [ new BlockImageTestExpected { TestFile = "md1dd_8.img.lz", @@ -89,14 +89,14 @@ public class Raw : BlockMediaImageTest Sectors = 1232, SectorSize = 1024, Md5 = "fd54916f713d01b670c1a5df5e74a97f", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1232 } - } + ] }, new BlockImageTestExpected { @@ -145,14 +145,14 @@ public class Raw : BlockMediaImageTest Sectors = 1600, SectorSize = 512, Md5 = "c533488a21098a62c85f1649abda2803", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1600 } - } + ] }, new BlockImageTestExpected { @@ -161,14 +161,14 @@ public class Raw : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "db9cfb6eea18820b7a7e0b5b45594471", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -177,14 +177,14 @@ public class Raw : BlockMediaImageTest Sectors = 1640, SectorSize = 512, Md5 = "456390a9c6ab05cb458a03c47296de08", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1640 } - } + ] }, new BlockImageTestExpected { @@ -201,14 +201,14 @@ public class Raw : BlockMediaImageTest Sectors = 1440, SectorSize = 512, Md5 = "de3f85896f771b7e5bc4c9e3926d64e4", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 1440 } - } + ] }, new BlockImageTestExpected { @@ -241,14 +241,14 @@ public class Raw : BlockMediaImageTest Sectors = 3372, SectorSize = 512, Md5 = "7f9164dc43bffc895db751ba1d9b55a9", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3372 } - } + ] }, new BlockImageTestExpected { @@ -265,14 +265,14 @@ public class Raw : BlockMediaImageTest Sectors = 3486, SectorSize = 512, Md5 = "dbd52e9e684f97d9e2292811242bb24e", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 3486 } - } + ] }, new BlockImageTestExpected { @@ -324,14 +324,14 @@ public class Raw : BlockMediaImageTest Sectors = 800, SectorSize = 512, Md5 = "ccd4431139755c58f340681f63510642", - Partitions = new[] - { + Partitions = + [ new BlockPartitionVolumes { Start = 0, Length = 800 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Issues/448.cs b/Aaru.Tests/Issues/448.cs index f8fccc733..0581403df 100644 --- a/Aaru.Tests/Issues/448.cs +++ b/Aaru.Tests/Issues/448.cs @@ -13,8 +13,8 @@ public class _448 : OpticalMediaImageTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Issues", "Pending", "issue448"); public override IMediaImage Plugin => new BlindWrite5(); - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "B6T_ISO-BlindWrite7.B6T", @@ -23,8 +23,8 @@ public class _448 : OpticalMediaImageTest SectorSize = 2048, LongMd5 = "1bea7f781be0fb3b878de96e965c53a0", SubchannelMd5 = "01fef9f42fe53e6256ba713ad237dc8c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -33,7 +33,7 @@ public class _448 : OpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Issues/623.cs b/Aaru.Tests/Issues/623.cs index 7472788db..d6fd26f64 100644 --- a/Aaru.Tests/Issues/623.cs +++ b/Aaru.Tests/Issues/623.cs @@ -15,8 +15,8 @@ public class _623 : WritableOpticalMediaImageTest public override IWritableImage OutputPlugin => new Alcohol120(); public override string OutputExtension => "mds"; - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "alice.aif", @@ -25,8 +25,8 @@ public class _623 : WritableOpticalMediaImageTest SectorSize = 2048, LongMd5 = "1bea7f781be0fb3b878de96e965c53a0", SubchannelMd5 = "01fef9f42fe53e6256ba713ad237dc8c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -35,7 +35,7 @@ public class _623 : WritableOpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Issues/624.cs b/Aaru.Tests/Issues/624.cs index ea3a7f8f1..9beccebaa 100644 --- a/Aaru.Tests/Issues/624.cs +++ b/Aaru.Tests/Issues/624.cs @@ -15,8 +15,8 @@ public class _624 : WritableOpticalMediaImageTest public override IWritableImage OutputPlugin => new Alcohol120(); public override string OutputExtension => "mds"; - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "alice.iso", @@ -25,8 +25,8 @@ public class _624 : WritableOpticalMediaImageTest SectorSize = 2048, LongMd5 = "1bea7f781be0fb3b878de96e965c53a0", SubchannelMd5 = "01fef9f42fe53e6256ba713ad237dc8c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -35,7 +35,7 @@ public class _624 : WritableOpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Issues/625.cs b/Aaru.Tests/Issues/625.cs index c1d01282a..b1a5139b9 100644 --- a/Aaru.Tests/Issues/625.cs +++ b/Aaru.Tests/Issues/625.cs @@ -15,8 +15,8 @@ public class _625 : WritableOpticalMediaImageTest public override IWritableImage OutputPlugin => new CloneCd(); public override string OutputExtension => "mds"; - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "alice.toc", @@ -25,8 +25,8 @@ public class _625 : WritableOpticalMediaImageTest SectorSize = 2048, LongMd5 = "1bea7f781be0fb3b878de96e965c53a0", SubchannelMd5 = "01fef9f42fe53e6256ba713ad237dc8c", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -35,7 +35,7 @@ public class _625 : WritableOpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Issues/FsExtractHashIssueTest.cs b/Aaru.Tests/Issues/FsExtractHashIssueTest.cs index 448f08017..470b71263 100644 --- a/Aaru.Tests/Issues/FsExtractHashIssueTest.cs +++ b/Aaru.Tests/Issues/FsExtractHashIssueTest.cs @@ -243,7 +243,7 @@ public abstract class FsExtractHashIssueTest expectedXattrs.Remove(xattr); - byte[] xattrBuf = Array.Empty(); + byte[] xattrBuf = []; error = fs.GetXattr(path + "/" + entry, xattr, ref xattrBuf); Assert.AreEqual(ErrorNumber.NoError, diff --git a/Aaru.Tests/Issues/FsExtractIssueTest.cs b/Aaru.Tests/Issues/FsExtractIssueTest.cs index e3613a0ec..2ebed0f00 100644 --- a/Aaru.Tests/Issues/FsExtractIssueTest.cs +++ b/Aaru.Tests/Issues/FsExtractIssueTest.cs @@ -155,7 +155,7 @@ public abstract class FsExtractIssueTest { foreach(string xattr in xattrs) { - byte[] xattrBuf = Array.Empty(); + byte[] xattrBuf = []; error = fs.GetXattr(path + "/" + entry, xattr, ref xattrBuf); Assert.AreEqual(ErrorNumber.NoError, diff --git a/Aaru.Tests/Issues/OpticalImageConvertIssueTest.cs b/Aaru.Tests/Issues/OpticalImageConvertIssueTest.cs index 8d9643ec1..39b267769 100644 --- a/Aaru.Tests/Issues/OpticalImageConvertIssueTest.cs +++ b/Aaru.Tests/Issues/OpticalImageConvertIssueTest.cs @@ -191,7 +191,7 @@ public abstract class OpticalImageConvertIssueTest Dictionary isrcs = new(); Dictionary trackFlags = new(); string mcn = null; - HashSet subchannelExtents = new(); + HashSet subchannelExtents = []; Dictionary smallestPregapLbaPerTrack = new(); var tracks = new Track[inputOptical.Tracks.Count]; @@ -409,12 +409,7 @@ public abstract class OpticalImageConvertIssueTest { foreach((byte track, byte flags) in trackFlags) { - outputOptical.WriteSectorTag(new[] - { - flags - }, - track, - SectorTagType.CdTrackFlags); + outputOptical.WriteSectorTag([flags], track, SectorTagType.CdTrackFlags); } } diff --git a/Aaru.Tests/Partitions/Acorn.cs b/Aaru.Tests/Partitions/Acorn.cs index d7bdb9a2f..ada563772 100644 --- a/Aaru.Tests/Partitions/Acorn.cs +++ b/Aaru.Tests/Partitions/Acorn.cs @@ -37,13 +37,13 @@ public class Acorn : PartitionSchemeTest { public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "Acorn"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "linux_ics.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 99792, @@ -71,7 +71,7 @@ public class Acorn : PartitionSchemeTest Start = 671328, Type = "Linux swap" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/AppleMap.cs b/Aaru.Tests/Partitions/AppleMap.cs index 9ffd8b52d..73e33a8b9 100644 --- a/Aaru.Tests/Partitions/AppleMap.cs +++ b/Aaru.Tests/Partitions/AppleMap.cs @@ -38,13 +38,13 @@ public class AppleMap : PartitionSchemeTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "Apple Partition Map"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "d2_driver.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 2, @@ -84,13 +84,13 @@ public class AppleMap : PartitionSchemeTest Start = 256, Type = "Apple_HFS" } - } + ] }, new PartitionTest { TestFile = "hdt_1.8_encrypted1.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 14, @@ -120,13 +120,13 @@ public class AppleMap : PartitionSchemeTest Start = 1088, Type = "Apple_HFS" } - } + ] }, new PartitionTest { TestFile = "hdt_1.8_encrypted2.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 14, @@ -156,13 +156,13 @@ public class AppleMap : PartitionSchemeTest Start = 1088, Type = "Apple_HFS" } - } + ] }, new PartitionTest { TestFile = "hdt_1.8_password.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 14, @@ -192,13 +192,13 @@ public class AppleMap : PartitionSchemeTest Start = 1088, Type = "Apple_HFS" } - } + ] }, new PartitionTest { TestFile = "hdt_1.8.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 14, @@ -228,13 +228,13 @@ public class AppleMap : PartitionSchemeTest Start = 1088, Type = "Apple_HFS" } - } + ] }, new PartitionTest { TestFile = "linux.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 1, @@ -305,13 +305,13 @@ public class AppleMap : PartitionSchemeTest Start = 247426, Type = "Apple_Free" } - } + ] }, new PartitionTest { TestFile = "macos_1.1.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 10, @@ -331,13 +331,13 @@ public class AppleMap : PartitionSchemeTest Start = 16, Type = "Apple_HFS" } - } + ] }, new PartitionTest { TestFile = "macos_2.0.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 10, @@ -357,13 +357,13 @@ public class AppleMap : PartitionSchemeTest Start = 16, Type = "Apple_HFS" } - } + ] }, new PartitionTest { TestFile = "macos_4.2.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 11, @@ -383,13 +383,13 @@ public class AppleMap : PartitionSchemeTest Start = 16, Type = "Apple_HFS" } - } + ] }, new PartitionTest { TestFile = "macos_4.3.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 11, @@ -409,13 +409,13 @@ public class AppleMap : PartitionSchemeTest Start = 16, Type = "Apple_HFS" } - } + ] }, new PartitionTest { TestFile = "macos_6.0.2.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 10, @@ -565,13 +565,13 @@ public class AppleMap : PartitionSchemeTest Start = 43678, Type = "Apple_Free" } - } + ] }, new PartitionTest { TestFile = "macos_6.0.3.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 10, @@ -691,13 +691,13 @@ public class AppleMap : PartitionSchemeTest Start = 51796, Type = "Apple_UNIX_SVR2" } - } + ] }, new PartitionTest { TestFile = "macos_6.0.4.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 10, @@ -817,13 +817,13 @@ public class AppleMap : PartitionSchemeTest Start = 51602, Type = "Apple_Free" } - } + ] }, new PartitionTest { TestFile = "macos_6.0.5.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 10, @@ -973,13 +973,13 @@ public class AppleMap : PartitionSchemeTest Start = 48157, Type = "Apple_Free" } - } + ] }, new PartitionTest { TestFile = "macos_6.0.7.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 10, @@ -1119,13 +1119,13 @@ public class AppleMap : PartitionSchemeTest Start = 50440, Type = "Apple_UNIX_SVR2" } - } + ] }, new PartitionTest { TestFile = "macos_6.0.8.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 10, @@ -1275,13 +1275,13 @@ public class AppleMap : PartitionSchemeTest Start = 50755, Type = "Apple_UNIX_SVR2" } - } + ] }, new PartitionTest { TestFile = "macos_6.0.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 10, @@ -1401,13 +1401,13 @@ public class AppleMap : PartitionSchemeTest Start = 41812, Type = "Apple_Free" } - } + ] }, new PartitionTest { TestFile = "macos_7.0.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 10, @@ -1507,13 +1507,13 @@ public class AppleMap : PartitionSchemeTest Start = 44562, Type = "Apple_Free" } - } + ] }, new PartitionTest { TestFile = "macos_7.1.1.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 17, @@ -1623,13 +1623,13 @@ public class AppleMap : PartitionSchemeTest Start = 47034, Type = "Apple_UNIX_SVR2" } - } + ] }, new PartitionTest { TestFile = "macos_7.5.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 18, @@ -1659,13 +1659,13 @@ public class AppleMap : PartitionSchemeTest Start = 96, Type = "Apple_HFS" } - } + ] }, new PartitionTest { TestFile = "parted.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 4032, @@ -1696,13 +1696,13 @@ public class AppleMap : PartitionSchemeTest Start = 96256, Type = "Apple_UNIX_SVR2" } - } + ] }, new PartitionTest { TestFile = "silverlining_2.2.1.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 6, @@ -1761,13 +1761,13 @@ public class AppleMap : PartitionSchemeTest Start = 50720, Type = "Apple_Free" } - } + ] }, new PartitionTest { TestFile = "speedtools_3.6.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 27, @@ -1807,13 +1807,13 @@ public class AppleMap : PartitionSchemeTest Start = 49316, Type = "Apple_Free" } - } + ] }, new PartitionTest { TestFile = "vcpformatter_2.1.1.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 24, @@ -1863,7 +1863,7 @@ public class AppleMap : PartitionSchemeTest Start = 54838, Type = "Apple_Free" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/Atari.cs b/Aaru.Tests/Partitions/Atari.cs index dd1eabee6..53b904b80 100644 --- a/Aaru.Tests/Partitions/Atari.cs +++ b/Aaru.Tests/Partitions/Atari.cs @@ -37,13 +37,13 @@ public class Atari : PartitionSchemeTest { public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "Atari ST"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "linux_ahdi.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 61440, @@ -82,13 +82,13 @@ public class Atari : PartitionSchemeTest Start = 143361, Type = "LNX" } - } + ] }, new PartitionTest { TestFile = "linux_icd.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 30720, @@ -170,13 +170,13 @@ public class Atari : PartitionSchemeTest Start = 806913, Type = "LNX" } - } + ] }, new PartitionTest { TestFile = "tos_1.04.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 14336, @@ -213,7 +213,7 @@ public class Atari : PartitionSchemeTest Start = 43010, Type = "GEM" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/BSD.cs b/Aaru.Tests/Partitions/BSD.cs index 972e2b6ca..294b9d8b1 100644 --- a/Aaru.Tests/Partitions/BSD.cs +++ b/Aaru.Tests/Partitions/BSD.cs @@ -37,13 +37,13 @@ public class Bsd : PartitionSchemeTest { public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "BSD slices"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "parted.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 75776, @@ -71,13 +71,13 @@ public class Bsd : PartitionSchemeTest Start = 120832, Type = "FAT" } - } + ] }, new PartitionTest { TestFile = "netbsd_1.6.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 20417, @@ -132,13 +132,13 @@ public class Bsd : PartitionSchemeTest Start = 3991680, Type = "4.2BSD Fast File System" } - } + ] }, new PartitionTest { TestFile = "netbsd_6.1.5.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 20480, @@ -229,13 +229,13 @@ public class Bsd : PartitionSchemeTest Start = 3288096, Type = "Digital LSM Public Region" } - } + ] }, new PartitionTest { TestFile = "netbsd_7.1.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 20160, @@ -326,7 +326,7 @@ public class Bsd : PartitionSchemeTest Start = 3288096, Type = "Digital LSM Public Region" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/GPT.cs b/Aaru.Tests/Partitions/GPT.cs index 134717c56..8da1be1b4 100644 --- a/Aaru.Tests/Partitions/GPT.cs +++ b/Aaru.Tests/Partitions/GPT.cs @@ -38,13 +38,13 @@ public class Gpt : PartitionSchemeTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "GUID Partition Table"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "linux.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 20480, @@ -105,13 +105,13 @@ public class Gpt : PartitionSchemeTest Start = 206848, Type = "HP-UX Data" } - } + ] }, new PartitionTest { TestFile = "parted.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 83968, @@ -142,7 +142,7 @@ public class Gpt : PartitionSchemeTest Start = 188416, Type = "Microsoft Basic data" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/MBR.cs b/Aaru.Tests/Partitions/MBR.cs index a4d33d205..d5124f6a9 100644 --- a/Aaru.Tests/Partitions/MBR.cs +++ b/Aaru.Tests/Partitions/MBR.cs @@ -38,13 +38,13 @@ public class Mbr : PartitionSchemeTest public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "Master Boot Record"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "concurrentdos_6.0.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 100800, @@ -81,13 +81,13 @@ public class Mbr : PartitionSchemeTest Start = 352800, Type = "0x04" } - } + ] }, new PartitionTest { TestFile = "darwin_1.4.1.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 409248, @@ -106,13 +106,13 @@ public class Mbr : PartitionSchemeTest Start = 818496, Type = "0xA8" } - } + ] }, new PartitionTest { TestFile = "darwin_6.0.2.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 204561, @@ -149,13 +149,13 @@ public class Mbr : PartitionSchemeTest Start = 532224, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "darwin_8.0.1.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 150000, @@ -192,13 +192,13 @@ public class Mbr : PartitionSchemeTest Start = 676063, Type = "0x0C" } - } + ] }, new PartitionTest { TestFile = "drdos_3.40.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 100800, @@ -235,13 +235,13 @@ public class Mbr : PartitionSchemeTest Start = 656271, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "drdos_3.41.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 126945, @@ -278,13 +278,13 @@ public class Mbr : PartitionSchemeTest Start = 353871, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "drdos_5.00.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 128016, @@ -330,13 +330,13 @@ public class Mbr : PartitionSchemeTest Start = 767151, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "drdos_6.00.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 101745, @@ -382,13 +382,13 @@ public class Mbr : PartitionSchemeTest Start = 454671, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "drdos_7.02.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 102753, @@ -434,13 +434,13 @@ public class Mbr : PartitionSchemeTest Start = 812511, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "drdos_7.03.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 202545, @@ -486,13 +486,13 @@ public class Mbr : PartitionSchemeTest Start = 869967, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "drdos_8.0.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 205569, @@ -538,13 +538,13 @@ public class Mbr : PartitionSchemeTest Start = 906255, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "linux.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 20480, @@ -590,13 +590,13 @@ public class Mbr : PartitionSchemeTest Start = 212992, Type = "0x83" } - } + ] }, new PartitionTest { TestFile = "macosx_10.3.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 204800, @@ -651,13 +651,13 @@ public class Mbr : PartitionSchemeTest Start = 819248, Type = "0xAF" } - } + ] }, new PartitionTest { TestFile = "macosx_10.4.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 102400, @@ -712,13 +712,13 @@ public class Mbr : PartitionSchemeTest Start = 819378, Type = "0xAF" } - } + ] }, new PartitionTest { TestFile = "msdos_3.30a.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 65457, @@ -863,13 +863,13 @@ public class Mbr : PartitionSchemeTest Start = 982863, Type = "0x04" } - } + ] }, new PartitionTest { TestFile = "msdos_5.00.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 102753, @@ -987,13 +987,13 @@ public class Mbr : PartitionSchemeTest Start = 1009071, Type = "0x01" } - } + ] }, new PartitionTest { TestFile = "msdos_6.00.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 51345, @@ -1075,13 +1075,13 @@ public class Mbr : PartitionSchemeTest Start = 980847, Type = "0x04" } - } + ] }, new PartitionTest { TestFile = "msdos_6.20.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 205569, @@ -1136,13 +1136,13 @@ public class Mbr : PartitionSchemeTest Start = 1006047, Type = "0x01" } - } + ] }, new PartitionTest { TestFile = "msdos_6.21.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 205569, @@ -1206,13 +1206,13 @@ public class Mbr : PartitionSchemeTest Start = 1003023, Type = "0x01" } - } + ] }, new PartitionTest { TestFile = "msdos_6.22.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 245889, @@ -1258,13 +1258,13 @@ public class Mbr : PartitionSchemeTest Start = 984879, Type = "0x04" } - } + ] }, new PartitionTest { TestFile = "multiuserdos_7.22r04.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 152145, @@ -1310,13 +1310,13 @@ public class Mbr : PartitionSchemeTest Start = 456687, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "novelldos_7.00.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 252945, @@ -1362,13 +1362,13 @@ public class Mbr : PartitionSchemeTest Start = 904239, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "opendos_7.01.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 307377, @@ -1414,13 +1414,13 @@ public class Mbr : PartitionSchemeTest Start = 555471, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "parted.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 67584, @@ -1448,13 +1448,13 @@ public class Mbr : PartitionSchemeTest Start = 133120, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "pcdos_2000.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 205569, @@ -1500,13 +1500,13 @@ public class Mbr : PartitionSchemeTest Start = 964719, Type = "0x04" } - } + ] }, new PartitionTest { TestFile = "pcdos_2.00.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 1022111, @@ -1516,13 +1516,13 @@ public class Mbr : PartitionSchemeTest Start = 1, Type = "0x01" } - } + ] }, new PartitionTest { TestFile = "pcdos_2.10.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 1022111, @@ -1532,13 +1532,13 @@ public class Mbr : PartitionSchemeTest Start = 1, Type = "0x01" } - } + ] }, new PartitionTest { TestFile = "pcdos_3.00.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 66465, @@ -1548,13 +1548,13 @@ public class Mbr : PartitionSchemeTest Start = 63, Type = "0x01" } - } + ] }, new PartitionTest { TestFile = "pcdos_3.10.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 66465, @@ -1564,13 +1564,13 @@ public class Mbr : PartitionSchemeTest Start = 63, Type = "0x01" } - } + ] }, new PartitionTest { TestFile = "pcdos_3.30.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 65457, @@ -1715,13 +1715,13 @@ public class Mbr : PartitionSchemeTest Start = 982863, Type = "0x04" } - } + ] }, new PartitionTest { TestFile = "pcdos_4.00.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 205569, @@ -1767,13 +1767,13 @@ public class Mbr : PartitionSchemeTest Start = 784287, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "pcdos_5.00.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 205569, @@ -1819,13 +1819,13 @@ public class Mbr : PartitionSchemeTest Start = 764127, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "pcdos_6.10.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 205569, @@ -1871,13 +1871,13 @@ public class Mbr : PartitionSchemeTest Start = 702639, Type = "0x06" } - } + ] }, new PartitionTest { TestFile = "win95.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 205569, @@ -1923,13 +1923,13 @@ public class Mbr : PartitionSchemeTest Start = 1006047, Type = "0x01" } - } + ] }, new PartitionTest { TestFile = "win96osr25.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 307377, @@ -1984,13 +1984,13 @@ public class Mbr : PartitionSchemeTest Start = 1006047, Type = "0x01" } - } + ] }, new PartitionTest { TestFile = "winnt_3.10.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 204561, @@ -2045,7 +2045,7 @@ public class Mbr : PartitionSchemeTest Start = 962640, Type = "0x07" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/MINIX.cs b/Aaru.Tests/Partitions/MINIX.cs index 6b29b822e..cbfd41a73 100644 --- a/Aaru.Tests/Partitions/MINIX.cs +++ b/Aaru.Tests/Partitions/MINIX.cs @@ -37,13 +37,13 @@ public class Minix : PartitionSchemeTest { public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "MINIX"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "minix_3.1.2a.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 524159, @@ -84,7 +84,7 @@ public class Minix : PartitionSchemeTest Start = 1584576, Type = "MINIX" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/PC98.cs b/Aaru.Tests/Partitions/PC98.cs index 0d1d6ff8c..519a9ce09 100644 --- a/Aaru.Tests/Partitions/PC98.cs +++ b/Aaru.Tests/Partitions/PC98.cs @@ -37,13 +37,13 @@ public class Pc98 : PartitionSchemeTest { public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "PC-98"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "msdos330.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 19536, @@ -124,13 +124,13 @@ public class Pc98 : PartitionSchemeTest Start = 752664, Type = "FAT16" } - } + ] }, new PartitionTest { TestFile = "msdos330_alt.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 59136, @@ -161,13 +161,13 @@ public class Pc98 : PartitionSchemeTest Start = 218064, Type = "FAT16" } - } + ] }, new PartitionTest { TestFile = "msdos500_epson.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 35639, @@ -248,13 +248,13 @@ public class Pc98 : PartitionSchemeTest Start = 887304, Type = "FAT16" } - } + ] }, new PartitionTest { TestFile = "msdos500.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 28512, @@ -335,13 +335,13 @@ public class Pc98 : PartitionSchemeTest Start = 869352, Type = "FAT16" } - } + ] }, new PartitionTest { TestFile = "msdos620.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 61248, @@ -412,7 +412,7 @@ public class Pc98 : PartitionSchemeTest Start = 697224, Type = "FAT16" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/RDB.cs b/Aaru.Tests/Partitions/RDB.cs index 99b4067b1..fd42ef546 100644 --- a/Aaru.Tests/Partitions/RDB.cs +++ b/Aaru.Tests/Partitions/RDB.cs @@ -37,13 +37,13 @@ public class Rdb : PartitionSchemeTest { public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "Rigid Disk Block"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "amigaos_3.9.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 170688, @@ -104,13 +104,13 @@ public class Rdb : PartitionSchemeTest Start = 857504, Type = "\"RES\\86\"" } - } + ] }, new PartitionTest { TestFile = "amigaos_4.0.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 178624, @@ -171,13 +171,13 @@ public class Rdb : PartitionSchemeTest Start = 802368, Type = "\"SFS\\2\"" } - } + ] }, new PartitionTest { TestFile = "parted.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 16065, @@ -208,7 +208,7 @@ public class Rdb : PartitionSchemeTest Start = 80325, Type = "\"\0\0\0\\0\"" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/SGI.cs b/Aaru.Tests/Partitions/SGI.cs index 7444f38b9..bab547921 100644 --- a/Aaru.Tests/Partitions/SGI.cs +++ b/Aaru.Tests/Partitions/SGI.cs @@ -37,13 +37,13 @@ public class Sgi : PartitionSchemeTest { public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "SGI"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "linux.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 40961, @@ -170,13 +170,13 @@ public class Sgi : PartitionSchemeTest Start = 947835, Type = "Linux" } - } + ] }, new PartitionTest { TestFile = "parted.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 22528, @@ -213,7 +213,7 @@ public class Sgi : PartitionSchemeTest Start = 196608, Type = "XFS" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/Sun.cs b/Aaru.Tests/Partitions/Sun.cs index 6bbfef44f..1457f2d46 100644 --- a/Aaru.Tests/Partitions/Sun.cs +++ b/Aaru.Tests/Partitions/Sun.cs @@ -38,13 +38,13 @@ public class Sun : PartitionSchemeTest { public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "Sun"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "linux.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 204800, @@ -108,13 +108,13 @@ public class Sun : PartitionSchemeTest Start = 915705, Type = "Linux swap" } - } + ] }, new PartitionTest { TestFile = "parted.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 49152, @@ -142,7 +142,7 @@ public class Sun : PartitionSchemeTest Start = 144585, Type = "Linux" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/VTOC.cs b/Aaru.Tests/Partitions/VTOC.cs index 752678901..a848afcec 100644 --- a/Aaru.Tests/Partitions/VTOC.cs +++ b/Aaru.Tests/Partitions/VTOC.cs @@ -37,13 +37,13 @@ public class Vtoc : PartitionSchemeTest { public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "UNIX VTOC"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "att_unix_vtoc.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Length = 34, @@ -188,7 +188,7 @@ public class Vtoc : PartitionSchemeTest Start = 937818, Type = "UNIX: /usr" } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/Partitions/Xbox.cs b/Aaru.Tests/Partitions/Xbox.cs index 7e40f5387..2dedb0cda 100644 --- a/Aaru.Tests/Partitions/Xbox.cs +++ b/Aaru.Tests/Partitions/Xbox.cs @@ -37,13 +37,13 @@ public class Xbox : PartitionSchemeTest { public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "Xbox"); - public override PartitionTest[] Tests => new[] - { + public override PartitionTest[] Tests => + [ new PartitionTest { TestFile = "microsoft256mb.aif", - Partitions = new[] - { + Partitions = + [ new Partition { Description = "System cache", @@ -62,7 +62,7 @@ public class Xbox : PartitionSchemeTest Size = 0, Start = 16376 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/WritableImages/AaruFormat/V1/FromAaru.cs b/Aaru.Tests/WritableImages/AaruFormat/V1/FromAaru.cs index 6aad34106..9ecc9074a 100644 --- a/Aaru.Tests/WritableImages/AaruFormat/V1/FromAaru.cs +++ b/Aaru.Tests/WritableImages/AaruFormat/V1/FromAaru.cs @@ -13,8 +13,8 @@ public class FromAaru : WritableOpticalMediaImageTest public override IWritableImage OutputPlugin => new Aaru.Images.AaruFormat(); public override string OutputExtension => "aif"; - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "test_multisession.aif", @@ -24,8 +24,8 @@ public class FromAaru : WritableOpticalMediaImageTest Md5 = "e2e19cf38891e67a0829d01842b4052e", LongMd5 = "b31f2d228dd564c88ad851b12b43c01d", SubchannelMd5 = "989c696ee5bb336b4ad30474da573925", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -58,7 +58,7 @@ public class FromAaru : WritableOpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/WritableImages/Alcohol/FromAaru.cs b/Aaru.Tests/WritableImages/Alcohol/FromAaru.cs index ae49cc428..ab77a110d 100644 --- a/Aaru.Tests/WritableImages/Alcohol/FromAaru.cs +++ b/Aaru.Tests/WritableImages/Alcohol/FromAaru.cs @@ -14,8 +14,8 @@ public class FromAaru : WritableOpticalMediaImageTest public override IWritableImage OutputPlugin => new Alcohol120(); public override string OutputExtension => "mds"; - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "test_multisession.aif", @@ -25,8 +25,8 @@ public class FromAaru : WritableOpticalMediaImageTest Md5 = "e2e19cf38891e67a0829d01842b4052e", LongMd5 = "b31f2d228dd564c88ad851b12b43c01d", SubchannelMd5 = "989c696ee5bb336b4ad30474da573925", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -59,7 +59,7 @@ public class FromAaru : WritableOpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/WritableImages/CDRDAO/FromAaru.cs b/Aaru.Tests/WritableImages/CDRDAO/FromAaru.cs index b6666a7c3..3f8efe0ee 100644 --- a/Aaru.Tests/WritableImages/CDRDAO/FromAaru.cs +++ b/Aaru.Tests/WritableImages/CDRDAO/FromAaru.cs @@ -14,8 +14,8 @@ public class FromAaru : WritableOpticalMediaImageTest public override IWritableImage OutputPlugin => new Cdrdao(); public override string OutputExtension => "toc"; - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "test_multisession.aif", @@ -25,8 +25,8 @@ public class FromAaru : WritableOpticalMediaImageTest Md5 = "e2e19cf38891e67a0829d01842b4052e", LongMd5 = "b31f2d228dd564c88ad851b12b43c01d", SubchannelMd5 = "989c696ee5bb336b4ad30474da573925", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -59,7 +59,7 @@ public class FromAaru : WritableOpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/WritableImages/CDRWin/FromAaru.cs b/Aaru.Tests/WritableImages/CDRWin/FromAaru.cs index bf7bf08f5..d3ec87a0b 100644 --- a/Aaru.Tests/WritableImages/CDRWin/FromAaru.cs +++ b/Aaru.Tests/WritableImages/CDRWin/FromAaru.cs @@ -14,8 +14,8 @@ public class FromAaru : WritableOpticalMediaImageTest public override IWritableImage OutputPlugin => new CdrWin(); public override string OutputExtension => "cue"; - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "test_multisession.aif", @@ -25,8 +25,8 @@ public class FromAaru : WritableOpticalMediaImageTest Md5 = "e2e19cf38891e67a0829d01842b4052e", LongMd5 = "b31f2d228dd564c88ad851b12b43c01d", SubchannelMd5 = "989c696ee5bb336b4ad30474da573925", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -59,7 +59,7 @@ public class FromAaru : WritableOpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/WritableImages/CloneCD/FromAaru.cs b/Aaru.Tests/WritableImages/CloneCD/FromAaru.cs index 90510a46c..250b1facc 100644 --- a/Aaru.Tests/WritableImages/CloneCD/FromAaru.cs +++ b/Aaru.Tests/WritableImages/CloneCD/FromAaru.cs @@ -14,8 +14,8 @@ public class FromAaru : WritableOpticalMediaImageTest public override IWritableImage OutputPlugin => new CloneCd(); public override string OutputExtension => "ccd"; - public override OpticalImageTestExpected[] Tests => new[] - { + public override OpticalImageTestExpected[] Tests => + [ new OpticalImageTestExpected { TestFile = "test_multisession.aif", @@ -25,8 +25,8 @@ public class FromAaru : WritableOpticalMediaImageTest Md5 = "e2e19cf38891e67a0829d01842b4052e", LongMd5 = "b31f2d228dd564c88ad851b12b43c01d", SubchannelMd5 = "989c696ee5bb336b4ad30474da573925", - Tracks = new[] - { + Tracks = + [ new TrackInfoTestExpected { Session = 1, @@ -59,7 +59,7 @@ public class FromAaru : WritableOpticalMediaImageTest Pregap = 150, Flags = 4 } - } + ] } - }; + ]; } \ No newline at end of file diff --git a/Aaru.Tests/WritableImages/WritableOpticalMediaImageTest.cs b/Aaru.Tests/WritableImages/WritableOpticalMediaImageTest.cs index 63a97cd4e..b8eb43f0e 100644 --- a/Aaru.Tests/WritableImages/WritableOpticalMediaImageTest.cs +++ b/Aaru.Tests/WritableImages/WritableOpticalMediaImageTest.cs @@ -286,7 +286,7 @@ public abstract class WritableOpticalMediaImageTest : BaseWritableMediaImageTest Dictionary isrcs = new(); Dictionary trackFlags = new(); string mcn = null; - HashSet subchannelExtents = new(); + HashSet subchannelExtents = []; Dictionary smallestPregapLbaPerTrack = new(); var tracks = new Track[inputFormat.Tracks.Count]; @@ -509,12 +509,7 @@ public abstract class WritableOpticalMediaImageTest : BaseWritableMediaImageTest { foreach((byte track, byte flags) in trackFlags) { - outputFormat.WriteSectorTag(new[] - { - flags - }, - track, - SectorTagType.CdTrackFlags); + outputFormat.WriteSectorTag([flags], track, SectorTagType.CdTrackFlags); } } diff --git a/Aaru.sln.DotSettings b/Aaru.sln.DotSettings index bfbd57394..6ae087f8f 100644 --- a/Aaru.sln.DotSettings +++ b/Aaru.sln.DotSettings @@ -333,6 +333,7 @@ WARNING WARNING WARNING + SUGGESTION RequiredForMultiline RequiredForMultiline RequiredForMultiline diff --git a/Aaru/Commands/Archive/Extract.cs b/Aaru/Commands/Archive/Extract.cs index 256c9db50..02beb7fac 100644 --- a/Aaru/Commands/Archive/Extract.cs +++ b/Aaru/Commands/Archive/Extract.cs @@ -58,19 +58,9 @@ sealed class ArchiveExtractCommand : Command { AddAlias("x"); - Add(new Option(new[] - { - "--encoding", "-e" - }, - () => null, - UI.Name_of_character_encoding_to_use)); + Add(new Option(["--encoding", "-e"], () => null, UI.Name_of_character_encoding_to_use)); - Add(new Option(new[] - { - "--xattrs", "-x" - }, - () => false, - UI.Extract_extended_attributes_if_present)); + Add(new Option(["--xattrs", "-x"], () => false, UI.Extract_extended_attributes_if_present)); AddArgument(new Argument { @@ -380,7 +370,7 @@ sealed class ArchiveExtractCommand : Command foreach(string xattrName in xattrNames) { - byte[] xattrBuffer = Array.Empty(); + byte[] xattrBuffer = []; Core.Spectre.ProgressSingleSpinner(ctx => { diff --git a/Aaru/Commands/Archive/Info.cs b/Aaru/Commands/Archive/Info.cs index 775e002af..2bd44c41e 100644 --- a/Aaru/Commands/Archive/Info.cs +++ b/Aaru/Commands/Archive/Info.cs @@ -58,12 +58,7 @@ sealed class ArchiveInfoCommand : Command Name = "archive-path" }); - Add(new Option(new[] - { - "--encoding", "-e" - }, - () => null, - UI.Name_of_character_encoding_to_use)); + Add(new Option(["--encoding", "-e"], () => null, UI.Name_of_character_encoding_to_use)); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke)) ?? throw new NullReferenceException()); diff --git a/Aaru/Commands/Archive/List.cs b/Aaru/Commands/Archive/List.cs index 82cbcadfb..8db1460b9 100644 --- a/Aaru/Commands/Archive/List.cs +++ b/Aaru/Commands/Archive/List.cs @@ -53,19 +53,9 @@ sealed class ArchiveListCommand : Command { AddAlias("l"); - Add(new Option(new[] - { - "--encoding", "-e" - }, - () => null, - UI.Name_of_character_encoding_to_use)); + Add(new Option(["--encoding", "-e"], () => null, UI.Name_of_character_encoding_to_use)); - Add(new Option(new[] - { - "--long-format", "-l" - }, - () => false, - UI.Use_long_format)); + Add(new Option(["--long-format", "-l"], () => false, UI.Use_long_format)); AddArgument(new Argument { diff --git a/Aaru/Commands/Device/DeviceReport.cs b/Aaru/Commands/Device/DeviceReport.cs index a40b55948..367c1d8d1 100644 --- a/Aaru/Commands/Device/DeviceReport.cs +++ b/Aaru/Commands/Device/DeviceReport.cs @@ -70,12 +70,7 @@ sealed class DeviceReportCommand : Command Name = "device-path" }); - Add(new Option(new[] - { - "--trap-disc", "-t" - }, - () => false, - UI.Device_report_using_trap_disc)); + Add(new Option(["--trap-disc", "-t"], () => false, UI.Device_report_using_trap_disc)); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke)) ?? throw new NullReferenceException()); } @@ -244,7 +239,7 @@ sealed class DeviceReportCommand : Command }); } - byte[] buffer = Array.Empty(); + byte[] buffer = []; string mediumTypeName; string mediumModel; @@ -291,7 +286,7 @@ sealed class DeviceReportCommand : Command }); report.ATA.Identify = Core.Devices.Report.DeviceReport.ClearIdentify(buffer); - List mediaTests = new(); + List mediaTests = []; while(AnsiConsole.Confirm($"[italic]{UI.Do_you_have_media_you_can_insert}[/]")) { @@ -410,7 +405,7 @@ sealed class DeviceReportCommand : Command reporter.ReportScsiModes(ref report, out byte[] cdromMode, out MediumTypes mediumType); string mediumManufacturer; - byte[] senseBuffer = Array.Empty(); + byte[] senseBuffer = []; var sense = true; switch(dev.ScsiType) @@ -453,7 +448,7 @@ sealed class DeviceReportCommand : Command } else { - List mediaTypes = new(); + List mediaTypes = []; report.SCSI.MultiMediaDevice = new Mmc { @@ -751,7 +746,7 @@ sealed class DeviceReportCommand : Command if(dev.Model.StartsWith("PD-", StringComparison.Ordinal)) mediaTypes.Add("PD-650"); - List mediaTests = new(); + List mediaTests = []; foreach(string mediaType in mediaTypes) { @@ -992,7 +987,7 @@ sealed class DeviceReportCommand : Command { report.SCSI.SequentialDevice = reporter.ReportScsiSsc(); - List seqTests = new(); + List seqTests = []; while(AnsiConsole.Confirm($"[italic]{UI.Do_you_have_media_you_can_insert}[/]")) { @@ -1139,18 +1134,16 @@ sealed class DeviceReportCommand : Command when dev.Model.StartsWith("MDM", StringComparison.Ordinal) || dev.Model.StartsWith("MDH", StringComparison.Ordinal): { - List mediaTypes = new() - { - Localization.Core.Media_Type_Name_MMD_140A, - Localization.Core.Media_Type_Name_MDW_60, - Localization.Core.Media_Type_Name_MDW_74, - Localization.Core.Media_Type_Name_MDW_80, + List mediaTypes = + [ + Localization.Core.Media_Type_Name_MMD_140A, Localization.Core.Media_Type_Name_MDW_60, + Localization.Core.Media_Type_Name_MDW_74, Localization.Core.Media_Type_Name_MDW_80, Localization.Core.Media_Type_Name_MiniDisc - }; + ]; mediaTypes.Sort(); - List mediaTests = new(); + List mediaTests = []; foreach(string mediaType in mediaTypes) { @@ -1390,7 +1383,7 @@ sealed class DeviceReportCommand : Command { if(removable) { - List mediaTests = new(); + List mediaTests = []; while(AnsiConsole.Confirm($"[italic]{UI.Do_you_have_media_you_can_insert}[/]")) { diff --git a/Aaru/Commands/Device/Info.cs b/Aaru/Commands/Device/Info.cs index 93e22ffd6..27c650b3e 100644 --- a/Aaru/Commands/Device/Info.cs +++ b/Aaru/Commands/Device/Info.cs @@ -68,12 +68,7 @@ sealed class DeviceInfoCommand : Command public DeviceInfoCommand() : base("info", UI.Device_Info_Command_Description) { - Add(new Option(new[] - { - "--output-prefix", "-w" - }, - () => null, - UI.Prefix_for_saving_binary_information)); + Add(new Option(["--output-prefix", "-w"], () => null, UI.Prefix_for_saving_binary_information)); AddArgument(new Argument { diff --git a/Aaru/Commands/Filesystem/ExtractFiles.cs b/Aaru/Commands/Filesystem/ExtractFiles.cs index b83baf172..028943204 100644 --- a/Aaru/Commands/Filesystem/ExtractFiles.cs +++ b/Aaru/Commands/Filesystem/ExtractFiles.cs @@ -57,33 +57,15 @@ sealed class ExtractFilesCommand : Command public ExtractFilesCommand() : base("extract", UI.Filesystem_Extract_Command_Description) { - Add(new Option(new[] - { - "--encoding", "-e" - }, - () => null, - UI.Name_of_character_encoding_to_use)); + Add(new Option(["--encoding", "-e"], () => null, UI.Name_of_character_encoding_to_use)); - Add(new Option(new[] - { - "--options", "-O" - }, + Add(new Option(["--options", "-O"], () => null, UI.Comma_separated_name_value_pairs_of_filesystem_options)); - Add(new Option(new[] - { - "--xattrs", "-x" - }, - () => false, - UI.Extract_extended_attributes_if_present)); + Add(new Option(["--xattrs", "-x"], () => false, UI.Extract_extended_attributes_if_present)); - Add(new Option(new[] - { - "--namespace", "-n" - }, - () => null, - UI.Namespace_to_use_for_filenames)); + Add(new Option(["--namespace", "-n"], () => null, UI.Namespace_to_use_for_filenames)); AddArgument(new Argument { @@ -504,7 +486,7 @@ sealed class ExtractFilesCommand : Command { foreach(string xattr in xattrs) { - byte[] xattrBuf = Array.Empty(); + byte[] xattrBuf = []; Core.Spectre.ProgressSingleSpinner(ctx => { diff --git a/Aaru/Commands/Filesystem/Info.cs b/Aaru/Commands/Filesystem/Info.cs index 34439f1e3..878233773 100644 --- a/Aaru/Commands/Filesystem/Info.cs +++ b/Aaru/Commands/Filesystem/Info.cs @@ -53,26 +53,13 @@ sealed class FilesystemInfoCommand : Command public FilesystemInfoCommand() : base("info", UI.Filesystem_Info_Command_Description) { - Add(new Option(new[] - { - "--encoding", "-e" - }, - () => null, - UI.Name_of_character_encoding_to_use)); + Add(new Option(["--encoding", "-e"], () => null, UI.Name_of_character_encoding_to_use)); - Add(new Option(new[] - { - "--filesystems", "-f" - }, + Add(new Option(["--filesystems", "-f"], () => true, UI.Searches_and_prints_information_about_filesystems)); - Add(new Option(new[] - { - "--partitions", "-p" - }, - () => true, - UI.Searches_and_interprets_partitions)); + Add(new Option(["--partitions", "-p"], () => true, UI.Searches_and_interprets_partitions)); AddArgument(new Argument { diff --git a/Aaru/Commands/Filesystem/Ls.cs b/Aaru/Commands/Filesystem/Ls.cs index cea2182be..037072ea8 100644 --- a/Aaru/Commands/Filesystem/Ls.cs +++ b/Aaru/Commands/Filesystem/Ls.cs @@ -56,33 +56,15 @@ sealed class LsCommand : Command { AddAlias("ls"); - Add(new Option(new[] - { - "--encoding", "-e" - }, - () => null, - UI.Name_of_character_encoding_to_use)); + Add(new Option(["--encoding", "-e"], () => null, UI.Name_of_character_encoding_to_use)); - Add(new Option(new[] - { - "--long-format", "-l" - }, - () => true, - UI.Use_long_format)); + Add(new Option(["--long-format", "-l"], () => true, UI.Use_long_format)); - Add(new Option(new[] - { - "--options", "-O" - }, + Add(new Option(["--options", "-O"], () => null, UI.Comma_separated_name_value_pairs_of_filesystem_options)); - Add(new Option(new[] - { - "--namespace", "-n" - }, - () => null, - UI.Namespace_to_use_for_filenames)); + Add(new Option(["--namespace", "-n"], () => null, UI.Namespace_to_use_for_filenames)); AddArgument(new Argument { @@ -435,7 +417,7 @@ sealed class LsCommand : Command foreach(string xattr in xattrs) { - byte[] xattrBuf = Array.Empty(); + byte[] xattrBuf = []; error = fs.GetXattr(path + "/" + entry.Key, xattr, ref xattrBuf); if(error == ErrorNumber.NoError) diff --git a/Aaru/Commands/Image/Checksum.cs b/Aaru/Commands/Image/Checksum.cs index 7d8798c84..59f3d2804 100644 --- a/Aaru/Commands/Image/Checksum.cs +++ b/Aaru/Commands/Image/Checksum.cs @@ -58,64 +58,29 @@ sealed class ChecksumCommand : Command { AddAlias("chk"); - Add(new Option(new[] - { - "--adler32", "-a" - }, - () => false, - UI.Calculates_Adler_32)); + Add(new Option(["--adler32", "-a"], () => false, UI.Calculates_Adler_32)); Add(new Option("--crc16", () => true, UI.Calculates_CRC16)); - Add(new Option(new[] - { - "--crc32", "-c" - }, - () => true, - UI.Calculates_CRC32)); + Add(new Option(["--crc32", "-c"], () => true, UI.Calculates_CRC32)); Add(new Option("--crc64", () => true, UI.Calculates_CRC64_ECMA)); Add(new Option("--fletcher16", () => false, UI.Calculates_Fletcher_16)); Add(new Option("--fletcher32", () => false, UI.Calculates_Fletcher_32)); - Add(new Option(new[] - { - "--md5", "-m" - }, - () => true, - UI.Calculates_MD5)); + Add(new Option(["--md5", "-m"], () => true, UI.Calculates_MD5)); - Add(new Option(new[] - { - "--separated-tracks", "-t" - }, - () => true, - UI.Checksums_each_track_separately)); + Add(new Option(["--separated-tracks", "-t"], () => true, UI.Checksums_each_track_separately)); - Add(new Option(new[] - { - "--sha1", "-s" - }, - () => true, - UI.Calculates_SHA1)); + Add(new Option(["--sha1", "-s"], () => true, UI.Calculates_SHA1)); Add(new Option("--sha256", () => false, UI.Calculates_SHA256)); Add(new Option("--sha384", () => false, UI.Calculates_SHA384)); Add(new Option("--sha512", () => true, UI.Calculates_SHA512)); - Add(new Option(new[] - { - "--spamsum", "-f" - }, - () => true, - UI.Calculates_SpamSum_fuzzy_hash)); + Add(new Option(["--spamsum", "-f"], () => true, UI.Calculates_SpamSum_fuzzy_hash)); - Add(new Option(new[] - { - "--whole-disc", "-w" - }, - () => true, - UI.Checksums_the_whole_disc)); + Add(new Option(["--whole-disc", "-w"], () => true, UI.Checksums_the_whole_disc)); AddArgument(new Argument { diff --git a/Aaru/Commands/Image/Convert.cs b/Aaru/Commands/Image/Convert.cs index 97821a3ff..b6330f3bf 100644 --- a/Aaru/Commands/Image/Convert.cs +++ b/Aaru/Commands/Image/Convert.cs @@ -69,21 +69,11 @@ sealed class ConvertImageCommand : Command public ConvertImageCommand() : base("convert", UI.Image_Convert_Command_Description) { - Add(new Option(new[] - { - "--cicm-xml", "-x" - }, - () => null, - UI.Take_metadata_from_existing_CICM_XML_sidecar)); + Add(new Option(["--cicm-xml", "-x"], () => null, UI.Take_metadata_from_existing_CICM_XML_sidecar)); Add(new Option("--comments", () => null, UI.Image_comments)); - Add(new Option(new[] - { - "--count", "-c" - }, - () => 64, - UI.How_many_sectors_to_convert_at_once)); + Add(new Option(["--count", "-c"], () => 64, UI.How_many_sectors_to_convert_at_once)); Add(new Option("--creator", () => null, UI.Who_person_created_the_image)); @@ -95,16 +85,9 @@ sealed class ConvertImageCommand : Command Add(new Option("--drive-serial", () => null, UI.Serial_number_of_drive_read_the_media_by_image)); - Add(new Option(new[] - { - "--force", "-f" - }, - UI.Continue_conversion_even_if_data_lost)); + Add(new Option(["--force", "-f"], UI.Continue_conversion_even_if_data_lost)); - Add(new Option(new[] - { - "--format", "-p" - }, + Add(new Option(["--format", "-p"], () => null, UI.Format_of_the_output_image_as_plugin_name_or_plugin_id)); @@ -120,66 +103,23 @@ sealed class ConvertImageCommand : Command Add(new Option("--media-serial", () => null, UI.Serial_number_of_media_by_image)); Add(new Option("--media-title", () => null, UI.Title_of_media_represented_by_image)); - Add(new Option(new[] - { - "--options", "-O" - }, - () => null, - UI.Comma_separated_name_value_pairs_of_image_options)); + Add(new Option(["--options", "-O"], () => null, UI.Comma_separated_name_value_pairs_of_image_options)); - Add(new Option(new[] - { - "--resume-file", "-r" - }, - () => null, - UI.Take_dump_hardware_from_existing_resume)); + Add(new Option(["--resume-file", "-r"], () => null, UI.Take_dump_hardware_from_existing_resume)); - Add(new Option(new[] - { - "--geometry", "-g" - }, - () => null, - UI.Force_geometry_help)); + Add(new Option(["--geometry", "-g"], () => null, UI.Force_geometry_help)); - Add(new Option(new[] - { - "--fix-subchannel-position" - }, - () => true, - UI.Fix_subchannel_position_help)); + Add(new Option(["--fix-subchannel-position"], () => true, UI.Fix_subchannel_position_help)); - Add(new Option(new[] - { - "--fix-subchannel" - }, - () => false, - UI.Fix_subchannel_help)); + Add(new Option(["--fix-subchannel"], () => false, UI.Fix_subchannel_help)); - Add(new Option(new[] - { - "--fix-subchannel-crc" - }, - () => false, - UI.Fix_subchannel_crc_help)); + Add(new Option(["--fix-subchannel-crc"], () => false, UI.Fix_subchannel_crc_help)); - Add(new Option(new[] - { - "--generate-subchannels" - }, - () => false, - UI.Generates_subchannels_help)); + Add(new Option(["--generate-subchannels"], () => false, UI.Generates_subchannels_help)); - Add(new Option(new[] - { - "--decrypt" - }, - () => false, - UI.Decrypt_sectors_help)); + Add(new Option(["--decrypt"], () => false, UI.Decrypt_sectors_help)); - Add(new Option(new[] - { - "--aaru-metadata", "-m" - }, + Add(new Option(["--aaru-metadata", "-m"], () => null, "Take metadata from existing Aaru Metadata sidecar.")); @@ -556,7 +496,7 @@ sealed class ConvertImageCommand : Command return (int)ErrorNumber.CannotOpenFormat; } - List candidates = new(); + List candidates = []; // Try extension if(string.IsNullOrEmpty(format)) @@ -1122,7 +1062,7 @@ sealed class ConvertImageCommand : Command Dictionary isrcs = new(); Dictionary trackFlags = new(); string mcn = null; - HashSet subchannelExtents = new(); + HashSet subchannelExtents = []; Dictionary smallestPregapLbaPerTrack = new(); var tracks = new Track[inputOptical.Tracks.Count]; @@ -1486,12 +1426,7 @@ sealed class ConvertImageCommand : Command { foreach((byte track, byte flags) in trackFlags) { - outputOptical.WriteSectorTag(new[] - { - flags - }, - track, - SectorTagType.CdTrackFlags); + outputOptical.WriteSectorTag([flags], track, SectorTagType.CdTrackFlags); } } diff --git a/Aaru/Commands/Image/CreateSidecar.cs b/Aaru/Commands/Image/CreateSidecar.cs index e9a59b185..6d880854a 100644 --- a/Aaru/Commands/Image/CreateSidecar.cs +++ b/Aaru/Commands/Image/CreateSidecar.cs @@ -59,26 +59,11 @@ sealed class CreateSidecarCommand : Command public CreateSidecarCommand() : base("create-sidecar", UI.Image_Create_Sidecar_Command_Description) { - Add(new Option(new[] - { - "--block-size", "-b" - }, - () => 512, - UI.Tape_block_size_argument_help)); + Add(new Option(["--block-size", "-b"], () => 512, UI.Tape_block_size_argument_help)); - Add(new Option(new[] - { - "--encoding", "-e" - }, - () => null, - UI.Name_of_character_encoding_to_use)); + Add(new Option(["--encoding", "-e"], () => null, UI.Name_of_character_encoding_to_use)); - Add(new Option(new[] - { - "--tape", "-t" - }, - () => false, - UI.Tape_argument_input_help)); + Add(new Option(["--tape", "-t"], () => false, UI.Tape_argument_input_help)); AddArgument(new Argument { diff --git a/Aaru/Commands/Image/Decode.cs b/Aaru/Commands/Image/Decode.cs index f1227f423..7cded5f41 100644 --- a/Aaru/Commands/Image/Decode.cs +++ b/Aaru/Commands/Image/Decode.cs @@ -53,33 +53,15 @@ sealed class DecodeCommand : Command public DecodeCommand() : base("decode", UI.Image_Decode_Command_Description) { - Add(new Option(new[] - { - "--disk-tags", "-f" - }, - () => true, - UI.Decode_media_tags)); + Add(new Option(["--disk-tags", "-f"], () => true, UI.Decode_media_tags)); - Add(new Option(new[] - { - "--length", "-l" - }, + Add(new Option(["--length", "-l"], () => UI.Parameter_response_all_sectors, UI.How_many_sectors_to_decode_or_all)); - Add(new Option(new[] - { - "--sector-tags", "-p" - }, - () => true, - UI.Decode_sector_tags)); + Add(new Option(["--sector-tags", "-p"], () => true, UI.Decode_sector_tags)); - Add(new Option(new[] - { - "--start", "-s" - }, - () => 0, - UI.Sector_to_start_decoding_from)); + Add(new Option(["--start", "-s"], () => 0, UI.Sector_to_start_decoding_from)); AddArgument(new Argument { diff --git a/Aaru/Commands/Image/Entropy.cs b/Aaru/Commands/Image/Entropy.cs index 7688085a5..cb6101cdc 100644 --- a/Aaru/Commands/Image/Entropy.cs +++ b/Aaru/Commands/Image/Entropy.cs @@ -51,26 +51,15 @@ sealed class EntropyCommand : Command public EntropyCommand() : base("entropy", UI.Image_Entropy_Command_Description) { - Add(new Option(new[] - { - "--duplicated-sectors", "-p" - }, + Add(new Option(["--duplicated-sectors", "-p"], () => true, UI.Calculates_how_many_sectors_are_duplicated)); - Add(new Option(new[] - { - "--separated-tracks", "-t" - }, + Add(new Option(["--separated-tracks", "-t"], () => true, UI.Calculates_entropy_for_each_track_separately)); - Add(new Option(new[] - { - "--whole-disc", "-w" - }, - () => true, - UI.Calculates_entropy_for_the_whole_disc)); + Add(new Option(["--whole-disc", "-w"], () => true, UI.Calculates_entropy_for_the_whole_disc)); AddArgument(new Argument { diff --git a/Aaru/Commands/Image/Print.cs b/Aaru/Commands/Image/Print.cs index 33a0e9fc5..34fd431c9 100644 --- a/Aaru/Commands/Image/Print.cs +++ b/Aaru/Commands/Image/Print.cs @@ -50,32 +50,13 @@ sealed class PrintHexCommand : Command public PrintHexCommand() : base("print", UI.Image_Print_Command_Description) { - Add(new Option(new[] - { - "--length", "-l" - }, - () => 1, - UI.How_many_sectors_to_print)); + Add(new Option(["--length", "-l"], () => 1, UI.How_many_sectors_to_print)); - Add(new Option(new[] - { - "--long-sectors", "-r" - }, - () => false, - UI.Print_sectors_with_tags_included)); + Add(new Option(["--long-sectors", "-r"], () => false, UI.Print_sectors_with_tags_included)); - Add(new Option(new[] - { - "--start", "-s" - }, - UI.Starting_sector)); + Add(new Option(["--start", "-s"], UI.Starting_sector)); - Add(new Option(new[] - { - "--width", "-w" - }, - () => 32, - UI.How_many_bytes_to_print_per_line)); + Add(new Option(["--width", "-w"], () => 32, UI.How_many_bytes_to_print_per_line)); AddArgument(new Argument { @@ -238,7 +219,7 @@ sealed class PrintHexCommand : Command } } - byte[] sector = Array.Empty(); + byte[] sector = []; ErrorNumber errno = ErrorNumber.NoError; Core.Spectre.ProgressSingleSpinner(ctx => diff --git a/Aaru/Commands/Image/Verify.cs b/Aaru/Commands/Image/Verify.cs index 059666230..3f25789ab 100644 --- a/Aaru/Commands/Image/Verify.cs +++ b/Aaru/Commands/Image/Verify.cs @@ -56,33 +56,13 @@ sealed class VerifyCommand : Command public VerifyCommand() : base("verify", UI.Image_Verify_Command_Description) { - Add(new Option(new[] - { - "--verify-disc", "-w" - }, - () => true, - UI.Verify_media_image_if_supported)); + Add(new Option(["--verify-disc", "-w"], () => true, UI.Verify_media_image_if_supported)); - Add(new Option(new[] - { - "--verify-sectors", "-s" - }, - () => true, - UI.Verify_all_sectors_if_supported)); + Add(new Option(["--verify-sectors", "-s"], () => true, UI.Verify_all_sectors_if_supported)); - Add(new Option(new[] - { - "--create-graph", "-g" - }, - () => true, - UI.Create_graph_of_verified_disc)); + Add(new Option(["--create-graph", "-g"], () => true, UI.Create_graph_of_verified_disc)); - Add(new Option(new[] - { - "--dimensions" - }, - () => 1080, - UI.Verify_dimensions_paramater_help)); + Add(new Option(["--dimensions"], () => 1080, UI.Verify_dimensions_paramater_help)); AddArgument(new Argument { @@ -249,8 +229,8 @@ sealed class VerifyCommand : Command } var stopwatch = new Stopwatch(); - List failingLbas = new(); - List unknownLbas = new(); + List failingLbas = []; + List unknownLbas = []; IMediaGraph mediaGraph = null; if(verifiableSectorsImage is IOpticalMediaImage { Tracks: not null } opticalMediaImage) @@ -324,7 +304,7 @@ sealed class VerifyCommand : Command if(mediaGraph != null) { - List tempCorrectLbas = new(); + List tempCorrectLbas = []; for(ulong l = 0; l < (remainingSectors < 512 ? remainingSectors : 512); l++) tempCorrectLbas.Add(currentSector + l); @@ -416,7 +396,7 @@ sealed class VerifyCommand : Command if(mediaGraph != null) { - List tempCorrectLbas = new(); + List tempCorrectLbas = []; for(ulong l = 0; l < (remainingSectors < 512 ? remainingSectors : 512); l++) tempCorrectLbas.Add(currentSector + l); @@ -466,16 +446,18 @@ sealed class VerifyCommand : Command if(failingLbas.Count == (int)inputFormat.Info.Sectors) AaruConsole.VerboseWriteLine($"\t[red]{UI.all_sectors}[/]"); else - foreach(ulong t in failingLbas) - AaruConsole.VerboseWriteLine("\t{0}", t); + { + foreach(ulong t in failingLbas) AaruConsole.VerboseWriteLine("\t{0}", t); + } AaruConsole.WriteLine($"[yellow3_1]{UI.LBAs_without_checksum}[/]"); if(unknownLbas.Count == (int)inputFormat.Info.Sectors) AaruConsole.VerboseWriteLine($"\t[yellow3_1]{UI.all_sectors}[/]"); else - foreach(ulong t in unknownLbas) - AaruConsole.VerboseWriteLine("\t{0}", t); + { + foreach(ulong t in unknownLbas) AaruConsole.VerboseWriteLine("\t{0}", t); + } } // TODO: Convert to table diff --git a/Aaru/Commands/Media/Dump.cs b/Aaru/Commands/Media/Dump.cs index 0770bebfd..487a68cc0 100644 --- a/Aaru/Commands/Media/Dump.cs +++ b/Aaru/Commands/Media/Dump.cs @@ -70,35 +70,17 @@ sealed class DumpMediaCommand : Command public DumpMediaCommand() : base("dump", UI.Media_Dump_Command_Description) { - Add(new Option(new[] - { - "--cicm-xml", "-x" - }, - () => null, - UI.Take_metadata_from_existing_CICM_XML_sidecar)); + Add(new Option(["--cicm-xml", "-x"], () => null, UI.Take_metadata_from_existing_CICM_XML_sidecar)); - Add(new Option(new[] - { - "--encoding", "-e" - }, - () => null, - UI.Name_of_character_encoding_to_use)); + Add(new Option(["--encoding", "-e"], () => null, UI.Name_of_character_encoding_to_use)); Add(new Option("--first-pregap", () => false, UI.Try_to_read_first_track_pregap)); Add(new Option("--fix-offset", () => true, UI.Fix_audio_tracks_offset)); - Add(new Option(new[] - { - "--force", "-f" - }, - () => false, - UI.Continue_dumping_whatever_happens)); + Add(new Option(["--force", "-f"], () => false, UI.Continue_dumping_whatever_happens)); - Add(new Option(new[] - { - "--format", "-t" - }, + Add(new Option(["--format", "-t"], () => null, UI.Format_of_the_output_image_as_plugin_name_or_plugin_id)); @@ -106,42 +88,19 @@ sealed class DumpMediaCommand : Command Add(new Option("--trim", () => true, UI.Enables_trimming_errored_from_skipped_sectors)); - Add(new Option(new[] - { - "--options", "-O" - }, - () => null, - UI.Comma_separated_name_value_pairs_of_image_options)); + Add(new Option(["--options", "-O"], () => null, UI.Comma_separated_name_value_pairs_of_image_options)); Add(new Option("--persistent", () => false, UI.Try_to_recover_partial_or_incorrect_data)); - Add(new Option(new[] - { - "--resume", "-r" - }, - () => true, - UI.Create_or_use_resume_mapfile)); + Add(new Option(["--resume", "-r"], () => true, UI.Create_or_use_resume_mapfile)); - Add(new Option(new[] - { - "--retry-passes", "-p" - }, - () => 5, - UI.How_many_retry_passes_to_do)); + Add(new Option(["--retry-passes", "-p"], () => 5, UI.How_many_retry_passes_to_do)); - Add(new Option(new[] - { - "--skip", "-k" - }, + Add(new Option(["--skip", "-k"], () => 512, UI.When_an_unreadable_sector_is_found_skip_this_many_sectors)); - Add(new Option(new[] - { - "--stop-on-error", "-s" - }, - () => false, - UI.Stop_media_dump_on_first_error)); + Add(new Option(["--stop-on-error", "-s"], () => false, UI.Stop_media_dump_on_first_error)); Add(new Option("--subchannel", () => UI.Subchannel_name_any, UI.Subchannel_to_dump_help)); @@ -161,115 +120,39 @@ sealed class DumpMediaCommand : Command Name = "output-path" }); - Add(new Option(new[] - { - "--private" - }, - () => false, - UI.Do_not_store_paths_and_serial_numbers_in_log_or_metadata)); + Add(new Option(["--private"], () => false, UI.Do_not_store_paths_and_serial_numbers_in_log_or_metadata)); - Add(new Option(new[] - { - "--fix-subchannel-position" - }, - () => true, - UI.Fix_subchannel_position_help)); + Add(new Option(["--fix-subchannel-position"], () => true, UI.Fix_subchannel_position_help)); - Add(new Option(new[] - { - "--retry-subchannel" - }, - () => true, - UI.Retry_subchannel_help)); + Add(new Option(["--retry-subchannel"], () => true, UI.Retry_subchannel_help)); - Add(new Option(new[] - { - "--fix-subchannel" - }, - () => false, - UI.Fix_subchannel_help)); + Add(new Option(["--fix-subchannel"], () => false, UI.Fix_subchannel_help)); - Add(new Option(new[] - { - "--fix-subchannel-crc" - }, - () => false, - UI.Fix_subchannel_crc_help)); + Add(new Option(["--fix-subchannel-crc"], () => false, UI.Fix_subchannel_crc_help)); - Add(new Option(new[] - { - "--generate-subchannels" - }, - () => false, - UI.Generate_subchannels_dump_help)); + Add(new Option(["--generate-subchannels"], () => false, UI.Generate_subchannels_dump_help)); - Add(new Option(new[] - { - "--skip-cdiready-hole" - }, - () => true, - UI.Skip_CDi_Ready_hole_help)); + Add(new Option(["--skip-cdiready-hole"], () => true, UI.Skip_CDi_Ready_hole_help)); - Add(new Option(new[] - { - "--eject" - }, - () => false, - UI.Eject_media_after_dump_finishes)); + Add(new Option(["--eject"], () => false, UI.Eject_media_after_dump_finishes)); - Add(new Option(new[] - { - "--max-blocks" - }, - () => 64, - UI.Maximum_number_of_blocks_to_read_at_once)); + Add(new Option(["--max-blocks"], () => 64, UI.Maximum_number_of_blocks_to_read_at_once)); - Add(new Option(new[] - { - "--use-buffered-reads" - }, - () => true, - UI.OS_buffered_reads_help)); + Add(new Option(["--use-buffered-reads"], () => true, UI.OS_buffered_reads_help)); - Add(new Option(new[] - { - "--store-encrypted" - }, - () => true, - UI.Store_encrypted_data_as_is)); + Add(new Option(["--store-encrypted"], () => true, UI.Store_encrypted_data_as_is)); - Add(new Option(new[] - { - "--title-keys" - }, - () => true, - UI.Try_to_read_the_title_keys_from_CSS_DVDs)); + Add(new Option(["--title-keys"], () => true, UI.Try_to_read_the_title_keys_from_CSS_DVDs)); - Add(new Option(new[] - { - "--ignore-cdr-runouts" - }, + Add(new Option(["--ignore-cdr-runouts"], () => 10, UI.How_many_CDRW_run_out_sectors_to_ignore_and_regenerate)); - Add(new Option(new[] - { - "--create-graph", "-g" - }, - () => true, - UI.Create_graph_of_dumped_media)); + Add(new Option(["--create-graph", "-g"], () => true, UI.Create_graph_of_dumped_media)); - Add(new Option(new[] - { - "--dimensions" - }, - () => 1080, - UI.Dump_graph_dimensions_argument_help)); + Add(new Option(["--dimensions"], () => 1080, UI.Dump_graph_dimensions_argument_help)); - Add(new Option(new[] - { - "--aaru-metadata", "-m" - }, + Add(new Option(["--aaru-metadata", "-m"], () => null, "Take metadata from existing Aaru Metadata sidecar.")); @@ -420,7 +303,7 @@ sealed class DumpMediaCommand : Command if(isResponse) eject = true; PluginRegister plugins = PluginRegister.Singleton; - List candidates = new(); + List candidates = []; string extension = Path.GetExtension(outputPath); // Try extension @@ -677,7 +560,7 @@ sealed class DumpMediaCommand : Command } plugins = PluginRegister.Singleton; - candidates = new List(); + candidates = []; // Try extension if(string.IsNullOrEmpty(format)) diff --git a/Aaru/Commands/Media/Info.cs b/Aaru/Commands/Media/Info.cs index 7d34c9562..9d7093edb 100644 --- a/Aaru/Commands/Media/Info.cs +++ b/Aaru/Commands/Media/Info.cs @@ -69,12 +69,7 @@ sealed class MediaInfoCommand : Command public MediaInfoCommand() : base("info", UI.Media_Info_Command_Description) { - Add(new Option(new[] - { - "--output-prefix", "-w" - }, - () => null, - UI.Prefix_for_saving_binary_information)); + Add(new Option(["--output-prefix", "-w"], () => null, UI.Prefix_for_saving_binary_information)); AddArgument(new Argument { diff --git a/Aaru/Commands/Media/Scan.cs b/Aaru/Commands/Media/Scan.cs index 69a6ad53f..9d55156b2 100644 --- a/Aaru/Commands/Media/Scan.cs +++ b/Aaru/Commands/Media/Scan.cs @@ -52,26 +52,15 @@ sealed class MediaScanCommand : Command public MediaScanCommand() : base("scan", UI.Media_Scan_Command_Description) { - Add(new Option(new[] - { - "--mhdd-log", "-m" - }, + Add(new Option(["--mhdd-log", "-m"], () => null, UI.Write_a_log_of_the_scan_in_the_format_used_by_MHDD)); - Add(new Option(new[] - { - "--ibg-log", "-b" - }, + Add(new Option(["--ibg-log", "-b"], () => null, UI.Write_a_log_of_the_scan_in_the_format_used_by_ImgBurn)); - Add(new Option(new[] - { - "--use-buffered-reads" - }, - () => true, - UI.OS_buffered_reads_help)); + Add(new Option(["--use-buffered-reads"], () => true, UI.OS_buffered_reads_help)); AddArgument(new Argument { diff --git a/Aaru/Main.cs b/Aaru/Main.cs index 782df5df4..e080519a2 100644 --- a/Aaru/Main.cs +++ b/Aaru/Main.cs @@ -218,26 +218,13 @@ class MainClass var rootCommand = new RootCommand(); - rootCommand.AddGlobalOption(new Option(new[] - { - "--verbose", "-v" - }, - () => false, - UI.Shows_verbose_output)); + rootCommand.AddGlobalOption(new Option(["--verbose", "-v"], () => false, UI.Shows_verbose_output)); - rootCommand.AddGlobalOption(new Option(new[] - { - "--debug", "-d" - }, + rootCommand.AddGlobalOption(new Option(["--debug", "-d"], () => false, UI.Shows_debug_output_from_plugins)); - Option pauseOption = new(new[] - { - "--pause" - }, - () => false, - UI.Pauses_before_exiting); + Option pauseOption = new(["--pause"], () => false, UI.Pauses_before_exiting); rootCommand.AddGlobalOption(pauseOption);