From 1f340bd244cefd3143f2fbefcc323e86e34bb92d Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 7 Nov 2023 20:57:05 -0500 Subject: [PATCH] Remove framework gating --- AACS/CopyrightRecord.cs | 4 - AACS/DriveRevocationListEntry.cs | 4 - AACS/DriveRevocationListRecord.cs | 4 - AACS/DriveRevocationSignatureBlock.cs | 4 - AACS/EndOfMediaKeyBlockRecord.cs | 4 - AACS/ExplicitSubsetDifferenceRecord.cs | 4 - AACS/HostRevocationListEntry.cs | 4 - AACS/HostRevocationListRecord.cs | 4 - AACS/HostRevocationSignatureBlock.cs | 4 - AACS/MediaKeyBlock.cs | 4 - AACS/MediaKeyDataRecord.cs | 4 - AACS/SubsetDifferenceIndexRecord.cs | 4 - AACS/VerifyMediaKeyRecord.cs | 4 - ArchiveDotOrg/File.cs | 248 ------------- ArchiveDotOrg/Files.cs | 12 - AttractMode/MetadataFile.cs | 8 - AttractMode/Row.cs | 92 ----- BDPlus/SVM.cs | 16 - BFPK/Archive.cs | 8 - BFPK/FileEntry.cs | 4 - BFPK/Header.cs | 4 - BSP/File.cs | 16 - BSP/Texture.cs | 16 - BSP/TextureHeader.cs | 4 - CFB/Binary.cs | 20 -- CFB/DirectoryEntry.cs | 4 - CFB/FileHeader.cs | 8 - CFB/SummaryInformation.cs | 12 - CFB/Variant.cs | 4 - CHD/Header.cs | 4 - CHD/HeaderV1.cs | 8 - CHD/HeaderV2.cs | 8 - CHD/HeaderV3.cs | 16 - CHD/HeaderV4.cs | 12 - CHD/HeaderV5.cs | 12 - Charts/SongIni.cs | 128 ------- Charts/TitlesIni.cs | 8 - ClrMamePro/Archive.cs | 8 - ClrMamePro/BiosSet.cs | 16 - ClrMamePro/Chip.cs | 20 -- ClrMamePro/ClrMamePro.cs | 64 ---- ClrMamePro/DipSwitch.cs | 16 - ClrMamePro/Disk.cs | 28 -- ClrMamePro/Driver.cs | 24 -- ClrMamePro/GameBase.cs | 88 ----- ClrMamePro/Input.cs | 28 -- ClrMamePro/Media.cs | 24 -- ClrMamePro/MetadataFile.cs | 12 - ClrMamePro/Release.cs | 24 -- ClrMamePro/Rom.cs | 88 ----- ClrMamePro/RomVault.cs | 60 ---- ClrMamePro/Sample.cs | 8 - ClrMamePro/Sound.cs | 8 - ClrMamePro/Video.cs | 32 -- Compression/LZ/FileHeader.cs | 4 - Compression/LZ/State.cs | 12 - Compression/LZX/AlignedOffsetBlockData.cs | 32 -- Compression/LZX/Block.cs | 8 - Compression/LZX/Chunk.cs | 8 - Compression/LZX/UncompressedBlockData.cs | 4 - Compression/LZX/VerbatimBlockData.cs | 28 -- Compression/MSZIP/Block.cs | 8 - Compression/MSZIP/CompressedBlockHeader.cs | 8 - Compression/MSZIP/DeflateBlock.cs | 12 - .../MSZIP/FixedCompressedDataHeader.cs | 16 - Compression/Quantum/Model.cs | 4 - CueSheets/CueFile.cs | 8 - CueSheets/CueSheet.cs | 24 -- CueSheets/CueTrack.cs | 28 -- DVD/AudioSubPictureAttributesTable.cs | 12 - DVD/AudioSubPictureAttributesTableEntry.cs | 4 - DVD/CellAddressTable.cs | 8 - DVD/LanguageUnitTable.cs | 12 - DVD/ParentalManagementMasksTable.cs | 8 - DVD/ParentalManagementMasksTableEntry.cs | 4 - DVD/ProgramChainTable.cs | 8 - DVD/TitlesTable.cs | 8 - DVD/VOBUAddressMap.cs | 4 - DVD/VideoManagerIFO.cs | 28 -- DVD/VideoTitleSetIFO.cs | 28 -- DosCenter/DosCenter.cs | 32 -- DosCenter/File.cs | 20 -- DosCenter/Game.cs | 12 - DosCenter/MetadataFile.cs | 12 - EverdriveSMDB/MetadataFile.cs | 4 - EverdriveSMDB/Row.cs | 28 -- GCF/DirectoryEntry.cs | 4 - GCF/File.cs | 84 ----- Hashfile/Hashfile.cs | 32 -- Hashfile/MD5.cs | 8 - Hashfile/SFV.cs | 8 - Hashfile/SHA1.cs | 8 - Hashfile/SHA256.cs | 8 - Hashfile/SHA384.cs | 8 - Hashfile/SHA512.cs | 8 - Hashfile/SpamSum.cs | 8 - IRD/File.cs | 56 --- InstallShieldCabinet/Cabinet.cs | 40 --- InstallShieldCabinet/CommonHeader.cs | 4 - InstallShieldCabinet/Component.cs | 32 -- InstallShieldCabinet/Descriptor.cs | 44 --- InstallShieldCabinet/FileDescriptor.cs | 8 - InstallShieldCabinet/FileGroup.cs | 36 -- InstallShieldCabinet/OffsetList.cs | 4 - LinearExecutable/DebugInformation.cs | 8 - LinearExecutable/EntryTableBundle.cs | 4 - LinearExecutable/Executable.cs | 64 ---- LinearExecutable/FixupRecordTableEntry.cs | 4 - .../ImportModuleNameTableEntry.cs | 4 - .../ImportProcedureNameTableEntry.cs | 4 - LinearExecutable/InformationBlock.cs | 4 - .../NonResidentNamesTableEntry.cs | 4 - LinearExecutable/ResidentNamesTableEntry.cs | 4 - Listrom/MetadataFile.cs | 8 - Listrom/Row.cs | 20 -- Listrom/Set.cs | 12 - Listxml/Adjuster.cs | 20 -- Listxml/Analog.cs | 12 - Listxml/BiosSet.cs | 20 -- Listxml/Chip.cs | 28 -- Listxml/Condition.cs | 24 -- Listxml/ConfLocation.cs | 20 -- Listxml/ConfSetting.cs | 24 -- Listxml/Configuration.cs | 32 -- Listxml/Control.cs | 56 --- Listxml/Device.cs | 36 -- Listxml/DeviceRef.cs | 12 - Listxml/DipLocation.cs | 20 -- Listxml/DipSwitch.cs | 32 -- Listxml/DipValue.cs | 24 -- Listxml/Disk.cs | 44 --- Listxml/Display.cs | 64 ---- Listxml/Driver.cs | 52 --- Listxml/Extension.cs | 12 - Listxml/Feature.cs | 20 -- Listxml/GameBase.cs | 140 -------- Listxml/Input.cs | 36 -- Listxml/Instance.cs | 16 - Listxml/M1.cs | 16 - Listxml/Mame.cs | 24 -- Listxml/Port.cs | 16 - Listxml/RamOption.cs | 20 -- Listxml/Rom.cs | 56 --- Listxml/Sample.cs | 12 - Listxml/Slot.cs | 16 - Listxml/SlotOption.cs | 20 -- Listxml/SoftwareList.cs | 24 -- Listxml/Sound.cs | 12 - Listxml/Video.cs | 36 -- Logiqx/Archive.cs | 12 - Logiqx/BiosSet.cs | 20 -- Logiqx/ClrMamePro.cs | 24 -- Logiqx/Datafile.cs | 32 -- Logiqx/DeviceRef.cs | 12 - Logiqx/Dir.cs | 16 - Logiqx/Disk.cs | 32 -- Logiqx/Driver.cs | 40 --- Logiqx/GameBase.cs | 128 ------- Logiqx/Header.cs | 68 ---- Logiqx/Media.cs | 28 -- Logiqx/Release.cs | 28 -- Logiqx/Rom.cs | 80 ----- Logiqx/RomCenter.cs | 36 -- Logiqx/Sample.cs | 12 - Logiqx/SoftwareList.cs | 24 -- Logiqx/Trurip.cs | 64 ---- MSDOS/Executable.cs | 8 - MSDOS/ExecutableHeader.cs | 12 - Metadata/DictionaryBase.cs | 70 +--- MicrosoftCabinet/CFDATA.cs | 8 - MicrosoftCabinet/CFFILE.cs | 4 - MicrosoftCabinet/CFFOLDER.cs | 8 - MicrosoftCabinet/CFHEADER.cs | 24 -- MicrosoftCabinet/Cabinet.cs | 12 - MoPaQ/Archive.cs | 28 -- MoPaQ/ArchiveHeader.cs | 28 -- MoPaQ/BetTable.cs | 8 - MoPaQ/HetTable.cs | 12 - MoPaQ/PatchHeader.cs | 12 - MoPaQ/PatchInfo.cs | 8 - MoPaQ/UserData.cs | 4 - N3DS/ARM11KernelCapabilities.cs | 8 - N3DS/ARM11LocalSystemCapabilities.cs | 20 -- N3DS/ARM9AccessControl.cs | 4 - N3DS/AccessControlInfo.cs | 12 - N3DS/CIA.cs | 28 -- N3DS/CIAHeader.cs | 4 - N3DS/CardInfoHeader.cs | 20 -- N3DS/Cart.cs | 28 -- N3DS/Certificate.cs | 32 -- N3DS/ContentChunkRecord.cs | 4 - N3DS/ContentInfoRecord.cs | 4 - N3DS/DevelopmentCardInfoHeader.cs | 20 -- N3DS/ExeFSFileHeader.cs | 8 - N3DS/ExeFSHeader.cs | 12 - N3DS/InitialData.cs | 24 -- N3DS/MetaData.cs | 16 - N3DS/NCCHExtendedHeader.cs | 20 -- N3DS/NCCHHeader.cs | 52 --- N3DS/NCSDHeader.cs | 48 --- N3DS/RomFSHeader.cs | 20 -- N3DS/StorageInfo.cs | 12 - N3DS/SystemControlInfo.cs | 32 -- N3DS/SystemInfo.cs | 4 - N3DS/TestData.cs | 36 -- N3DS/Ticket.cs | 48 --- N3DS/TitleMetadata.cs | 40 --- NCF/DirectoryEntry.cs | 4 - NCF/File.cs | 56 --- NewExecutable/Executable.cs | 36 -- NewExecutable/ExecutableHeader.cs | 4 - NewExecutable/ImportedNameTableEntry.cs | 4 - NewExecutable/NonResidentNameTableEntry.cs | 4 - NewExecutable/PerSegmentData.cs | 4 - NewExecutable/RelocationRecord.cs | 16 - NewExecutable/ResidentNameTableEntry.cs | 4 - NewExecutable/ResourceTable.cs | 8 - NewExecutable/ResourceTypeAndNameString.cs | 4 - NewExecutable/ResourceTypeInformationEntry.cs | 4 - Nitro/Cart.cs | 20 -- Nitro/CommonHeader.cs | 28 -- Nitro/ExtendedDSiHeader.cs | 72 ---- Nitro/NameListEntry.cs | 4 - Nitro/NameTable.cs | 8 - OfflineList/CanOpen.cs | 12 - OfflineList/Configuration.cs | 52 --- OfflineList/Dat.cs | 24 -- OfflineList/DatUrl.cs | 16 - OfflineList/FileRomCRC.cs | 16 - OfflineList/Files.cs | 12 - OfflineList/Find.cs | 20 -- OfflineList/GUI.cs | 12 - OfflineList/Game.cs | 64 ---- OfflineList/Games.cs | 12 - OfflineList/Image.cs | 24 -- OfflineList/Images.cs | 20 -- OfflineList/InfoBase.cs | 20 -- OfflineList/Infos.cs | 60 ---- OfflineList/NewDat.cs | 20 -- OfflineList/Search.cs | 12 - OfflineList/To.cs | 24 -- OpenMSX/Dump.cs | 16 - OpenMSX/Original.cs | 16 - OpenMSX/RomBase.cs | 24 -- OpenMSX/Software.cs | 36 -- OpenMSX/SoftwareDb.cs | 16 - PAK/DirectoryItem.cs | 4 - PAK/File.cs | 8 - PAK/Header.cs | 4 - PFF/Archive.cs | 12 - PFF/Footer.cs | 4 - PFF/Header.cs | 4 - PFF/Segment.cs | 4 - PIC/DiscInformation.cs | 4 - PIC/DiscInformationUnit.cs | 12 - PIC/DiscInformationUnitBody.cs | 8 - PIC/DiscInformationUnitHeader.cs | 4 - PIC/DiscInformationUnitTrailer.cs | 8 - PlayJ/AudioFile.cs | 16 - PlayJ/AudioHeader.cs | 28 -- PlayJ/DataFile.cs | 8 - PlayJ/Playlist.cs | 8 - PlayJ/PlaylistHeader.cs | 4 - PlayJ/UnknownBlock1.cs | 4 - PlayJ/UnknownBlock3.cs | 4 - PlayStation3/SFB.cs | 44 --- PlayStation3/SFO.cs | 20 -- PlayStation3/SFOHeader.cs | 4 - PortableExecutable/AssemblyManifest.cs | 328 ------------------ .../AttributeCertificateTableEntry.cs | 4 - PortableExecutable/BaseRelocationBlock.cs | 4 - PortableExecutable/COFFStringTable.cs | 4 - PortableExecutable/COFFSymbolTableEntry.cs | 24 -- PortableExecutable/CursorAndIconResource.cs | 4 - PortableExecutable/DebugTable.cs | 4 - PortableExecutable/DialogBoxResource.cs | 16 - PortableExecutable/DialogItemTemplate.cs | 12 - .../DialogItemTemplateExtended.cs | 12 - PortableExecutable/DialogTemplate.cs | 16 - PortableExecutable/DialogTemplateExtended.cs | 16 - PortableExecutable/DirEntry.cs | 4 - PortableExecutable/Executable.cs | 56 --- PortableExecutable/ExportDirectoryTable.cs | 4 - PortableExecutable/ExportNamePointerTable.cs | 4 - PortableExecutable/ExportNameTable.cs | 4 - PortableExecutable/ExportOrdinalTable.cs | 4 - PortableExecutable/ExportTable.cs | 20 -- PortableExecutable/FontDirEntry.cs | 12 - PortableExecutable/FontGroupHeader.cs | 4 - PortableExecutable/HintNameTableEntry.cs | 4 - .../ImportDirectoryTableEntry.cs | 4 - PortableExecutable/ImportTable.cs | 16 - .../LoadConfigurationDirectory.cs | 4 - PortableExecutable/MenuItem.cs | 8 - PortableExecutable/MenuItemExtended.cs | 4 - PortableExecutable/MenuResource.cs | 16 - PortableExecutable/MessageResourceData.cs | 8 - PortableExecutable/MessageResourceEntry.cs | 4 - PortableExecutable/NB10ProgramDatabase.cs | 4 - PortableExecutable/OptionalHeader.cs | 56 --- PortableExecutable/RSDSProgramDatabase.cs | 4 - PortableExecutable/ResourceDataEntry.cs | 4 - PortableExecutable/ResourceDirectoryEntry.cs | 12 - PortableExecutable/ResourceDirectoryString.cs | 4 - PortableExecutable/ResourceDirectoryTable.cs | 4 - PortableExecutable/SectionHeader.cs | 12 - PortableExecutable/SecuROMAddD.cs | 16 - PortableExecutable/SecuROMAddDEntry.cs | 4 - PortableExecutable/StringData.cs | 8 - PortableExecutable/StringFileInfo.cs | 8 - PortableExecutable/StringTable.cs | 8 - PortableExecutable/VarData.cs | 8 - PortableExecutable/VarFileInfo.cs | 8 - PortableExecutable/VersionInfo.cs | 16 - Quantum/Archive.cs | 8 - Quantum/FileDescriptor.cs | 8 - Quantum/Header.cs | 4 - RomCenter/Credits.cs | 32 -- RomCenter/Dat.cs | 20 -- RomCenter/Emulator.cs | 12 - RomCenter/Games.cs | 8 - RomCenter/MetadataFile.cs | 20 -- RomCenter/Rom.cs | 40 --- SFFS/FileEntry.cs | 4 - SFFS/FileHeader.cs | 4 - SFFS/StarForceFileSystem.cs | 12 - SGA/DirectoryHeader.cs | 16 - SGA/File.cs | 8 - SGA/File4.cs | 4 - SGA/FileHeader.cs | 4 - SGA/Folder.cs | 20 -- SGA/Header.cs | 4 - SGA/Header4.cs | 12 - SGA/Header6.cs | 4 - SGA/Section.cs | 28 -- SGA/SpecializedDirectory.cs | 24 -- SeparatedValue/MetadataFile.cs | 8 - SeparatedValue/Row.cs | 72 ---- SoftwareList/DataArea.cs | 32 +- SoftwareList/DipSwitch.cs | 24 -- SoftwareList/DipValue.cs | 20 -- SoftwareList/Disk.cs | 28 -- SoftwareList/DiskArea.cs | 16 - SoftwareList/Feature.cs | 16 - SoftwareList/Info.cs | 16 - SoftwareList/Part.cs | 32 -- SoftwareList/Rom.cs | 44 --- SoftwareList/SharedFeat.cs | 16 - SoftwareList/Software.cs | 48 --- SoftwareList/SoftwareList.cs | 24 -- TAR/Archive.cs | 4 - TAR/Header.cs | 36 -- VBSP/File.cs | 4 - VBSP/Header.cs | 8 - VBSP/Lump.cs | 4 - VPK/ArchiveHash.cs | 4 - VPK/DirectoryItem.cs | 20 -- VPK/File.cs | 16 - WAD/File.cs | 12 - WAD/Header.cs | 4 - WAD/Lump.cs | 4 - WAD/LumpInfo.cs | 12 - XZP/DirectoryItem.cs | 4 - XZP/File.cs | 24 -- XZP/Footer.cs | 4 - XZP/Header.cs | 4 - Xbox/XMID.cs | 12 - Xbox/XeMID.cs | 24 -- 368 files changed, 5 insertions(+), 7413 deletions(-) diff --git a/AACS/CopyrightRecord.cs b/AACS/CopyrightRecord.cs index 5a3523e..221a4d8 100644 --- a/AACS/CopyrightRecord.cs +++ b/AACS/CopyrightRecord.cs @@ -8,10 +8,6 @@ namespace SabreTools.Models.AACS /// /// Null-terminated ASCII string representing the copyright /// -#if NET48 - public string Copyright { get; set; } -#else public string? Copyright { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/DriveRevocationListEntry.cs b/AACS/DriveRevocationListEntry.cs index d12fd8d..0db9d7e 100644 --- a/AACS/DriveRevocationListEntry.cs +++ b/AACS/DriveRevocationListEntry.cs @@ -16,10 +16,6 @@ namespace SabreTools.Models.AACS /// (or the first in a range of Licensed Drives being revoked, in the /// case of a non-zero Range value). /// -#if NET48 - public byte[] DriveID { get; set; } -#else public byte[]? DriveID { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/DriveRevocationListRecord.cs b/AACS/DriveRevocationListRecord.cs index 3601f67..29cef06 100644 --- a/AACS/DriveRevocationListRecord.cs +++ b/AACS/DriveRevocationListRecord.cs @@ -21,10 +21,6 @@ namespace SabreTools.Models.AACS /// /// Revocation list entries /// -#if NET48 - public DriveRevocationSignatureBlock[] SignatureBlocks { get; set; } -#else public DriveRevocationSignatureBlock?[]? SignatureBlocks { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/DriveRevocationSignatureBlock.cs b/AACS/DriveRevocationSignatureBlock.cs index 8da5925..5ad379d 100644 --- a/AACS/DriveRevocationSignatureBlock.cs +++ b/AACS/DriveRevocationSignatureBlock.cs @@ -12,10 +12,6 @@ namespace SabreTools.Models.AACS /// A list of 8-byte Host Drive List Entry fields, the length of this /// list being equal to the number in the signature block. /// -#if NET48 - public DriveRevocationListEntry[] EntryFields { get; set; } -#else public DriveRevocationListEntry?[]? EntryFields { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/EndOfMediaKeyBlockRecord.cs b/AACS/EndOfMediaKeyBlockRecord.cs index 3f92bea..d88af23 100644 --- a/AACS/EndOfMediaKeyBlockRecord.cs +++ b/AACS/EndOfMediaKeyBlockRecord.cs @@ -18,10 +18,6 @@ namespace SabreTools.Models.AACS /// determines that the signature does not verify or is omitted, it /// must refuse to use the Media Key. /// -#if NET48 - public byte[] SignatureData { get; set; } -#else public byte[]? SignatureData { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/ExplicitSubsetDifferenceRecord.cs b/AACS/ExplicitSubsetDifferenceRecord.cs index 9c388b3..c70b6d6 100644 --- a/AACS/ExplicitSubsetDifferenceRecord.cs +++ b/AACS/ExplicitSubsetDifferenceRecord.cs @@ -6,10 +6,6 @@ namespace SabreTools.Models.AACS /// /// In this record, each subset-difference is encoded with 5 bytes. /// -#if NET48 - public SubsetDifference[] SubsetDifferences { get; set; } -#else public SubsetDifference?[]? SubsetDifferences { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/HostRevocationListEntry.cs b/AACS/HostRevocationListEntry.cs index c91ac31..0fb1812 100644 --- a/AACS/HostRevocationListEntry.cs +++ b/AACS/HostRevocationListEntry.cs @@ -16,10 +16,6 @@ namespace SabreTools.Models.AACS /// first in a range of hosts being revoked, in the case of a non-zero /// Range value). /// -#if NET48 - public byte[] HostID { get; set; } -#else public byte[]? HostID { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/HostRevocationListRecord.cs b/AACS/HostRevocationListRecord.cs index 40fe7fc..8900839 100644 --- a/AACS/HostRevocationListRecord.cs +++ b/AACS/HostRevocationListRecord.cs @@ -24,10 +24,6 @@ namespace SabreTools.Models.AACS /// /// Revocation list entries /// -#if NET48 - public HostRevocationSignatureBlock[] SignatureBlocks { get; set; } -#else public HostRevocationSignatureBlock?[]? SignatureBlocks { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/HostRevocationSignatureBlock.cs b/AACS/HostRevocationSignatureBlock.cs index da70d63..ae0ed45 100644 --- a/AACS/HostRevocationSignatureBlock.cs +++ b/AACS/HostRevocationSignatureBlock.cs @@ -12,10 +12,6 @@ namespace SabreTools.Models.AACS /// A list of 8-byte Host Revocation List Entry fields, the length of this /// list being equal to the number in the signature block. /// -#if NET48 - public HostRevocationListEntry[] EntryFields { get; set; } -#else public HostRevocationListEntry?[]? EntryFields { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/MediaKeyBlock.cs b/AACS/MediaKeyBlock.cs index d9e0878..ae99bed 100644 --- a/AACS/MediaKeyBlock.cs +++ b/AACS/MediaKeyBlock.cs @@ -9,10 +9,6 @@ namespace SabreTools.Models.AACS /// /// Records /// -#if NET48 - public Record[] Records { get; set; } -#else public Record?[]? Records { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/MediaKeyDataRecord.cs b/AACS/MediaKeyDataRecord.cs index b5ef0b4..985190b 100644 --- a/AACS/MediaKeyDataRecord.cs +++ b/AACS/MediaKeyDataRecord.cs @@ -13,10 +13,6 @@ namespace SabreTools.Models.AACS /// record. This 16 bytes is the ciphertext value C in the media /// key calculation. /// -#if NET48 - public byte[][] MediaKeyData { get; set; } -#else public byte[][]? MediaKeyData { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/SubsetDifferenceIndexRecord.cs b/AACS/SubsetDifferenceIndexRecord.cs index 79a3751..231a057 100644 --- a/AACS/SubsetDifferenceIndexRecord.cs +++ b/AACS/SubsetDifferenceIndexRecord.cs @@ -21,10 +21,6 @@ namespace SabreTools.Models.AACS /// Subset-Difference record, with 0 being the start of the record. /// // UInt24 not UInt32 -#if NET48 - public uint[] Offsets { get; set; } -#else public uint[]? Offsets { get; set; } -#endif } } \ No newline at end of file diff --git a/AACS/VerifyMediaKeyRecord.cs b/AACS/VerifyMediaKeyRecord.cs index 6b0f2d9..1f23078 100644 --- a/AACS/VerifyMediaKeyRecord.cs +++ b/AACS/VerifyMediaKeyRecord.cs @@ -19,10 +19,6 @@ namespace SabreTools.Models.AACS /// where 0xXXXXXXXXXXXXXXXX is an arbitrary 8-byte value, and Km is /// the correct final Media Key value. /// -#if NET48 - public byte[] CiphertextValue { get; set; } -#else public byte[]? CiphertextValue { get; set; } -#endif } } \ No newline at end of file diff --git a/ArchiveDotOrg/File.cs b/ArchiveDotOrg/File.cs index 1d47dd5..465dd9c 100644 --- a/ArchiveDotOrg/File.cs +++ b/ArchiveDotOrg/File.cs @@ -7,438 +7,198 @@ namespace SabreTools.Models.ArchiveDotOrg public class File { [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// Is this a set of defined values? [XmlAttribute("source")] -#if NET48 - public string Source { get; set; } -#else public string? Source { get; set; } -#endif [XmlElement("btih")] -#if NET48 - public string BitTorrentMagnetHash { get; set; } -#else public string? BitTorrentMagnetHash { get; set; } -#endif [XmlElement("mtime")] -#if NET48 - public string LastModifiedTime { get; set; } -#else public string? LastModifiedTime { get; set; } -#endif [XmlElement("size")] -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif [XmlElement("md5")] -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif [XmlElement("crc32")] -#if NET48 - public string CRC32 { get; set; } -#else public string? CRC32 { get; set; } -#endif [XmlElement("sha1")] -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif [XmlElement("filecount")] -#if NET48 - public string FileCount { get; set; } -#else public string? FileCount { get; set; } -#endif /// Is this a set of defined values? [XmlElement("format")] -#if NET48 - public string Format { get; set; } -#else public string? Format { get; set; } -#endif [XmlElement("original")] -#if NET48 - public string Original { get; set; } -#else public string? Original { get; set; } -#endif /// Is this a set of defined values? [XmlElement("summation")] -#if NET48 - public string Summation { get; set; } -#else public string? Summation { get; set; } -#endif [XmlElement("matrix_number")] -#if NET48 - public string MatrixNumber { get; set; } -#else public string? MatrixNumber { get; set; } -#endif [XmlElement("collection-catalog-number")] -#if NET48 - public string CollectionCatalogNumber { get; set; } -#else public string? CollectionCatalogNumber { get; set; } -#endif [XmlElement("publisher")] -#if NET48 - public string Publisher { get; set; } -#else public string? Publisher { get; set; } -#endif [XmlElement("comment")] -#if NET48 - public string Comment { get; set; } -#else public string? Comment { get; set; } -#endif #region ASR-Related [XmlElement("asr_detected_lang")] -#if NET48 - public string ASRDetectedLang { get; set; } -#else public string? ASRDetectedLang { get; set; } -#endif [XmlElement("asr_detected_lang_conf")] -#if NET48 - public string ASRDetectedLangConf { get; set; } -#else public string? ASRDetectedLangConf { get; set; } -#endif [XmlElement("asr_transcribed_lang")] -#if NET48 - public string ASRTranscribedLang { get; set; } -#else public string? ASRTranscribedLang { get; set; } -#endif [XmlElement("whisper_asr_module_version")] -#if NET48 - public string WhisperASRModuleVersion { get; set; } -#else public string? WhisperASRModuleVersion { get; set; } -#endif [XmlElement("whisper_model_hash")] -#if NET48 - public string WhisperModelHash { get; set; } -#else public string? WhisperModelHash { get; set; } -#endif [XmlElement("whisper_model_name")] -#if NET48 - public string WhisperModelName { get; set; } -#else public string? WhisperModelName { get; set; } -#endif [XmlElement("whisper_version")] -#if NET48 - public string WhisperVersion { get; set; } -#else public string? WhisperVersion { get; set; } -#endif #endregion #region OCR-Related [XmlElement("cloth_cover_detection_module_version")] -#if NET48 - public string ClothCoverDetectionModuleVersion { get; set; } -#else public string? ClothCoverDetectionModuleVersion { get; set; } -#endif [XmlElement("hocr_char_to_word_hocr_version")] -#if NET48 - public string hOCRCharToWordhOCRVersion { get; set; } -#else public string? hOCRCharToWordhOCRVersion { get; set; } -#endif [XmlElement("hocr_char_to_word_module_version")] -#if NET48 - public string hOCRCharToWordModuleVersion { get; set; } -#else public string? hOCRCharToWordModuleVersion { get; set; } -#endif [XmlElement("hocr_fts_text_hocr_version")] -#if NET48 - public string hOCRFtsTexthOCRVersion { get; set; } -#else public string? hOCRFtsTexthOCRVersion { get; set; } -#endif [XmlElement("hocr_fts_text_module_version")] -#if NET48 - public string hOCRFtsTextModuleVersion { get; set; } -#else public string? hOCRFtsTextModuleVersion { get; set; } -#endif [XmlElement("hocr_pageindex_hocr_version")] -#if NET48 - public string hOCRPageIndexhOCRVersion { get; set; } -#else public string? hOCRPageIndexhOCRVersion { get; set; } -#endif [XmlElement("hocr_pageindex_module_version")] -#if NET48 - public string hOCRPageIndexModuleVersion { get; set; } -#else public string? hOCRPageIndexModuleVersion { get; set; } -#endif [XmlElement("ocr")] -#if NET48 - public string TesseractOCR { get; set; } -#else public string? TesseractOCR { get; set; } -#endif [XmlElement("ocr_converted")] -#if NET48 - public string TesseractOCRConverted { get; set; } -#else public string? TesseractOCRConverted { get; set; } -#endif [XmlElement("ocr_detected_lang")] -#if NET48 - public string TesseractOCRDetectedLang { get; set; } -#else public string? TesseractOCRDetectedLang { get; set; } -#endif [XmlElement("ocr_detected_lang_conf")] -#if NET48 - public string TesseractOCRDetectedLangConf { get; set; } -#else public string? TesseractOCRDetectedLangConf { get; set; } -#endif [XmlElement("ocr_detected_script")] -#if NET48 - public string TesseractOCRDetectedScript { get; set; } -#else public string? TesseractOCRDetectedScript { get; set; } -#endif [XmlElement("ocr_detected_script_conf")] -#if NET48 - public string TesseractOCRDetectedScriptConf { get; set; } -#else public string? TesseractOCRDetectedScriptConf { get; set; } -#endif [XmlElement("ocr_module_version")] -#if NET48 - public string TesseractOCRModuleVersion { get; set; } -#else public string? TesseractOCRModuleVersion { get; set; } -#endif [XmlElement("ocr_parameters")] -#if NET48 - public string TesseractOCRParameters { get; set; } -#else public string? TesseractOCRParameters { get; set; } -#endif [XmlElement("pdf_module_version")] -#if NET48 - public string PDFModuleVersion { get; set; } -#else public string? PDFModuleVersion { get; set; } -#endif [XmlElement("word_conf_0_10")] -#if NET48 - public string WordConfidenceInterval0To10 { get; set; } -#else public string? WordConfidenceInterval0To10 { get; set; } -#endif [XmlElement("word_conf_11_20")] -#if NET48 - public string WordConfidenceInterval11To20 { get; set; } -#else public string? WordConfidenceInterval11To20 { get; set; } -#endif [XmlElement("word_conf_21_30")] -#if NET48 - public string WordConfidenceInterval21To30 { get; set; } -#else public string? WordConfidenceInterval21To30 { get; set; } -#endif [XmlElement("word_conf_31_40")] -#if NET48 - public string WordConfidenceInterval31To40 { get; set; } -#else public string? WordConfidenceInterval31To40 { get; set; } -#endif [XmlElement("word_conf_41_50")] -#if NET48 - public string WordConfidenceInterval41To50 { get; set; } -#else public string? WordConfidenceInterval41To50 { get; set; } -#endif [XmlElement("word_conf_51_60")] -#if NET48 - public string WordConfidenceInterval51To60 { get; set; } -#else public string? WordConfidenceInterval51To60 { get; set; } -#endif [XmlElement("word_conf_61_70")] -#if NET48 - public string WordConfidenceInterval61To70 { get; set; } -#else public string? WordConfidenceInterval61To70 { get; set; } -#endif [XmlElement("word_conf_71_80")] -#if NET48 - public string WordConfidenceInterval71To80 { get; set; } -#else public string? WordConfidenceInterval71To80 { get; set; } -#endif [XmlElement("word_conf_81_90")] -#if NET48 - public string WordConfidenceInterval81To90 { get; set; } -#else public string? WordConfidenceInterval81To90 { get; set; } -#endif [XmlElement("word_conf_91_100")] -#if NET48 - public string WordConfidenceInterval91To100 { get; set; } -#else public string? WordConfidenceInterval91To100 { get; set; } -#endif #endregion #region Media-Related [XmlElement("album")] -#if NET48 - public string Album { get; set; } -#else public string? Album { get; set; } -#endif [XmlElement("artist")] -#if NET48 - public string Artist { get; set; } -#else public string? Artist { get; set; } -#endif [XmlElement("bitrate")] -#if NET48 - public string Bitrate { get; set; } -#else public string? Bitrate { get; set; } -#endif [XmlElement("creator")] -#if NET48 - public string Creator { get; set; } -#else public string? Creator { get; set; } -#endif [XmlElement("height")] -#if NET48 - public string Height { get; set; } -#else public string? Height { get; set; } -#endif [XmlElement("length")] -#if NET48 - public string Length { get; set; } -#else public string? Length { get; set; } -#endif [XmlElement("preview-image")] -#if NET48 - public string PreviewImage { get; set; } -#else public string? PreviewImage { get; set; } -#endif /// Is this a set of defined values? [XmlElement("rotation")] -#if NET48 - public string Rotation { get; set; } -#else public string? Rotation { get; set; } -#endif [XmlElement("title")] -#if NET48 - public string Title { get; set; } -#else public string? Title { get; set; } -#endif [XmlElement("track")] -#if NET48 - public string Track { get; set; } -#else public string? Track { get; set; } -#endif [XmlElement("width")] -#if NET48 - public string Width { get; set; } -#else public string? Width { get; set; } -#endif #endregion @@ -446,19 +206,11 @@ namespace SabreTools.Models.ArchiveDotOrg /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ArchiveDotOrg/Files.cs b/ArchiveDotOrg/Files.cs index 2639a43..c526b2d 100644 --- a/ArchiveDotOrg/Files.cs +++ b/ArchiveDotOrg/Files.cs @@ -7,29 +7,17 @@ namespace SabreTools.Models.ArchiveDotOrg public class Files { [XmlElement("file")] -#if NET48 - public File[] File { get; set; } -#else public File?[]? File { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/AttractMode/MetadataFile.cs b/AttractMode/MetadataFile.cs index 429d011..5baf76f 100644 --- a/AttractMode/MetadataFile.cs +++ b/AttractMode/MetadataFile.cs @@ -6,16 +6,8 @@ namespace SabreTools.Models.AttractMode public class MetadataFile { [Required] -#if NET48 - public string[] Header { get; set; } -#else public string[]? Header { get; set; } -#endif -#if NET48 - public Row[] Row { get; set; } -#else public Row?[]? Row { get; set; } -#endif } } \ No newline at end of file diff --git a/AttractMode/Row.cs b/AttractMode/Row.cs index 95ceaa2..17fc57f 100644 --- a/AttractMode/Row.cs +++ b/AttractMode/Row.cs @@ -4,146 +4,54 @@ namespace SabreTools.Models.AttractMode { /// Also called Romname [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif -#if NET48 - public string Title { get; set; } -#else public string? Title { get; set; } -#endif -#if NET48 - public string Emulator { get; set; } -#else public string? Emulator { get; set; } -#endif -#if NET48 - public string CloneOf { get; set; } -#else public string? CloneOf { get; set; } -#endif -#if NET48 - public string Year { get; set; } -#else public string? Year { get; set; } -#endif -#if NET48 - public string Manufacturer { get; set; } -#else public string? Manufacturer { get; set; } -#endif -#if NET48 - public string Category { get; set; } -#else public string? Category { get; set; } -#endif -#if NET48 - public string Players { get; set; } -#else public string? Players { get; set; } -#endif -#if NET48 - public string Rotation { get; set; } -#else public string? Rotation { get; set; } -#endif -#if NET48 - public string Control { get; set; } -#else public string? Control { get; set; } -#endif -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif -#if NET48 - public string DisplayCount { get; set; } -#else public string? DisplayCount { get; set; } -#endif -#if NET48 - public string DisplayType { get; set; } -#else public string? DisplayType { get; set; } -#endif -#if NET48 - public string AltRomname { get; set; } -#else public string? AltRomname { get; set; } -#endif -#if NET48 - public string AltTitle { get; set; } -#else public string? AltTitle { get; set; } -#endif -#if NET48 - public string Extra { get; set; } -#else public string? Extra { get; set; } -#endif -#if NET48 - public string Buttons { get; set; } -#else public string? Buttons { get; set; } -#endif -#if NET48 - public string Favorite { get; set; } -#else public string? Favorite { get; set; } -#endif -#if NET48 - public string Tags { get; set; } -#else public string? Tags { get; set; } -#endif -#if NET48 - public string PlayedCount { get; set; } -#else public string? PlayedCount { get; set; } -#endif -#if NET48 - public string PlayedTime { get; set; } -#else public string? PlayedTime { get; set; } -#endif -#if NET48 - public string FileIsAvailable { get; set; } -#else public string? FileIsAvailable { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/BDPlus/SVM.cs b/BDPlus/SVM.cs index f0206a6..00f8b8e 100644 --- a/BDPlus/SVM.cs +++ b/BDPlus/SVM.cs @@ -6,20 +6,12 @@ namespace SabreTools.Models.BDPlus /// /// "BDSVM_CC" /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// 5 bytes of unknown data /// -#if NET48 - public byte[] Unknown1 { get; set; } -#else public byte[]? Unknown1 { get; set; } -#endif /// /// Version year @@ -39,11 +31,7 @@ namespace SabreTools.Models.BDPlus /// /// 4 bytes of unknown data /// -#if NET48 - public byte[] Unknown2 { get; set; } -#else public byte[]? Unknown2 { get; set; } -#endif /// /// Length @@ -53,10 +41,6 @@ namespace SabreTools.Models.BDPlus /// /// Length bytes of data /// -#if NET48 - public byte[] Data { get; set; } -#else public byte[]? Data { get; set; } -#endif } } \ No newline at end of file diff --git a/BFPK/Archive.cs b/BFPK/Archive.cs index dd514be..f047d9e 100644 --- a/BFPK/Archive.cs +++ b/BFPK/Archive.cs @@ -9,19 +9,11 @@ /// /// Header /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Files /// -#if NET48 - public FileEntry[] Files { get; set; } -#else public FileEntry?[]? Files { get; set; } -#endif } } diff --git a/BFPK/FileEntry.cs b/BFPK/FileEntry.cs index 781abe8..e9b3611 100644 --- a/BFPK/FileEntry.cs +++ b/BFPK/FileEntry.cs @@ -14,11 +14,7 @@ /// /// Name /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Uncompressed size diff --git a/BFPK/Header.cs b/BFPK/Header.cs index ad13ad9..3c792ff 100644 --- a/BFPK/Header.cs +++ b/BFPK/Header.cs @@ -9,11 +9,7 @@ /// /// "BFPK" /// -#if NET48 - public string Magic { get; set; } -#else public string? Magic { get; set; } -#endif /// /// Version diff --git a/BSP/File.cs b/BSP/File.cs index 775e579..d448759 100644 --- a/BSP/File.cs +++ b/BSP/File.cs @@ -9,37 +9,21 @@ namespace SabreTools.Models.BSP /// /// Header data /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Lumps /// -#if NET48 - public Lump[] Lumps { get; set; } -#else public Lump?[]? Lumps { get; set; } -#endif /// /// Texture header data /// -#if NET48 - public TextureHeader TextureHeader { get; set; } -#else public TextureHeader? TextureHeader { get; set; } -#endif /// /// Textures /// -#if NET48 - public Texture[] Textures { get; set; } -#else public Texture?[]? Textures { get; set; } -#endif } } \ No newline at end of file diff --git a/BSP/Texture.cs b/BSP/Texture.cs index c32b65c..abb2c89 100644 --- a/BSP/Texture.cs +++ b/BSP/Texture.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.BSP /// /// Name /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Width @@ -25,20 +21,12 @@ namespace SabreTools.Models.BSP /// /// Offsets /// -#if NET48 - public uint[] Offsets { get; set; } -#else public uint[]? Offsets { get; set; } -#endif /// /// Texture data /// -#if NET48 - public byte[] TextureData { get; set; } -#else public byte[]? TextureData { get; set; } -#endif /// /// Palette size @@ -48,10 +36,6 @@ namespace SabreTools.Models.BSP /// /// Palette data /// -#if NET48 - public byte[] PaletteData { get; set; } -#else public byte[]? PaletteData { get; set; } -#endif } } \ No newline at end of file diff --git a/BSP/TextureHeader.cs b/BSP/TextureHeader.cs index 2537e3c..d779568 100644 --- a/BSP/TextureHeader.cs +++ b/BSP/TextureHeader.cs @@ -11,10 +11,6 @@ namespace SabreTools.Models.BSP /// /// Offsets /// -#if NET48 - public uint[] Offsets { get; set; } -#else public uint[]? Offsets { get; set; } -#endif } } \ No newline at end of file diff --git a/CFB/Binary.cs b/CFB/Binary.cs index b214cce..1aad482 100644 --- a/CFB/Binary.cs +++ b/CFB/Binary.cs @@ -12,11 +12,7 @@ namespace SabreTools.Models.CFB /// /// Compound file header /// -#if NET48 - public FileHeader Header { get; set; } -#else public FileHeader? Header { get; set; } -#endif /// /// The FAT is the main allocator for space within a compound file. @@ -29,11 +25,7 @@ namespace SabreTools.Models.CFB /// /// If Header Major Version is 4, there MUST be 1,024 fields specified to fill a 4,096-byte sector /// -#if NET48 - public SectorNumber[] FATSectorNumbers { get; set; } -#else public SectorNumber?[]? FATSectorNumbers { get; set; } -#endif /// /// The mini FAT is used to allocate space in the mini stream. @@ -46,11 +38,7 @@ namespace SabreTools.Models.CFB /// /// If Header Major Version is 4, there MUST be 1,024 fields specified to fill a 4,096-byte sector /// -#if NET48 - public SectorNumber[] MiniFATSectorNumbers { get; set; } -#else public SectorNumber?[]? MiniFATSectorNumbers { get; set; } -#endif /// /// The DIFAT array is used to represent storage of the FAT sectors. @@ -67,11 +55,7 @@ namespace SabreTools.Models.CFB /// If Header Major Version is 4, there MUST be 1,023 fields specified /// to fill a 4,096-byte sector minus the "Next DIFAT Sector Location" field. /// -#if NET48 - public SectorNumber[] DIFATSectorNumbers { get; set; } -#else public SectorNumber?[]? DIFATSectorNumbers { get; set; } -#endif /// /// The directory entry array is an array of directory entries that @@ -103,10 +87,6 @@ namespace SabreTools.Models.CFB /// all zeroes. The Modified Time field in the root storage directory /// entry MAY be all zeroes. /// -#if NET48 - public DirectoryEntry[] DirectoryEntries { get; set; } -#else public DirectoryEntry?[]? DirectoryEntries { get; set; } -#endif } } \ No newline at end of file diff --git a/CFB/DirectoryEntry.cs b/CFB/DirectoryEntry.cs index 03c79f7..9082465 100644 --- a/CFB/DirectoryEntry.cs +++ b/CFB/DirectoryEntry.cs @@ -16,11 +16,7 @@ namespace SabreTools.Models.CFB /// The following characters are illegal and MUST NOT be part of the /// name: '/', '\', ':', '!'. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// This field MUST be 0x00, 0x01, 0x02, or 0x05, depending on the diff --git a/CFB/FileHeader.cs b/CFB/FileHeader.cs index a4f2b55..632039e 100644 --- a/CFB/FileHeader.cs +++ b/CFB/FileHeader.cs @@ -57,11 +57,7 @@ namespace SabreTools.Models.CFB /// /// This field MUST be set to all zeroes. /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif /// /// This integer field contains the count of the number of directory sectors @@ -126,10 +122,6 @@ namespace SabreTools.Models.CFB /// This array of 32-bit integer fields contains the first 109 FAT sector /// locations of the compound file /// -#if NET48 - public SectorNumber[] DIFAT { get; set; } -#else public SectorNumber?[]? DIFAT { get; set; } -#endif } } \ No newline at end of file diff --git a/CFB/SummaryInformation.cs b/CFB/SummaryInformation.cs index 5b211bc..78ff3f5 100644 --- a/CFB/SummaryInformation.cs +++ b/CFB/SummaryInformation.cs @@ -36,11 +36,7 @@ namespace SabreTools.Models.CFB /// /// 4 bytes of reserved data /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif #endregion @@ -54,11 +50,7 @@ namespace SabreTools.Models.CFB /// /// 16 bytes of unknown data /// -#if NET48 - public byte[] Unknown { get; set; } -#else public byte[]? Unknown { get; set; } -#endif #endregion @@ -83,11 +75,7 @@ namespace SabreTools.Models.CFB /// Properties /// /// Each Variant might be followed by an index and offset value -#if NET48 - public Variant[] Properties { get; set; } -#else public Variant?[]? Properties { get; set; } -#endif #endregion } diff --git a/CFB/Variant.cs b/CFB/Variant.cs index db48d72..9473cbb 100644 --- a/CFB/Variant.cs +++ b/CFB/Variant.cs @@ -40,10 +40,6 @@ namespace SabreTools.Models.CFB /// MUST contain an instance of the type, according to the value /// in the field. /// -#if NET48 - public object Union { get; set; } -#else public object? Union { get; set; } -#endif } } \ No newline at end of file diff --git a/CHD/Header.cs b/CHD/Header.cs index 13b9e0d..630bf0f 100644 --- a/CHD/Header.cs +++ b/CHD/Header.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.CHD /// /// 'MComprHD' /// -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif /// /// Length of header (including tag and length fields) diff --git a/CHD/HeaderV1.cs b/CHD/HeaderV1.cs index 95a7f83..6afaceb 100644 --- a/CHD/HeaderV1.cs +++ b/CHD/HeaderV1.cs @@ -41,19 +41,11 @@ /// /// MD5 checksum of raw data /// -#if NET48 - public byte[] MD5 { get; set; } = new byte[16]; -#else public byte[]? MD5 { get; set; } = new byte[16]; -#endif /// /// MD5 checksum of parent file /// -#if NET48 - public byte[] ParentMD5 { get; set; } = new byte[16]; -#else public byte[]? ParentMD5 { get; set; } = new byte[16]; -#endif } } diff --git a/CHD/HeaderV2.cs b/CHD/HeaderV2.cs index a77e246..aac4134 100644 --- a/CHD/HeaderV2.cs +++ b/CHD/HeaderV2.cs @@ -41,20 +41,12 @@ /// /// MD5 checksum of raw data /// -#if NET48 - public byte[] MD5 { get; set; } = new byte[16]; -#else public byte[]? MD5 { get; set; } = new byte[16]; -#endif /// /// MD5 checksum of parent file /// -#if NET48 - public byte[] ParentMD5 { get; set; } = new byte[16]; -#else public byte[]? ParentMD5 { get; set; } = new byte[16]; -#endif /// /// Number of bytes per sector diff --git a/CHD/HeaderV3.cs b/CHD/HeaderV3.cs index 7292894..92af8f7 100644 --- a/CHD/HeaderV3.cs +++ b/CHD/HeaderV3.cs @@ -31,20 +31,12 @@ /// /// MD5 checksum of raw data /// -#if NET48 - public byte[] MD5 { get; set; } = new byte[16]; -#else public byte[]? MD5 { get; set; } = new byte[16]; -#endif /// /// MD5 checksum of parent file /// -#if NET48 - public byte[] ParentMD5 { get; set; } = new byte[16]; -#else public byte[]? ParentMD5 { get; set; } = new byte[16]; -#endif /// /// Number of bytes per hunk @@ -54,19 +46,11 @@ /// /// SHA1 checksum of raw data /// -#if NET48 - public byte[] SHA1 { get; set; } = new byte[20]; -#else public byte[]? SHA1 { get; set; } = new byte[20]; -#endif /// /// SHA1 checksum of parent file /// -#if NET48 - public byte[] ParentSHA1 { get; set; } = new byte[20]; -#else public byte[]? ParentSHA1 { get; set; } = new byte[20]; -#endif } } diff --git a/CHD/HeaderV4.cs b/CHD/HeaderV4.cs index cf8abf9..75041dc 100644 --- a/CHD/HeaderV4.cs +++ b/CHD/HeaderV4.cs @@ -36,28 +36,16 @@ /// /// Combined raw+meta SHA1 /// -#if NET48 - public byte[] SHA1 { get; set; } = new byte[20]; -#else public byte[]? SHA1 { get; set; } = new byte[20]; -#endif /// /// Combined raw+meta SHA1 of parent /// -#if NET48 - public byte[] ParentSHA1 { get; set; } = new byte[20]; -#else public byte[]? ParentSHA1 { get; set; } = new byte[20]; -#endif /// /// Raw data SHA1 /// -#if NET48 - public byte[] RawSHA1 { get; set; } = new byte[20]; -#else public byte[]? RawSHA1 { get; set; } = new byte[20]; -#endif } } diff --git a/CHD/HeaderV5.cs b/CHD/HeaderV5.cs index 970fa17..2692220 100644 --- a/CHD/HeaderV5.cs +++ b/CHD/HeaderV5.cs @@ -36,28 +36,16 @@ /// /// Raw data SHA1 /// -#if NET48 - public byte[] RawSHA1 { get; set; } -#else public byte[]? RawSHA1 { get; set; } -#endif /// /// Combined raw+meta SHA1 /// -#if NET48 - public byte[] SHA1 { get; set; } -#else public byte[]? SHA1 { get; set; } -#endif /// /// Combined raw+meta SHA1 of parent /// -#if NET48 - public byte[] ParentSHA1 { get; set; } -#else public byte[]? ParentSHA1 { get; set; } -#endif } } diff --git a/Charts/SongIni.cs b/Charts/SongIni.cs index 97e2129..6b2616e 100644 --- a/Charts/SongIni.cs +++ b/Charts/SongIni.cs @@ -12,71 +12,43 @@ namespace SabreTools.Models.Charts /// Title of the song. /// /// name -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Artist(s) or band(s) behind the song. /// /// artist -#if NET48 - public string Artist { get; set; } -#else public string? Artist { get; set; } -#endif /// /// Title of the album the song is featured in. /// /// album -#if NET48 - public string Album { get; set; } -#else public string? Album { get; set; } -#endif /// /// Genre of the song. /// /// genre -#if NET48 - public string Genre { get; set; } -#else public string? Genre { get; set; } -#endif /// /// Sub-genre for the song. /// /// sub_genre -#if NET48 - public string SubGenre { get; set; } -#else public string? SubGenre { get; set; } -#endif /// /// Year of the song’s release. /// /// year -#if NET48 - public string Year { get; set; } -#else public string? Year { get; set; } -#endif /// /// Community member responsible for charting the song. /// /// charter, frets -#if NET48 - public string Charter { get; set; } -#else public string? Charter { get; set; } -#endif /// /// Version number for the song. @@ -118,11 +90,7 @@ namespace SabreTools.Models.Charts /// Flavor text for this song, usually shown after picking the song or during loading. /// /// loading_phrase -#if NET48 - public string LoadingPhrase { get; set; } -#else public string? LoadingPhrase { get; set; } -#endif #endregion @@ -132,53 +100,33 @@ namespace SabreTools.Models.Charts /// (FoFiX) Hex color to use in the song screen for the cassette. /// /// cassettecolor -#if NET48 - public string CassetteColor { get; set; } -#else public string? CassetteColor { get; set; } -#endif /// /// (FoFiX) Miscellaneous tags for the chart. /// Only known valid value is `cover`. /// /// tags -#if NET48 - public string Tags { get; set; } -#else public string? Tags { get; set; } -#endif /// /// (PS) Two timestamps in milliseconds for preview start and end time. /// Example: `55000 85000` /// /// preview -#if NET48 - public long[] Preview { get; set; } -#else public long[]? Preview { get; set; } -#endif /// /// (CH) Playlist that the song should show up in. /// /// playlist -#if NET48 - public string Playlist { get; set; } -#else public string? Playlist { get; set; } -#endif /// /// (CH) Sub-playlist that the song should show up in. /// /// sub_playlist -#if NET48 - public string SubPlaylist { get; set; } -#else public string? SubPlaylist { get; set; } -#endif /// /// (CH) Indicates if this song is a modchart. @@ -350,51 +298,31 @@ namespace SabreTools.Models.Charts /// Specifies a voice type for the singer (either "male" or "female"). /// /// vocal_gender -#if NET48 - public string VocalGender { get; set; } -#else public string? VocalGender { get; set; } -#endif /// /// Specifies a tuning for 17-fret Pro Guitar. /// /// real_guitar_tuning -#if NET48 - public string RealGuitarTuning { get; set; } -#else public string? RealGuitarTuning { get; set; } -#endif /// /// Specifies a tuning for 22-fret Pro Guitar. /// /// real_guitar_22_tuning -#if NET48 - public string RealGuitar22Tuning { get; set; } -#else public string? RealGuitar22Tuning { get; set; } -#endif /// /// Specifies a tuning for 17-fret Pro Bass. /// /// real_bass_tuning -#if NET48 - public string RealBassTuning { get; set; } -#else public string? RealBassTuning { get; set; } -#endif /// /// Specifies a tuning for 22-fret Pro Bass. /// /// real_bass_22_tuning -#if NET48 - public string RealBass22Tuning { get; set; } -#else public string? RealBass22Tuning { get; set; } -#endif /// /// Specifies the number of lanes for the right hand in Real Keys. @@ -479,11 +407,7 @@ namespace SabreTools.Models.Charts /// Valid values are "none", "half", or "full". /// /// early_hit_window_size -#if NET48 - public string EarlyHitWindowSize { get; set; } -#else public string? EarlyHitWindowSize { get; set; } -#endif /// /// (CH) Sets whether or not end events in the chart will be respected. @@ -560,31 +484,19 @@ namespace SabreTools.Models.Charts /// Included in either the chart folder or the game the chart was made for, or sourced from this repository of icons. /// /// icon -#if NET48 - public string Icon { get; set; } -#else public string? Icon { get; set; } -#endif /// /// Name for a background image file. /// /// background -#if NET48 - public string Background { get; set; } -#else public string? Background { get; set; } -#endif /// /// Name for a background video file. /// /// video -#if NET48 - public string Video { get; set; } -#else public string? Video { get; set; } -#endif /// /// Name for a background video file. @@ -610,11 +522,7 @@ namespace SabreTools.Models.Charts /// Name for a cover image file. /// /// cover -#if NET48 - public string Cover { get; set; } -#else public string? Cover { get; set; } -#endif #endregion @@ -624,41 +532,25 @@ namespace SabreTools.Models.Charts /// (PS) Name for banner A. /// /// link_name_a -#if NET48 - public string LinkNameA { get; set; } -#else public string? LinkNameA { get; set; } -#endif /// /// (PS) Name for banner B. /// /// link_name_b -#if NET48 - public string LinkNameB { get; set; } -#else public string? LinkNameB { get; set; } -#endif /// /// (PS) Link that clicking banner A will open. /// /// banner_link_a -#if NET48 - public string BannerLinkA { get; set; } -#else public string? BannerLinkA { get; set; } -#endif /// /// (PS) Link that clicking banner B will open. /// /// banner_link_b -#if NET48 - public string BannerLinkB { get; set; } -#else public string? BannerLinkB { get; set; } -#endif #endregion @@ -668,21 +560,13 @@ namespace SabreTools.Models.Charts /// (FoFiX) High score data. /// /// scores -#if NET48 - public string Scores { get; set; } -#else public string? Scores { get; set; } -#endif /// /// (FoFiX) Additional score data. /// /// scores_ext -#if NET48 - public string ScoresExt { get; set; } -#else public string? ScoresExt { get; set; } -#endif /// /// (FoFiX) Play count. @@ -700,31 +584,19 @@ namespace SabreTools.Models.Charts /// (FoFiX) Career ID for this song. /// /// unlock_id -#if NET48 - public string UnlockId { get; set; } -#else public string? UnlockId { get; set; } -#endif /// /// (FoFiX) The career ID that must be completed to unlock this song. /// /// unlock_require -#if NET48 - public string UnlockRequire { get; set; } -#else public string? UnlockRequire { get; set; } -#endif /// /// (FoFiX) Text to display if the song is locked. /// /// unlock_text -#if NET48 - public string UnlockText { get; set; } -#else public string? UnlockText { get; set; } -#endif /// /// (FoFiX) Indicates if the song is unlocked. diff --git a/Charts/TitlesIni.cs b/Charts/TitlesIni.cs index f12c77d..3ce159d 100644 --- a/Charts/TitlesIni.cs +++ b/Charts/TitlesIni.cs @@ -10,20 +10,12 @@ namespace SabreTools.Models.Charts /// A space-separated list of .ini sections to include in the career. /// /// sections -#if NET48 - public string[] SectionList { get; set; } -#else public string[]? SectionList { get; set; } -#endif /// /// `name` - Display name of the tier. /// `unlock_id` - Name used for associating a song with this tier, and for checking unlock requirements. /// -#if NET48 - public Dictionary Sections { get; set; } -#else public Dictionary? Sections { get; set; } -#endif } } \ No newline at end of file diff --git a/ClrMamePro/Archive.cs b/ClrMamePro/Archive.cs index 15017bb..2cd0379 100644 --- a/ClrMamePro/Archive.cs +++ b/ClrMamePro/Archive.cs @@ -5,20 +5,12 @@ namespace SabreTools.Models.ClrMamePro { /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/BiosSet.cs b/ClrMamePro/BiosSet.cs index 637bb96..5432669 100644 --- a/ClrMamePro/BiosSet.cs +++ b/ClrMamePro/BiosSet.cs @@ -5,35 +5,19 @@ namespace SabreTools.Models.ClrMamePro { /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// description [Required] -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif /// default -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/Chip.cs b/ClrMamePro/Chip.cs index 60a9205..d542d56 100644 --- a/ClrMamePro/Chip.cs +++ b/ClrMamePro/Chip.cs @@ -5,42 +5,22 @@ namespace SabreTools.Models.ClrMamePro { /// type, (cpu|audio) [Required] -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// flags -#if NET48 - public string Flags { get; set; } -#else public string? Flags { get; set; } -#endif /// clock, Numeric? -#if NET48 - public string Clock { get; set; } -#else public string? Clock { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/ClrMamePro.cs b/ClrMamePro/ClrMamePro.cs index aac017c..54800a5 100644 --- a/ClrMamePro/ClrMamePro.cs +++ b/ClrMamePro/ClrMamePro.cs @@ -4,118 +4,54 @@ namespace SabreTools.Models.ClrMamePro public class ClrMamePro { /// name -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// description -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif /// rootdir -#if NET48 - public string RootDir { get; set; } -#else public string? RootDir { get; set; } -#endif /// category -#if NET48 - public string Category { get; set; } -#else public string? Category { get; set; } -#endif /// version -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif /// date -#if NET48 - public string Date { get; set; } -#else public string? Date { get; set; } -#endif /// author -#if NET48 - public string Author { get; set; } -#else public string? Author { get; set; } -#endif /// homepage -#if NET48 - public string Homepage { get; set; } -#else public string? Homepage { get; set; } -#endif /// url -#if NET48 - public string Url { get; set; } -#else public string? Url { get; set; } -#endif /// comment -#if NET48 - public string Comment { get; set; } -#else public string? Comment { get; set; } -#endif /// header -#if NET48 - public string Header { get; set; } -#else public string? Header { get; set; } -#endif /// type -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif /// forcemerging -#if NET48 - public string ForceMerging { get; set; } -#else public string? ForceMerging { get; set; } -#endif /// forcezipping -#if NET48 - public string ForceZipping { get; set; } -#else public string? ForceZipping { get; set; } -#endif /// forcepacking -#if NET48 - public string ForcePacking { get; set; } -#else public string? ForcePacking { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/DipSwitch.cs b/ClrMamePro/DipSwitch.cs index 2bf4dba..3870841 100644 --- a/ClrMamePro/DipSwitch.cs +++ b/ClrMamePro/DipSwitch.cs @@ -5,34 +5,18 @@ namespace SabreTools.Models.ClrMamePro { /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// entry -#if NET48 - public string[] Entry { get; set; } -#else public string[]? Entry { get; set; } -#endif /// default, (yes|no) "no" -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/Disk.cs b/ClrMamePro/Disk.cs index e504049..0a84fa3 100644 --- a/ClrMamePro/Disk.cs +++ b/ClrMamePro/Disk.cs @@ -5,55 +5,27 @@ namespace SabreTools.Models.ClrMamePro { /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// md5 -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif /// sha1 -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif /// merge -#if NET48 - public string Merge { get; set; } -#else public string? Merge { get; set; } -#endif /// status -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// flags -#if NET48 - public string Flags { get; set; } -#else public string? Flags { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/Driver.cs b/ClrMamePro/Driver.cs index 5898916..f1656e5 100644 --- a/ClrMamePro/Driver.cs +++ b/ClrMamePro/Driver.cs @@ -5,48 +5,24 @@ namespace SabreTools.Models.ClrMamePro { /// status, (good|imperfect|preliminary) [Required] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// color, (good|imperfect|preliminary) -#if NET48 - public string Color { get; set; } -#else public string? Color { get; set; } -#endif /// sound, (good|imperfect|preliminary) -#if NET48 - public string Sound { get; set; } -#else public string? Sound { get; set; } -#endif /// palettesize, Numeric? -#if NET48 - public string PaletteSize { get; set; } -#else public string? PaletteSize { get; set; } -#endif /// blit, (plain|dirty) -#if NET48 - public string Blit { get; set; } -#else public string? Blit { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/GameBase.cs b/ClrMamePro/GameBase.cs index 182523a..ca23409 100644 --- a/ClrMamePro/GameBase.cs +++ b/ClrMamePro/GameBase.cs @@ -7,168 +7,80 @@ namespace SabreTools.Models.ClrMamePro { /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// description -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif /// year -#if NET48 - public string Year { get; set; } -#else public string? Year { get; set; } -#endif /// manufacturer -#if NET48 - public string Manufacturer { get; set; } -#else public string? Manufacturer { get; set; } -#endif /// category -#if NET48 - public string Category { get; set; } -#else public string? Category { get; set; } -#endif /// cloneof -#if NET48 - public string CloneOf { get; set; } -#else public string? CloneOf { get; set; } -#endif /// romof -#if NET48 - public string RomOf { get; set; } -#else public string? RomOf { get; set; } -#endif /// sampleof -#if NET48 - public string SampleOf { get; set; } -#else public string? SampleOf { get; set; } -#endif /// release -#if NET48 - public Release[] Release { get; set; } -#else public Release[]? Release { get; set; } -#endif /// biosset -#if NET48 - public BiosSet[] BiosSet { get; set; } -#else public BiosSet[]? BiosSet { get; set; } -#endif /// rom -#if NET48 - public Rom[] Rom { get; set; } -#else public Rom[]? Rom { get; set; } -#endif /// disk -#if NET48 - public Disk[] Disk { get; set; } -#else public Disk[]? Disk { get; set; } -#endif /// sample -#if NET48 - public Sample[] Sample { get; set; } -#else public Sample[]? Sample { get; set; } -#endif /// archive -#if NET48 - public Archive[] Archive { get; set; } -#else public Archive[]? Archive { get; set; } -#endif #region Aaru Extensions /// media, Appears after Disk -#if NET48 - public Media[] Media { get; set; } -#else public Media[]? Media { get; set; } -#endif #endregion #region MAME Extensions /// chip, Appears after Archive -#if NET48 - public Chip[] Chip { get; set; } -#else public Chip[]? Chip { get; set; } -#endif /// video, Appears after Chip -#if NET48 - public Video[] Video { get; set; } -#else public Video[]? Video { get; set; } -#endif /// sound, Appears after Video -#if NET48 - public Sound Sound { get; set; } -#else public Sound? Sound { get; set; } -#endif /// input, Appears after Sound -#if NET48 - public Input Input { get; set; } -#else public Input? Input { get; set; } -#endif /// dipswitch, Appears after Input -#if NET48 - public DipSwitch[] DipSwitch { get; set; } -#else public DipSwitch[]? DipSwitch { get; set; } -#endif /// driver, Appears after DipSwitch -#if NET48 - public Driver Driver { get; set; } -#else public Driver? Driver { get; set; } -#endif #endregion #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/Input.cs b/ClrMamePro/Input.cs index 1f2f5be..06da37b 100644 --- a/ClrMamePro/Input.cs +++ b/ClrMamePro/Input.cs @@ -5,56 +5,28 @@ namespace SabreTools.Models.ClrMamePro { /// players, Numeric/remarks> [Required] -#if NET48 - public string Players { get; set; } -#else public string? Players { get; set; } -#endif /// control -#if NET48 - public string Control { get; set; } -#else public string? Control { get; set; } -#endif /// buttons, Numeric [Required] -#if NET48 - public string Buttons { get; set; } -#else public string? Buttons { get; set; } -#endif /// coins, Numeric -#if NET48 - public string Coins { get; set; } -#else public string? Coins { get; set; } -#endif /// tilt, (yes|no) "no" -#if NET48 - public string Tilt { get; set; } -#else public string? Tilt { get; set; } -#endif /// service, (yes|no) "no" -#if NET48 - public string Service { get; set; } -#else public string? Service { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/Media.cs b/ClrMamePro/Media.cs index 8c00e87..25f678a 100644 --- a/ClrMamePro/Media.cs +++ b/ClrMamePro/Media.cs @@ -5,48 +5,24 @@ namespace SabreTools.Models.ClrMamePro { /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// md5 -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif /// sha1 -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif /// sha256 -#if NET48 - public string SHA256 { get; set; } -#else public string? SHA256 { get; set; } -#endif /// spamsum -#if NET48 - public string SpamSum { get; set; } -#else public string? SpamSum { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/MetadataFile.cs b/ClrMamePro/MetadataFile.cs index acdcb6c..c1e8e39 100644 --- a/ClrMamePro/MetadataFile.cs +++ b/ClrMamePro/MetadataFile.cs @@ -3,27 +3,15 @@ namespace SabreTools.Models.ClrMamePro public class MetadataFile { /// clrmamepro -#if NET48 - public ClrMamePro ClrMamePro { get; set; } -#else public ClrMamePro? ClrMamePro { get; set; } -#endif /// game, machine, resource, set -#if NET48 - public GameBase[] Game { get; set; } -#else public GameBase?[]? Game { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/Release.cs b/ClrMamePro/Release.cs index 530455f..1da26ca 100644 --- a/ClrMamePro/Release.cs +++ b/ClrMamePro/Release.cs @@ -5,49 +5,25 @@ namespace SabreTools.Models.ClrMamePro { /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// region [Required] -#if NET48 - public string Region { get; set; } -#else public string? Region { get; set; } -#endif /// language -#if NET48 - public string Language { get; set; } -#else public string? Language { get; set; } -#endif /// date -#if NET48 - public string Date { get; set; } -#else public string? Date { get; set; } -#endif /// default -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/Rom.cs b/ClrMamePro/Rom.cs index 6f9f20a..a98677e 100644 --- a/ClrMamePro/Rom.cs +++ b/ClrMamePro/Rom.cs @@ -5,181 +5,93 @@ namespace SabreTools.Models.ClrMamePro { /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// size, Numeric [Required] -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif /// crc -#if NET48 - public string CRC { get; set; } -#else public string? CRC { get; set; } -#endif /// md5 -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif /// sha1 -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif /// merge -#if NET48 - public string Merge { get; set; } -#else public string? Merge { get; set; } -#endif /// status -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// flags -#if NET48 - public string Flags { get; set; } -#else public string? Flags { get; set; } -#endif /// date -#if NET48 - public string Date { get; set; } -#else public string? Date { get; set; } -#endif #region Hash Extensions /// sha256; Also in No-Intro spec; Appears after SHA1 -#if NET48 - public string SHA256 { get; set; } -#else public string? SHA256 { get; set; } -#endif /// sha384; Appears after SHA256 -#if NET48 - public string SHA384 { get; set; } -#else public string? SHA384 { get; set; } -#endif /// sha512; Appears after SHA384 -#if NET48 - public string SHA512 { get; set; } -#else public string? SHA512 { get; set; } -#endif /// spamsum; Appears after SHA512 -#if NET48 - public string SpamSum { get; set; } -#else public string? SpamSum { get; set; } -#endif #endregion #region DiscImgeCreator Extensions /// xxh3_64; Appears after SpamSum -#if NET48 - public string xxHash364 { get; set; } -#else public string? xxHash364 { get; set; } -#endif /// xxh3_128; Appears after xxHash364 -#if NET48 - public string xxHash3128 { get; set; } -#else public string? xxHash3128 { get; set; } -#endif #endregion #region MAME Extensions /// region; Appears after Status -#if NET48 - public string Region { get; set; } -#else public string? Region { get; set; } -#endif /// offs; Appears after Flags -#if NET48 - public string Offs { get; set; } -#else public string? Offs { get; set; } -#endif #endregion #region No-Intro Extensions /// serial; Appears after Offs -#if NET48 - public string Serial { get; set; } -#else public string? Serial { get; set; } -#endif /// header; Appears after Serial -#if NET48 - public string Header { get; set; } -#else public string? Header { get; set; } -#endif #endregion #region RomVault Extensions /// inverted; Boolean; Appears after Date -#if NET48 - public string Inverted { get; set; } -#else public string? Inverted { get; set; } -#endif /// mia; Boolean; Appears after Inverted -#if NET48 - public string MIA { get; set; } -#else public string? MIA { get; set; } -#endif #endregion #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/RomVault.cs b/ClrMamePro/RomVault.cs index a7ea59e..7975ff4 100644 --- a/ClrMamePro/RomVault.cs +++ b/ClrMamePro/RomVault.cs @@ -4,108 +4,48 @@ namespace SabreTools.Models.ClrMamePro public class RomVault { /// name -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// description -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif /// rootdir -#if NET48 - public string RootDir { get; set; } -#else public string? RootDir { get; set; } -#endif /// category -#if NET48 - public string Category { get; set; } -#else public string? Category { get; set; } -#endif /// version -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif /// date -#if NET48 - public string Date { get; set; } -#else public string? Date { get; set; } -#endif /// author -#if NET48 - public string Author { get; set; } -#else public string? Author { get; set; } -#endif /// homepage -#if NET48 - public string Homepage { get; set; } -#else public string? Homepage { get; set; } -#endif /// url -#if NET48 - public string Url { get; set; } -#else public string? Url { get; set; } -#endif /// comment -#if NET48 - public string Comment { get; set; } -#else public string? Comment { get; set; } -#endif /// header -#if NET48 - public string Header { get; set; } -#else public string? Header { get; set; } -#endif /// type -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif /// forcemerging -#if NET48 - public string ForceMerging { get; set; } -#else public string? ForceMerging { get; set; } -#endif /// forcezipping -#if NET48 - public string ForceZipping { get; set; } -#else public string? ForceZipping { get; set; } -#endif /// forcepacking -#if NET48 - public string ForcePacking { get; set; } -#else public string? ForcePacking { get; set; } -#endif } } \ No newline at end of file diff --git a/ClrMamePro/Sample.cs b/ClrMamePro/Sample.cs index c948b66..ab0b11c 100644 --- a/ClrMamePro/Sample.cs +++ b/ClrMamePro/Sample.cs @@ -5,20 +5,12 @@ namespace SabreTools.Models.ClrMamePro { /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/Sound.cs b/ClrMamePro/Sound.cs index e4f4f9e..bfddee8 100644 --- a/ClrMamePro/Sound.cs +++ b/ClrMamePro/Sound.cs @@ -5,20 +5,12 @@ namespace SabreTools.Models.ClrMamePro { /// channels, Numeric? [Required] -#if NET48 - public string Channels { get; set; } -#else public string? Channels { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/ClrMamePro/Video.cs b/ClrMamePro/Video.cs index 71f2a0b..c7448aa 100644 --- a/ClrMamePro/Video.cs +++ b/ClrMamePro/Video.cs @@ -5,63 +5,31 @@ namespace SabreTools.Models.ClrMamePro { /// screen, (raster|vector) [Required] -#if NET48 - public string Screen { get; set; } -#else public string? Screen { get; set; } -#endif /// orientation, (vertical|horizontal) [Required] -#if NET48 - public string Orientation { get; set; } -#else public string? Orientation { get; set; } -#endif /// x, Numeric? -#if NET48 - public string X { get; set; } -#else public string? X { get; set; } -#endif /// y, Numeric? -#if NET48 - public string Y { get; set; } -#else public string? Y { get; set; } -#endif /// aspectx, Numeric? -#if NET48 - public string AspectX { get; set; } -#else public string? AspectX { get; set; } -#endif /// aspecty, Numeric? -#if NET48 - public string AspectY { get; set; } -#else public string? AspectY { get; set; } -#endif /// freq, Numeric? -#if NET48 - public string Freq { get; set; } -#else public string? Freq { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Compression/LZ/FileHeader.cs b/Compression/LZ/FileHeader.cs index 9ab04d9..3637b56 100644 --- a/Compression/LZ/FileHeader.cs +++ b/Compression/LZ/FileHeader.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.Compression.LZ /// public sealed class FileHeaader { -#if NET48 - public string Magic { get; set; } -#else public string? Magic { get; set; } -#endif public byte CompressionType { get; set; } diff --git a/Compression/LZ/State.cs b/Compression/LZ/State.cs index e2ce599..f24efe9 100644 --- a/Compression/LZ/State.cs +++ b/Compression/LZ/State.cs @@ -7,11 +7,7 @@ namespace SabreTools.Models.Compression.LZ /// /// Internal backing stream /// -#if NET48 - public Stream Source { get; set; } -#else public Stream? Source { get; set; } -#endif /// /// The last char of the filename for replacement @@ -36,11 +32,7 @@ namespace SabreTools.Models.Compression.LZ /// /// The rotating LZ table /// -#if NET48 - public byte[] Table { get; set; } -#else public byte[]? Table { get; set; } -#endif /// /// CURrent TABle ENTry @@ -65,11 +57,7 @@ namespace SabreTools.Models.Compression.LZ /// /// GETLEN bytes /// -#if NET48 - public byte[] Window { get; set; } -#else public byte[]? Window { get; set; } -#endif /// /// Current read diff --git a/Compression/LZX/AlignedOffsetBlockData.cs b/Compression/LZX/AlignedOffsetBlockData.cs index 6279f4f..4f0e193 100644 --- a/Compression/LZX/AlignedOffsetBlockData.cs +++ b/Compression/LZX/AlignedOffsetBlockData.cs @@ -11,80 +11,48 @@ namespace SabreTools.Models.Compression.LZX /// Aligned offset tree /// /// 8 elements, 3 bits each -#if NET48 - public byte[] AlignedOffsetTree { get; set; } -#else public byte[]? AlignedOffsetTree { get; set; } -#endif /// /// Pretree for first 256 elements of main tree /// /// 20 elements, 4 bits each -#if NET48 - public byte[] PretreeFirst256 { get; set; } -#else public byte[]? PretreeFirst256 { get; set; } -#endif /// /// Path lengths of first 256 elements of main tree /// /// Encoded using pretree -#if NET48 - public int[] PathLengthsFirst256 { get; set; } -#else public int[]? PathLengthsFirst256 { get; set; } -#endif /// /// Pretree for remainder of main tree /// /// 20 elements, 4 bits each -#if NET48 - public byte[] PretreeRemainder { get; set; } -#else public byte[]? PretreeRemainder { get; set; } -#endif /// /// Path lengths of remaining elements of main tree /// /// Encoded using pretree -#if NET48 - public int[] PathLengthsRemainder { get; set; } -#else public int[]? PathLengthsRemainder { get; set; } -#endif /// /// Pretree for length tree /// /// 20 elements, 4 bits each -#if NET48 - public byte[] PretreeLengthTree { get; set; } -#else public byte[]? PretreeLengthTree { get; set; } -#endif /// /// Path lengths of elements in length tree /// /// Encoded using pretree -#if NET48 - public int[] PathLengthsLengthTree { get; set; } -#else public int[]? PathLengthsLengthTree { get; set; } -#endif /// /// Token sequence (matches and literals) /// /// Variable -#if NET48 - public byte[] TokenSequence { get; set; } -#else public byte[]? TokenSequence { get; set; } -#endif } } \ No newline at end of file diff --git a/Compression/LZX/Block.cs b/Compression/LZX/Block.cs index f6da385..2bdb7d5 100644 --- a/Compression/LZX/Block.cs +++ b/Compression/LZX/Block.cs @@ -14,19 +14,11 @@ namespace SabreTools.Models.Compression.LZX /// /// Block header /// -#if NET48 - public BlockHeader Header { get; set; } -#else public BlockHeader? Header { get; set; } -#endif /// /// Block data /// -#if NET48 - public BlockData BlockData { get; set; } -#else public BlockData? BlockData { get; set; } -#endif } } \ No newline at end of file diff --git a/Compression/LZX/Chunk.cs b/Compression/LZX/Chunk.cs index bc8e517..dc64180 100644 --- a/Compression/LZX/Chunk.cs +++ b/Compression/LZX/Chunk.cs @@ -15,19 +15,11 @@ namespace SabreTools.Models.Compression.LZX /// /// Chunk header /// -#if NET48 - public ChunkHeader Header { get; set; } -#else public ChunkHeader? Header { get; set; } -#endif /// /// Block headers and data /// -#if NET48 - public Block[] Blocks { get; set; } -#else public Block[]? Blocks { get; set; } -#endif } } \ No newline at end of file diff --git a/Compression/LZX/UncompressedBlockData.cs b/Compression/LZX/UncompressedBlockData.cs index b3fafa5..1a36299 100644 --- a/Compression/LZX/UncompressedBlockData.cs +++ b/Compression/LZX/UncompressedBlockData.cs @@ -44,11 +44,7 @@ namespace SabreTools.Models.Compression.LZX /// Can use the direct memcpy function, as specified in [IEEE1003.1] /// /// Encoded directly in the byte stream, not in the bitstream of byte-swapped 16-bit words -#if NET48 - public byte[] RawDataBytes { get; set; } -#else public byte[]? RawDataBytes { get; set; } -#endif /// /// Only if uncompressed size is odd diff --git a/Compression/LZX/VerbatimBlockData.cs b/Compression/LZX/VerbatimBlockData.cs index e9284e7..82c625e 100644 --- a/Compression/LZX/VerbatimBlockData.cs +++ b/Compression/LZX/VerbatimBlockData.cs @@ -10,70 +10,42 @@ namespace SabreTools.Models.Compression.LZX /// Pretree for first 256 elements of main tree /// /// 20 elements, 4 bits each -#if NET48 - public byte[] PretreeFirst256 { get; set; } -#else public byte[]? PretreeFirst256 { get; set; } -#endif /// /// Path lengths of first 256 elements of main tree /// /// Encoded using pretree -#if NET48 - public int[] PathLengthsFirst256 { get; set; } -#else public int[]? PathLengthsFirst256 { get; set; } -#endif /// /// Pretree for remainder of main tree /// /// 20 elements, 4 bits each -#if NET48 - public byte[] PretreeRemainder { get; set; } -#else public byte[]? PretreeRemainder { get; set; } -#endif /// /// Path lengths of remaining elements of main tree /// /// Encoded using pretree -#if NET48 - public int[] PathLengthsRemainder { get; set; } -#else public int[]? PathLengthsRemainder { get; set; } -#endif /// /// Pretree for length tree /// /// 20 elements, 4 bits each -#if NET48 - public byte[] PretreeLengthTree { get; set; } -#else public byte[]? PretreeLengthTree { get; set; } -#endif /// /// Path lengths of elements in length tree /// /// Encoded using pretree -#if NET48 - public int[] PathLengthsLengthTree { get; set; } -#else public int[]? PathLengthsLengthTree { get; set; } -#endif /// /// Token sequence (matches and literals) /// /// Variable -#if NET48 - public byte[] TokenSequence { get; set; } -#else public byte[]? TokenSequence { get; set; } -#endif } } \ No newline at end of file diff --git a/Compression/MSZIP/Block.cs b/Compression/MSZIP/Block.cs index 50374ae..3b2636c 100644 --- a/Compression/MSZIP/Block.cs +++ b/Compression/MSZIP/Block.cs @@ -23,19 +23,11 @@ namespace SabreTools.Models.Compression.MSZIP /// /// Block header /// -#if NET48 - public BlockHeader BlockHeader { get; set; } -#else public BlockHeader? BlockHeader { get; set; } -#endif /// /// Compressed blocks /// -#if NET48 - public DeflateBlock[] CompressedBlocks { get; set; } -#else public DeflateBlock[]? CompressedBlocks { get; set; } -#endif } } \ No newline at end of file diff --git a/Compression/MSZIP/CompressedBlockHeader.cs b/Compression/MSZIP/CompressedBlockHeader.cs index 9064067..f4ed51f 100644 --- a/Compression/MSZIP/CompressedBlockHeader.cs +++ b/Compression/MSZIP/CompressedBlockHeader.cs @@ -10,19 +10,11 @@ namespace SabreTools.Models.Compression.MSZIP /// /// Huffman code lengths for the literal / length alphabet /// -#if NET48 - public virtual uint[] LiteralLengths { get; set; } -#else public virtual uint[]? LiteralLengths { get; set; } -#endif /// /// Huffman distance codes for the literal / length alphabet /// -#if NET48 - public virtual uint[] DistanceCodes { get; set; } -#else public virtual uint[]? DistanceCodes { get; set; } -#endif } } \ No newline at end of file diff --git a/Compression/MSZIP/DeflateBlock.cs b/Compression/MSZIP/DeflateBlock.cs index f4c9f63..03fbc9b 100644 --- a/Compression/MSZIP/DeflateBlock.cs +++ b/Compression/MSZIP/DeflateBlock.cs @@ -15,20 +15,12 @@ namespace SabreTools.Models.Compression.MSZIP /// /// Deflate block (RFC-1951) header /// -#if NET48 - public DeflateBlockHeader Header { get; set; } -#else public DeflateBlockHeader? Header { get; set; } -#endif /// /// Compression-specific data header /// -#if NET48 - public DataHeader DataHeader { get; set; } -#else public DataHeader? DataHeader { get; set; } -#endif /// /// MSZIP data @@ -38,10 +30,6 @@ namespace SabreTools.Models.Compression.MSZIP /// compressed or uncompressed data. Keep this in mind when using the built /// versions of this model. /// -#if NET48 - public byte[] Data { get; set; } -#else public byte[]? Data { get; set; } -#endif } } \ No newline at end of file diff --git a/Compression/MSZIP/FixedCompressedDataHeader.cs b/Compression/MSZIP/FixedCompressedDataHeader.cs index 84cfba0..56a72b4 100644 --- a/Compression/MSZIP/FixedCompressedDataHeader.cs +++ b/Compression/MSZIP/FixedCompressedDataHeader.cs @@ -14,11 +14,7 @@ namespace SabreTools.Models.Compression.MSZIP /// /// Huffman code lengths for the literal / length alphabet /// -#if NET48 - public override uint[] LiteralLengths -#else public override uint[]? LiteralLengths -#endif { get { @@ -56,11 +52,7 @@ namespace SabreTools.Models.Compression.MSZIP /// /// Huffman distance codes for the literal / length alphabet /// -#if NET48 - public override uint[] DistanceCodes -#else public override uint[]? DistanceCodes -#endif { get { @@ -90,20 +82,12 @@ namespace SabreTools.Models.Compression.MSZIP /// /// Huffman code lengths for the literal / length alphabet /// -#if NET48 - private uint[] _literalLengths = null; -#else private uint[]? _literalLengths = null; -#endif /// /// Huffman distance codes for the literal / length alphabet /// -#if NET48 - private uint[] _distanceCodes = null; -#else private uint[]? _distanceCodes = null; -#endif #endregion } diff --git a/Compression/Quantum/Model.cs b/Compression/Quantum/Model.cs index 9a66440..31100b4 100644 --- a/Compression/Quantum/Model.cs +++ b/Compression/Quantum/Model.cs @@ -10,11 +10,7 @@ namespace SabreTools.Models.Compression.Quantum /// order in the table, and with every symbol in the table /// having a frequency of 1 /// -#if NET48 - public ModelSymbol[] Symbols { get; set; } -#else public ModelSymbol?[]? Symbols { get; set; } -#endif /// /// The initial total frequency is equal to the number of entries diff --git a/CueSheets/CueFile.cs b/CueSheets/CueFile.cs index e9d0d87..ecb94ec 100644 --- a/CueSheets/CueFile.cs +++ b/CueSheets/CueFile.cs @@ -15,11 +15,7 @@ namespace SabreTools.Models.CueSheets /// /// filename /// -#if NET48 - public string FileName { get; set; } -#else public string? FileName { get; set; } -#endif /// /// filetype @@ -29,10 +25,6 @@ namespace SabreTools.Models.CueSheets /// /// List of TRACK in FILE /// -#if NET48 - public CueTrack[] Tracks { get; set; } -#else public CueTrack?[]? Tracks { get; set; } -#endif } } diff --git a/CueSheets/CueSheet.cs b/CueSheets/CueSheet.cs index 6a4bc4f..0e82385 100644 --- a/CueSheets/CueSheet.cs +++ b/CueSheets/CueSheet.cs @@ -11,55 +11,31 @@ namespace SabreTools.Models.CueSheets /// /// CATALOG /// -#if NET48 - public string Catalog { get; set; } -#else public string? Catalog { get; set; } -#endif /// /// CDTEXTFILE /// -#if NET48 - public string CdTextFile { get; set; } -#else public string? CdTextFile { get; set; } -#endif /// /// PERFORMER /// -#if NET48 - public string Performer { get; set; } -#else public string? Performer { get; set; } -#endif /// /// SONGWRITER /// -#if NET48 - public string Songwriter { get; set; } -#else public string? Songwriter { get; set; } -#endif /// /// TITLE /// -#if NET48 - public string Title { get; set; } -#else public string? Title { get; set; } -#endif /// /// List of FILE in cuesheet /// -#if NET48 - public CueFile[] Files { get; set; } -#else public CueFile?[]? Files { get; set; } -#endif } } diff --git a/CueSheets/CueTrack.cs b/CueSheets/CueTrack.cs index 1d85760..9956afe 100644 --- a/CueSheets/CueTrack.cs +++ b/CueSheets/CueTrack.cs @@ -27,65 +27,37 @@ namespace SabreTools.Models.CueSheets /// ISRC /// /// 12 characters in length -#if NET48 - public string ISRC { get; set; } -#else public string? ISRC { get; set; } -#endif /// /// PERFORMER /// -#if NET48 - public string Performer { get; set; } -#else public string? Performer { get; set; } -#endif /// /// SONGWRITER /// -#if NET48 - public string Songwriter { get; set; } -#else public string? Songwriter { get; set; } -#endif /// /// TITLE /// -#if NET48 - public string Title { get; set; } -#else public string? Title { get; set; } -#endif /// /// PREGAP /// -#if NET48 - public PreGap PreGap { get; set; } -#else public PreGap? PreGap { get; set; } -#endif /// /// List of INDEX in TRACK /// /// Must start with 0 or 1 and then sequential -#if NET48 - public CueIndex[] Indices { get; set; } -#else public CueIndex?[]? Indices { get; set; } -#endif /// /// POSTGAP /// -#if NET48 - public PostGap PostGap { get; set; } -#else public PostGap? PostGap { get; set; } -#endif } } diff --git a/DVD/AudioSubPictureAttributesTable.cs b/DVD/AudioSubPictureAttributesTable.cs index 7dc033f..b555775 100644 --- a/DVD/AudioSubPictureAttributesTable.cs +++ b/DVD/AudioSubPictureAttributesTable.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.DVD /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif /// /// End address (last byte of last VTS_ATRT) @@ -25,19 +21,11 @@ namespace SabreTools.Models.DVD /// /// Offset to VTS_ATRT n /// -#if NET48 - public uint[] Offsets { get; set; } -#else public uint[]? Offsets { get; set; } -#endif /// /// Entries /// -#if NET48 - public AudioSubPictureAttributesTableEntry[] Entries { get; set; } -#else public AudioSubPictureAttributesTableEntry?[]? Entries { get; set; } -#endif } } \ No newline at end of file diff --git a/DVD/AudioSubPictureAttributesTableEntry.cs b/DVD/AudioSubPictureAttributesTableEntry.cs index ac144ac..b8c0137 100644 --- a/DVD/AudioSubPictureAttributesTableEntry.cs +++ b/DVD/AudioSubPictureAttributesTableEntry.cs @@ -18,10 +18,6 @@ namespace SabreTools.Models.DVD /// Copy of VTS attributes (offset 100 and on from the VTS IFO /// file, usually 0x300 bytes long) /// -#if NET48 - public byte[] AttributesCopy { get; set; } -#else public byte[]? AttributesCopy { get; set; } -#endif } } \ No newline at end of file diff --git a/DVD/CellAddressTable.cs b/DVD/CellAddressTable.cs index b605ca5..a808a2b 100644 --- a/DVD/CellAddressTable.cs +++ b/DVD/CellAddressTable.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.DVD /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif /// /// End address (last byte of last entry) @@ -25,10 +21,6 @@ namespace SabreTools.Models.DVD /// /// 12-byte entries /// -#if NET48 - public CellAddressTableEntry[] Entries { get; set; } -#else public CellAddressTableEntry?[]? Entries { get; set; } -#endif } } \ No newline at end of file diff --git a/DVD/LanguageUnitTable.cs b/DVD/LanguageUnitTable.cs index 3c4040a..2001961 100644 --- a/DVD/LanguageUnitTable.cs +++ b/DVD/LanguageUnitTable.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.DVD /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif /// /// End address (last byte of last PGC in last LU) @@ -26,19 +22,11 @@ namespace SabreTools.Models.DVD /// /// Language Units /// -#if NET48 - public LanguageUnitTableEntry[] Entries { get; set; } -#else public LanguageUnitTableEntry?[]? Entries { get; set; } -#endif /// /// Program Chains /// -#if NET48 - public ProgramChainTable[] ProgramChains { get; set; } -#else public ProgramChainTable?[]? ProgramChains { get; set; } -#endif } } \ No newline at end of file diff --git a/DVD/ParentalManagementMasksTable.cs b/DVD/ParentalManagementMasksTable.cs index 97ab884..10f4560 100644 --- a/DVD/ParentalManagementMasksTable.cs +++ b/DVD/ParentalManagementMasksTable.cs @@ -25,21 +25,13 @@ namespace SabreTools.Models.DVD /// /// Entries /// -#if NET48 - public ParentalManagementMasksTableEntry[] Entries { get; set; } -#else public ParentalManagementMasksTableEntry?[]? Entries { get; set; } -#endif /// /// The PTL_MAIT contains the 16-bit masks for the VMG and /// all title sets for parental management level 8 followed /// by the masks for level 7, and so on to level 1. /// -#if NET48 - public byte[][] BitMasks { get; set; } -#else public byte[][]? BitMasks { get; set; } -#endif } } \ No newline at end of file diff --git a/DVD/ParentalManagementMasksTableEntry.cs b/DVD/ParentalManagementMasksTableEntry.cs index 99e3d10..cf94d5d 100644 --- a/DVD/ParentalManagementMasksTableEntry.cs +++ b/DVD/ParentalManagementMasksTableEntry.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.DVD /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif /// /// Offset to PTL_MAIT diff --git a/DVD/ProgramChainTable.cs b/DVD/ProgramChainTable.cs index 0e63479..8277475 100644 --- a/DVD/ProgramChainTable.cs +++ b/DVD/ProgramChainTable.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.DVD /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif /// /// End address (last byte of last PGC in this LU) @@ -26,10 +22,6 @@ namespace SabreTools.Models.DVD /// /// Program Chains /// -#if NET48 - public ProgramChainTableEntry[] Entries { get; set; } -#else public ProgramChainTableEntry?[]? Entries { get; set; } -#endif } } \ No newline at end of file diff --git a/DVD/TitlesTable.cs b/DVD/TitlesTable.cs index ef5fef8..51820a8 100644 --- a/DVD/TitlesTable.cs +++ b/DVD/TitlesTable.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.DVD /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif /// /// End address (last byte of last entry) @@ -25,10 +21,6 @@ namespace SabreTools.Models.DVD /// /// 12-byte entries /// -#if NET48 - public TitlesTableEntry[] Entries { get; set; } -#else public TitlesTableEntry?[]? Entries { get; set; } -#endif } } \ No newline at end of file diff --git a/DVD/VOBUAddressMap.cs b/DVD/VOBUAddressMap.cs index a7bdd8d..144e6b6 100644 --- a/DVD/VOBUAddressMap.cs +++ b/DVD/VOBUAddressMap.cs @@ -11,10 +11,6 @@ namespace SabreTools.Models.DVD /// /// Starting sector within VOB of nth VOBU /// -#if NET48 - public uint[] StartingSectors { get; set; } -#else public uint[]? StartingSectors { get; set; } -#endif } } \ No newline at end of file diff --git a/DVD/VideoManagerIFO.cs b/DVD/VideoManagerIFO.cs index 2b7d0b0..e1096b3 100644 --- a/DVD/VideoManagerIFO.cs +++ b/DVD/VideoManagerIFO.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.DVD /// /// "DVDVIDEO-VMG" /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Last sector of VMG set (last sector of BUP) @@ -59,11 +55,7 @@ namespace SabreTools.Models.DVD /// /// Provider ID /// -#if NET48 - public byte[] ProviderID { get; set; } -#else public byte[]? ProviderID { get; set; } -#endif /// /// VMG POS @@ -123,11 +115,7 @@ namespace SabreTools.Models.DVD /// /// Video attributes of VMGM_VOBS /// -#if NET48 - public byte[] VideoAttributes { get; set; } -#else public byte[]? VideoAttributes { get; set; } -#endif /// /// Number of audio streams in VMGM_VOBS @@ -137,20 +125,12 @@ namespace SabreTools.Models.DVD /// /// Audio attributes of VMGM_VOBS /// -#if NET48 - public byte[][] AudioAttributes { get; set; } -#else public byte[][]? AudioAttributes { get; set; } -#endif /// /// Unknown /// -#if NET48 - public byte[] Unknown { get; set; } -#else public byte[]? Unknown { get; set; } -#endif /// /// Number of subpicture streams in VMGM_VOBS (0 or 1) @@ -160,19 +140,11 @@ namespace SabreTools.Models.DVD /// /// Subpicture attributes of VMGM_VOBS /// -#if NET48 - public byte[] SubpictureAttributes { get; set; } -#else public byte[]? SubpictureAttributes { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif } } \ No newline at end of file diff --git a/DVD/VideoTitleSetIFO.cs b/DVD/VideoTitleSetIFO.cs index 34e69c1..ae27508 100644 --- a/DVD/VideoTitleSetIFO.cs +++ b/DVD/VideoTitleSetIFO.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.DVD /// /// "DVDVIDEO-VTS" /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Last sector of title set (last sector of BUP) @@ -59,11 +55,7 @@ namespace SabreTools.Models.DVD /// /// Provider ID /// -#if NET48 - public byte[] ProviderID { get; set; } -#else public byte[]? ProviderID { get; set; } -#endif /// /// VMG POS @@ -133,11 +125,7 @@ namespace SabreTools.Models.DVD /// /// Video attributes of VTSM_VOBS /// -#if NET48 - public byte[] VideoAttributes { get; set; } -#else public byte[]? VideoAttributes { get; set; } -#endif /// /// Number of audio streams in VTSM_VOBS @@ -147,20 +135,12 @@ namespace SabreTools.Models.DVD /// /// Audio attributes of VTSM_VOBS /// -#if NET48 - public byte[][] AudioAttributes { get; set; } -#else public byte[][]? AudioAttributes { get; set; } -#endif /// /// Unknown /// -#if NET48 - public byte[] Unknown { get; set; } -#else public byte[]? Unknown { get; set; } -#endif /// /// Number of subpicture streams in VTSM_VOBS (0 or 1) @@ -170,19 +150,11 @@ namespace SabreTools.Models.DVD /// /// Subpicture attributes of VTSM_VOBS /// -#if NET48 - public byte[] SubpictureAttributes { get; set; } -#else public byte[]? SubpictureAttributes { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif } } \ No newline at end of file diff --git a/DosCenter/DosCenter.cs b/DosCenter/DosCenter.cs index cb816c9..8368d8a 100644 --- a/DosCenter/DosCenter.cs +++ b/DosCenter/DosCenter.cs @@ -4,62 +4,30 @@ namespace SabreTools.Models.DosCenter public class DosCenter { /// name -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// description -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif /// version -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif /// date -#if NET48 - public string Date { get; set; } -#else public string? Date { get; set; } -#endif /// author -#if NET48 - public string Author { get; set; } -#else public string? Author { get; set; } -#endif /// homepage -#if NET48 - public string Homepage { get; set; } -#else public string? Homepage { get; set; } -#endif /// comment -#if NET48 - public string Comment { get; set; } -#else public string? Comment { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/DosCenter/File.cs b/DosCenter/File.cs index 7409878..eb663f4 100644 --- a/DosCenter/File.cs +++ b/DosCenter/File.cs @@ -5,43 +5,23 @@ namespace SabreTools.Models.DosCenter { /// name, attribute [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// size, attribute, numeric [Required] -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif /// crc, attribute [Required] -#if NET48 - public string CRC { get; set; } -#else public string? CRC { get; set; } -#endif /// date, attribute -#if NET48 - public string Date { get; set; } -#else public string? Date { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/DosCenter/Game.cs b/DosCenter/Game.cs index 630215c..8413155 100644 --- a/DosCenter/Game.cs +++ b/DosCenter/Game.cs @@ -5,27 +5,15 @@ namespace SabreTools.Models.DosCenter { /// name [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// file -#if NET48 - public File[] File { get; set; } -#else public File[]? File { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/DosCenter/MetadataFile.cs b/DosCenter/MetadataFile.cs index 5da7489..48f2a6e 100644 --- a/DosCenter/MetadataFile.cs +++ b/DosCenter/MetadataFile.cs @@ -3,27 +3,15 @@ namespace SabreTools.Models.DosCenter public class MetadataFile { /// doscenter -#if NET48 - public DosCenter DosCenter { get; set; } -#else public DosCenter? DosCenter { get; set; } -#endif /// game -#if NET48 - public Game[] Game { get; set; } -#else public Game[]? Game { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/EverdriveSMDB/MetadataFile.cs b/EverdriveSMDB/MetadataFile.cs index 34e4098..1813caf 100644 --- a/EverdriveSMDB/MetadataFile.cs +++ b/EverdriveSMDB/MetadataFile.cs @@ -2,10 +2,6 @@ namespace SabreTools.Models.EverdriveSMDB { public class MetadataFile { -#if NET48 - public Row[] Row { get; set; } -#else public Row[]? Row { get; set; } -#endif } } \ No newline at end of file diff --git a/EverdriveSMDB/Row.cs b/EverdriveSMDB/Row.cs index 355b7a8..648dbe4 100644 --- a/EverdriveSMDB/Row.cs +++ b/EverdriveSMDB/Row.cs @@ -6,54 +6,26 @@ namespace SabreTools.Models.EverdriveSMDB public class Row { [Required] -#if NET48 - public string SHA256 { get; set; } -#else public string? SHA256 { get; set; } -#endif [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif [Required] -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif [Required] -#if NET48 - public string CRC32 { get; set; } -#else public string? CRC32 { get; set; } -#endif -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/GCF/DirectoryEntry.cs b/GCF/DirectoryEntry.cs index 2e26e9b..5b3c8ef 100644 --- a/GCF/DirectoryEntry.cs +++ b/GCF/DirectoryEntry.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.GCF /// /// Directory item name from the end of the directory items. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Size of the item. (If file, file size. If folder, num items.) diff --git a/GCF/File.cs b/GCF/File.cs index c05fef4..387f7e6 100644 --- a/GCF/File.cs +++ b/GCF/File.cs @@ -11,192 +11,108 @@ namespace SabreTools.Models.GCF /// /// Header data /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Block entry header data /// -#if NET48 - public BlockEntryHeader BlockEntryHeader { get; set; } -#else public BlockEntryHeader? BlockEntryHeader { get; set; } -#endif /// /// Block entries data /// -#if NET48 - public BlockEntry[] BlockEntries { get; set; } -#else public BlockEntry?[]? BlockEntries { get; set; } -#endif /// /// Fragmentation map header data /// -#if NET48 - public FragmentationMapHeader FragmentationMapHeader { get; set; } -#else public FragmentationMapHeader? FragmentationMapHeader { get; set; } -#endif /// /// Fragmentation map data /// -#if NET48 - public FragmentationMap[] FragmentationMaps { get; set; } -#else public FragmentationMap?[]? FragmentationMaps { get; set; } -#endif /// /// Block entry map header data /// /// Part of version 5 but not version 6. -#if NET48 - public BlockEntryMapHeader BlockEntryMapHeader { get; set; } -#else public BlockEntryMapHeader? BlockEntryMapHeader { get; set; } -#endif /// /// Block entry map data /// /// Part of version 5 but not version 6. -#if NET48 - public BlockEntryMap[] BlockEntryMaps { get; set; } -#else public BlockEntryMap?[]? BlockEntryMaps { get; set; } -#endif /// /// Directory header data /// -#if NET48 - public DirectoryHeader DirectoryHeader { get; set; } -#else public DirectoryHeader? DirectoryHeader { get; set; } -#endif /// /// Directory entries data /// -#if NET48 - public DirectoryEntry[] DirectoryEntries { get; set; } -#else public DirectoryEntry?[]? DirectoryEntries { get; set; } -#endif /// /// Directory names data /// -#if NET48 - public Dictionary DirectoryNames { get; set; } -#else public Dictionary? DirectoryNames { get; set; } -#endif /// /// Directory info 1 entries data /// -#if NET48 - public DirectoryInfo1Entry[] DirectoryInfo1Entries { get; set; } -#else public DirectoryInfo1Entry?[]? DirectoryInfo1Entries { get; set; } -#endif /// /// Directory info 2 entries data /// -#if NET48 - public DirectoryInfo2Entry[] DirectoryInfo2Entries { get; set; } -#else public DirectoryInfo2Entry?[]? DirectoryInfo2Entries { get; set; } -#endif /// /// Directory copy entries data /// -#if NET48 - public DirectoryCopyEntry[] DirectoryCopyEntries { get; set; } -#else public DirectoryCopyEntry?[]? DirectoryCopyEntries { get; set; } -#endif /// /// Directory local entries data /// -#if NET48 - public DirectoryLocalEntry[] DirectoryLocalEntries { get; set; } -#else public DirectoryLocalEntry?[]? DirectoryLocalEntries { get; set; } -#endif /// /// Directory map header data /// -#if NET48 - public DirectoryMapHeader DirectoryMapHeader { get; set; } -#else public DirectoryMapHeader? DirectoryMapHeader { get; set; } -#endif /// /// Directory map entries data /// -#if NET48 - public DirectoryMapEntry[] DirectoryMapEntries { get; set; } -#else public DirectoryMapEntry?[]? DirectoryMapEntries { get; set; } -#endif /// /// Checksum header data /// -#if NET48 - public ChecksumHeader ChecksumHeader { get; set; } -#else public ChecksumHeader? ChecksumHeader { get; set; } -#endif /// /// Checksum map header data /// -#if NET48 - public ChecksumMapHeader ChecksumMapHeader { get; set; } -#else public ChecksumMapHeader? ChecksumMapHeader { get; set; } -#endif /// /// Checksum map entries data /// -#if NET48 - public ChecksumMapEntry[] ChecksumMapEntries { get; set; } -#else public ChecksumMapEntry?[]? ChecksumMapEntries { get; set; } -#endif /// /// Checksum entries data /// -#if NET48 - public ChecksumEntry[] ChecksumEntries { get; set; } -#else public ChecksumEntry?[]? ChecksumEntries { get; set; } -#endif /// /// Data block header data /// -#if NET48 - public DataBlockHeader DataBlockHeader { get; set; } -#else public DataBlockHeader? DataBlockHeader { get; set; } -#endif } } \ No newline at end of file diff --git a/Hashfile/Hashfile.cs b/Hashfile/Hashfile.cs index 1840fd3..ad69412 100644 --- a/Hashfile/Hashfile.cs +++ b/Hashfile/Hashfile.cs @@ -3,56 +3,24 @@ namespace SabreTools.Models.Hashfile /// Hashfiles can only contain one type of hash at a time public class Hashfile { -#if NET48 - public SFV[] SFV { get; set; } -#else public SFV[]? SFV { get; set; } -#endif -#if NET48 - public MD5[] MD5 { get; set; } -#else public MD5[]? MD5 { get; set; } -#endif -#if NET48 - public SHA1[] SHA1 { get; set; } -#else public SHA1[]? SHA1 { get; set; } -#endif -#if NET48 - public SHA256[] SHA256 { get; set; } -#else public SHA256[]? SHA256 { get; set; } -#endif -#if NET48 - public SHA384[] SHA384 { get; set; } -#else public SHA384[]? SHA384 { get; set; } -#endif -#if NET48 - public SHA512[] SHA512 { get; set; } -#else public SHA512[]? SHA512 { get; set; } -#endif -#if NET48 - public SpamSum[] SpamSum { get; set; } -#else public SpamSum[]? SpamSum { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Hashfile/MD5.cs b/Hashfile/MD5.cs index 542adeb..1156d18 100644 --- a/Hashfile/MD5.cs +++ b/Hashfile/MD5.cs @@ -6,17 +6,9 @@ namespace SabreTools.Models.Hashfile public class MD5 { [Required] -#if NET48 - public string Hash { get; set; } -#else public string? Hash { get; set; } -#endif [Required] -#if NET48 - public string File { get; set; } -#else public string? File { get; set; } -#endif } } \ No newline at end of file diff --git a/Hashfile/SFV.cs b/Hashfile/SFV.cs index 771b302..8d4be7f 100644 --- a/Hashfile/SFV.cs +++ b/Hashfile/SFV.cs @@ -6,17 +6,9 @@ namespace SabreTools.Models.Hashfile public class SFV { [Required] -#if NET48 - public string File { get; set; } -#else public string? File { get; set; } -#endif [Required] -#if NET48 - public string Hash { get; set; } -#else public string? Hash { get; set; } -#endif } } \ No newline at end of file diff --git a/Hashfile/SHA1.cs b/Hashfile/SHA1.cs index 6113e4b..153afb3 100644 --- a/Hashfile/SHA1.cs +++ b/Hashfile/SHA1.cs @@ -6,17 +6,9 @@ namespace SabreTools.Models.Hashfile public class SHA1 { [Required] -#if NET48 - public string Hash { get; set; } -#else public string? Hash { get; set; } -#endif [Required] -#if NET48 - public string File { get; set; } -#else public string? File { get; set; } -#endif } } \ No newline at end of file diff --git a/Hashfile/SHA256.cs b/Hashfile/SHA256.cs index 0e38e83..9b2c6d2 100644 --- a/Hashfile/SHA256.cs +++ b/Hashfile/SHA256.cs @@ -6,17 +6,9 @@ namespace SabreTools.Models.Hashfile public class SHA256 { [Required] -#if NET48 - public string Hash { get; set; } -#else public string? Hash { get; set; } -#endif [Required] -#if NET48 - public string File { get; set; } -#else public string? File { get; set; } -#endif } } \ No newline at end of file diff --git a/Hashfile/SHA384.cs b/Hashfile/SHA384.cs index e874aba..916aa71 100644 --- a/Hashfile/SHA384.cs +++ b/Hashfile/SHA384.cs @@ -6,17 +6,9 @@ namespace SabreTools.Models.Hashfile public class SHA384 { [Required] -#if NET48 - public string Hash { get; set; } -#else public string? Hash { get; set; } -#endif [Required] -#if NET48 - public string File { get; set; } -#else public string? File { get; set; } -#endif } } \ No newline at end of file diff --git a/Hashfile/SHA512.cs b/Hashfile/SHA512.cs index 786d959..dec6abb 100644 --- a/Hashfile/SHA512.cs +++ b/Hashfile/SHA512.cs @@ -6,17 +6,9 @@ namespace SabreTools.Models.Hashfile public class SHA512 { [Required] -#if NET48 - public string Hash { get; set; } -#else public string? Hash { get; set; } -#endif [Required] -#if NET48 - public string File { get; set; } -#else public string? File { get; set; } -#endif } } \ No newline at end of file diff --git a/Hashfile/SpamSum.cs b/Hashfile/SpamSum.cs index 3d2428d..82bb61e 100644 --- a/Hashfile/SpamSum.cs +++ b/Hashfile/SpamSum.cs @@ -6,17 +6,9 @@ namespace SabreTools.Models.Hashfile public class SpamSum { [Required] -#if NET48 - public string Hash { get; set; } -#else public string? Hash { get; set; } -#endif [Required] -#if NET48 - public string File { get; set; } -#else public string? File { get; set; } -#endif } } \ No newline at end of file diff --git a/IRD/File.cs b/IRD/File.cs index 270fd5a..d428327 100644 --- a/IRD/File.cs +++ b/IRD/File.cs @@ -7,11 +7,7 @@ namespace SabreTools.Models.IRD /// /// "3IRD" /// -#if NET48 - public byte[] Magic { get; set; } -#else public byte[]? Magic { get; set; } -#endif /// /// Version @@ -23,11 +19,7 @@ namespace SabreTools.Models.IRD /// The same value stored in PARAM.SFO / TITLE_ID /// /// 9 bytes, ASCII, stored without dashes -#if NET48 - public string TitleID { get; set; } -#else public string? TitleID { get; set; } -#endif /// /// Number of bytes that follow containing the title @@ -38,41 +30,25 @@ namespace SabreTools.Models.IRD /// The same value stored in PARAM.SFO / TITLE /// /// bytes, ASCII -#if NET48 - public string Title { get; set; } -#else public string? Title { get; set; } -#endif /// /// The same value stored in PARAM.SFO / PS3_SYSTEM_VER /// /// 4 bytes, ASCII, missing uses "0000" -#if NET48 - public string SystemVersion { get; set; } -#else public string? SystemVersion { get; set; } -#endif /// /// The same value stored in PARAM.SFO / VERSION /// /// 5 bytes, ASCII -#if NET48 - public string GameVersion { get; set; } -#else public string? GameVersion { get; set; } -#endif /// /// The same value stored in PARAM.SFO / APP_VER /// /// 5 bytes, ASCII -#if NET48 - public string AppVersion { get; set; } -#else public string? AppVersion { get; set; } -#endif /// /// Length of the gzip-compressed header data @@ -82,11 +58,7 @@ namespace SabreTools.Models.IRD /// /// Gzip-compressed header data /// -#if NET48 - public byte[] Header { get; set; } -#else public byte[]? Header { get; set; } -#endif /// /// Length of the gzip-compressed footer data @@ -96,11 +68,7 @@ namespace SabreTools.Models.IRD /// /// Gzip-compressed footer data /// -#if NET48 - public byte[] Footer { get; set; } -#else public byte[]? Footer { get; set; } -#endif /// /// Number of complete regions in the image @@ -111,11 +79,7 @@ namespace SabreTools.Models.IRD /// MD5 hashes for all complete regions in the image /// /// regions, 16-bytes per hash -#if NET48 - public byte[][] RegionHashes { get; set; } -#else public byte[][]? RegionHashes { get; set; } -#endif /// /// Number of decrypted files in the image @@ -126,21 +90,13 @@ namespace SabreTools.Models.IRD /// Starting sector for each decrypted file /// /// files, alternating with each entry -#if NET48 - public ulong[] FileKeys { get; set; } -#else public ulong[]? FileKeys { get; set; } -#endif /// /// MD5 hashes for all decrypted files in the image /// /// files, 16-bytes per hash, alternating with each entry -#if NET48 - public byte[][] FileHashes { get; set; } -#else public byte[][]? FileHashes { get; set; } -#endif /// /// Extra Config, usually 0x0000 @@ -156,31 +112,19 @@ namespace SabreTools.Models.IRD /// D1 key /// /// 16 bytes -#if NET48 - public byte[] Data1Key { get; set; } -#else public byte[]? Data1Key { get; set; } -#endif /// /// D2 key /// /// 16 bytes -#if NET48 - public byte[] Data2Key { get; set; } -#else public byte[]? Data2Key { get; set; } -#endif /// /// Uncompressed PIC data /// /// 115 bytes, before D1/D2 keys on version 9 -#if NET48 - public byte[] PIC { get; set; } -#else public byte[]? PIC { get; set; } -#endif /// /// Unique Identifier diff --git a/InstallShieldCabinet/Cabinet.cs b/InstallShieldCabinet/Cabinet.cs index 0db60a8..f4df0d4 100644 --- a/InstallShieldCabinet/Cabinet.cs +++ b/InstallShieldCabinet/Cabinet.cs @@ -11,29 +11,17 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Common header /// -#if NET48 - public CommonHeader CommonHeader { get; set; } -#else public CommonHeader? CommonHeader { get; set; } -#endif /// /// Volume header /// -#if NET48 - public VolumeHeader VolumeHeader { get; set; } -#else public VolumeHeader? VolumeHeader { get; set; } -#endif /// /// Descriptor /// -#if NET48 - public Descriptor Descriptor { get; set; } -#else public Descriptor? Descriptor { get; set; } -#endif #endregion @@ -42,29 +30,17 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Offsets to all file descriptors /// -#if NET48 - public uint[] FileDescriptorOffsets { get; set; } -#else public uint[]? FileDescriptorOffsets { get; set; } -#endif /// /// Directory names /// -#if NET48 - public string[] DirectoryNames { get; set; } -#else public string[]? DirectoryNames { get; set; } -#endif /// /// Standard file descriptors /// -#if NET48 - public FileDescriptor[] FileDescriptors { get; set; } -#else public FileDescriptor?[]? FileDescriptors { get; set; } -#endif #endregion @@ -73,20 +49,12 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// File group offset to offset list mapping /// -#if NET48 - public Dictionary FileGroupOffsets { get; set; } -#else public Dictionary? FileGroupOffsets { get; set; } -#endif /// /// File groups /// -#if NET48 - public FileGroup[] FileGroups { get; set; } -#else public FileGroup?[]? FileGroups { get; set; } -#endif #endregion @@ -95,20 +63,12 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Component offset to offset list mapping /// -#if NET48 - public Dictionary ComponentOffsets { get; set; } -#else public Dictionary? ComponentOffsets { get; set; } -#endif /// /// Components /// -#if NET48 - public Component[] Components { get; set; } -#else public Component?[]? Components { get; set; } -#endif #endregion } diff --git a/InstallShieldCabinet/CommonHeader.cs b/InstallShieldCabinet/CommonHeader.cs index 9556d35..58a494e 100644 --- a/InstallShieldCabinet/CommonHeader.cs +++ b/InstallShieldCabinet/CommonHeader.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// "ISc(" /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Encoded version diff --git a/InstallShieldCabinet/Component.cs b/InstallShieldCabinet/Component.cs index fbe700a..a93116a 100644 --- a/InstallShieldCabinet/Component.cs +++ b/InstallShieldCabinet/Component.cs @@ -13,11 +13,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Component identifier /// -#if NET48 - public string Identifier { get; set; } -#else public string? Identifier { get; set; } -#endif /// /// Offset to the component descriptor @@ -32,20 +28,12 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Display name /// -#if NET48 - public string DisplayName { get; set; } -#else public string? DisplayName { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved0 { get; set; } -#else public byte[]? Reserved0 { get; set; } -#endif /// /// Reserved offset @@ -70,11 +58,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Component name /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Reserved offset @@ -94,11 +78,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Reserved /// -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// Offset to the component CLSID @@ -113,20 +93,12 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Reserved /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved3 { get; set; } -#else public byte[]? Reserved3 { get; set; } -#endif /// /// Number of depends(?) @@ -151,11 +123,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// File group names /// -#if NET48 - public string[] FileGroupNames { get; set; } -#else public string[]? FileGroupNames { get; set; } -#endif /// /// Number of X3(?) diff --git a/InstallShieldCabinet/Descriptor.cs b/InstallShieldCabinet/Descriptor.cs index ed5d9a2..ef4d51f 100644 --- a/InstallShieldCabinet/Descriptor.cs +++ b/InstallShieldCabinet/Descriptor.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Reserved /// -#if NET48 - public byte[] Reserved0 { get; set; } -#else public byte[]? Reserved0 { get; set; } -#endif /// /// Offset to the component list @@ -30,11 +26,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Reserved /// -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// Size of the file table @@ -54,29 +46,17 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Reserved /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved3 { get; set; } -#else public byte[]? Reserved3 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved4 { get; set; } -#else public byte[]? Reserved4 { get; set; } -#endif /// /// Number of files @@ -101,38 +81,22 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Reserved /// -#if NET48 - public byte[] Reserved5 { get; set; } -#else public byte[]? Reserved5 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved6 { get; set; } -#else public byte[]? Reserved6 { get; set; } -#endif /// /// Offsets to the file groups /// -#if NET48 - public uint[] FileGroupOffsets { get; set; } -#else public uint[]? FileGroupOffsets { get; set; } -#endif /// /// Offsets to the components /// -#if NET48 - public uint[] ComponentOffsets { get; set; } -#else public uint[]? ComponentOffsets { get; set; } -#endif /// /// Offset to the setup types @@ -147,19 +111,11 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Reserved /// -#if NET48 - public byte[] Reserved7 { get; set; } -#else public byte[]? Reserved7 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved8 { get; set; } -#else public byte[]? Reserved8 { get; set; } -#endif } } \ No newline at end of file diff --git a/InstallShieldCabinet/FileDescriptor.cs b/InstallShieldCabinet/FileDescriptor.cs index e06ade6..15456e6 100644 --- a/InstallShieldCabinet/FileDescriptor.cs +++ b/InstallShieldCabinet/FileDescriptor.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// File descriptor name /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Directory index @@ -45,11 +41,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// MD5 of the entry data /// -#if NET48 - public byte[] MD5 { get; set; } -#else public byte[]? MD5 { get; set; } -#endif /// /// Volume number diff --git a/InstallShieldCabinet/FileGroup.cs b/InstallShieldCabinet/FileGroup.cs index a322123..aef4fe0 100644 --- a/InstallShieldCabinet/FileGroup.cs +++ b/InstallShieldCabinet/FileGroup.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// File group name /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Size of the expanded data @@ -25,11 +21,7 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Reserved /// -#if NET48 - public byte[] Reserved0 { get; set; } -#else public byte[]? Reserved0 { get; set; } -#endif /// /// Size of the compressed data @@ -39,20 +31,12 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Reserved /// -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Attribute(?) @@ -117,46 +101,26 @@ namespace SabreTools.Models.InstallShieldCabinet /// /// Reserved /// -#if NET48 - public byte[] Reserved3 { get; set; } -#else public byte[]? Reserved3 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved4 { get; set; } -#else public byte[]? Reserved4 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved5 { get; set; } -#else public byte[]? Reserved5 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved6 { get; set; } -#else public byte[]? Reserved6 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved7 { get; set; } -#else public byte[]? Reserved7 { get; set; } -#endif } } \ No newline at end of file diff --git a/InstallShieldCabinet/OffsetList.cs b/InstallShieldCabinet/OffsetList.cs index c806cd7..de6f2db 100644 --- a/InstallShieldCabinet/OffsetList.cs +++ b/InstallShieldCabinet/OffsetList.cs @@ -5,11 +5,7 @@ namespace SabreTools.Models.InstallShieldCabinet { public uint NameOffset { get; set; } -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif public uint DescriptorOffset { get; set; } diff --git a/LinearExecutable/DebugInformation.cs b/LinearExecutable/DebugInformation.cs index 5f6b361..703331a 100644 --- a/LinearExecutable/DebugInformation.cs +++ b/LinearExecutable/DebugInformation.cs @@ -16,11 +16,7 @@ /// /// The signature consists of a string of three (3) ASCII characters: "NB0" /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// This defines the type of debugger data that exists in the remainder of the @@ -34,10 +30,6 @@ /// the responsibility of the linker or debugging tools to follow the convention /// for the type field that is defined here. /// -#if NET48 - public byte[] DebuggerData { get; set; } -#else public byte[]? DebuggerData { get; set; } -#endif } } diff --git a/LinearExecutable/EntryTableBundle.cs b/LinearExecutable/EntryTableBundle.cs index 638750e..363d01e 100644 --- a/LinearExecutable/EntryTableBundle.cs +++ b/LinearExecutable/EntryTableBundle.cs @@ -51,10 +51,6 @@ /// /// Table entries in the bundle /// -#if NET48 - public EntryTableEntry[] TableEntries { get; set; } -#else public EntryTableEntry?[]? TableEntries { get; set; } -#endif } } diff --git a/LinearExecutable/Executable.cs b/LinearExecutable/Executable.cs index 75ccba3..60073fa 100644 --- a/LinearExecutable/Executable.cs +++ b/LinearExecutable/Executable.cs @@ -13,149 +13,85 @@ namespace SabreTools.Models.LinearExecutable /// /// MS-DOS executable stub /// -#if NET48 - public MSDOS.Executable Stub { get; set; } -#else public MSDOS.Executable? Stub { get; set; } -#endif /// /// Information block /// -#if NET48 - public InformationBlock InformationBlock { get; set; } -#else public InformationBlock? InformationBlock { get; set; } -#endif /// /// Object table /// -#if NET48 - public ObjectTableEntry[] ObjectTable { get; set; } -#else public ObjectTableEntry?[]? ObjectTable { get; set; } -#endif /// /// Object page map /// -#if NET48 - public ObjectPageMapEntry[] ObjectPageMap { get; set; } -#else public ObjectPageMapEntry?[]? ObjectPageMap { get; set; } -#endif // TODO: Object iterate data map table (Undefined) /// /// Resource table /// -#if NET48 - public ResourceTableEntry[] ResourceTable { get; set; } -#else public ResourceTableEntry?[]? ResourceTable { get; set; } -#endif /// /// Resident Name table /// -#if NET48 - public ResidentNamesTableEntry[] ResidentNamesTable { get; set; } -#else public ResidentNamesTableEntry?[]? ResidentNamesTable { get; set; } -#endif /// /// Entry table /// -#if NET48 - public EntryTableBundle[] EntryTable { get; set; } -#else public EntryTableBundle?[]? EntryTable { get; set; } -#endif /// /// Module format directives table (optional) /// -#if NET48 - public ModuleFormatDirectivesTableEntry[] ModuleFormatDirectivesTable { get; set; } -#else public ModuleFormatDirectivesTableEntry?[]? ModuleFormatDirectivesTable { get; set; } -#endif /// /// Verify record directive table (optional) /// -#if NET48 - public VerifyRecordDirectiveTableEntry[] VerifyRecordDirectiveTable { get; set; } -#else public VerifyRecordDirectiveTableEntry?[]? VerifyRecordDirectiveTable { get; set; } -#endif /// /// Fix-up page table /// -#if NET48 - public FixupPageTableEntry[] FixupPageTable { get; set; } -#else public FixupPageTableEntry?[]? FixupPageTable { get; set; } -#endif /// /// Fix-up record table /// -#if NET48 - public FixupRecordTableEntry[] FixupRecordTable { get; set; } -#else public FixupRecordTableEntry?[]? FixupRecordTable { get; set; } -#endif /// /// Import module name table /// -#if NET48 - public ImportModuleNameTableEntry[] ImportModuleNameTable { get; set; } -#else public ImportModuleNameTableEntry?[]? ImportModuleNameTable { get; set; } -#endif /// /// Import procedure name table /// -#if NET48 - public ImportModuleProcedureNameTableEntry[] ImportModuleProcedureNameTable { get; set; } -#else public ImportModuleProcedureNameTableEntry?[]? ImportModuleProcedureNameTable { get; set; } -#endif /// /// Per-Page checksum table /// -#if NET48 - public PerPageChecksumTableEntry[] PerPageChecksumTable { get; set; } -#else public PerPageChecksumTableEntry?[]? PerPageChecksumTable { get; set; } -#endif /// /// Non-Resident Name table /// -#if NET48 - public NonResidentNamesTableEntry[] NonResidentNamesTable { get; set; } -#else public NonResidentNamesTableEntry?[]? NonResidentNamesTable { get; set; } -#endif // TODO: Non-resident directives data (Undefined) /// /// Debug information /// -#if NET48 - public DebugInformation DebugInformation { get; set; } -#else public DebugInformation? DebugInformation { get; set; } -#endif } } diff --git a/LinearExecutable/FixupRecordTableEntry.cs b/LinearExecutable/FixupRecordTableEntry.cs index 3d06fec..fdda525 100644 --- a/LinearExecutable/FixupRecordTableEntry.cs +++ b/LinearExecutable/FixupRecordTableEntry.cs @@ -356,11 +356,7 @@ /// field. The source offsets are relative to the beginning of the page where the /// fixups are to be made. /// -#if NET48 - public ushort[] SourceOffsetList { get; set; } -#else public ushort[]? SourceOffsetList { get; set; } -#endif #endregion } diff --git a/LinearExecutable/ImportModuleNameTableEntry.cs b/LinearExecutable/ImportModuleNameTableEntry.cs index f202143..ab5dede 100644 --- a/LinearExecutable/ImportModuleNameTableEntry.cs +++ b/LinearExecutable/ImportModuleNameTableEntry.cs @@ -33,10 +33,6 @@ /// This is a variable length string with it's length defined in bytes by /// the LEN field. The string is case sensitive and is not null terminated. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif } } diff --git a/LinearExecutable/ImportProcedureNameTableEntry.cs b/LinearExecutable/ImportProcedureNameTableEntry.cs index b52550d..88f2456 100644 --- a/LinearExecutable/ImportProcedureNameTableEntry.cs +++ b/LinearExecutable/ImportProcedureNameTableEntry.cs @@ -41,10 +41,6 @@ /// This is a variable length string with it's length defined in bytes by /// the LEN field. The string is case sensitive and is not null terminated. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif } } diff --git a/LinearExecutable/InformationBlock.cs b/LinearExecutable/InformationBlock.cs index 3defb14..b294ff8 100644 --- a/LinearExecutable/InformationBlock.cs +++ b/LinearExecutable/InformationBlock.cs @@ -21,11 +21,7 @@ /// The signature word is used by the loader to identify the EXE /// file as a valid 32-bit Linear Executable Module Format. /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Byte Ordering. diff --git a/LinearExecutable/NonResidentNamesTableEntry.cs b/LinearExecutable/NonResidentNamesTableEntry.cs index 2a5aefd..c185a0c 100644 --- a/LinearExecutable/NonResidentNamesTableEntry.cs +++ b/LinearExecutable/NonResidentNamesTableEntry.cs @@ -48,11 +48,7 @@ /// This is a variable length string with it's length defined in bytes by the LEN field. /// The string is case case sensitive and is not null terminated. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Ordinal number. diff --git a/LinearExecutable/ResidentNamesTableEntry.cs b/LinearExecutable/ResidentNamesTableEntry.cs index d52ba48..0df5e0b 100644 --- a/LinearExecutable/ResidentNamesTableEntry.cs +++ b/LinearExecutable/ResidentNamesTableEntry.cs @@ -48,11 +48,7 @@ /// This is a variable length string with it's length defined in bytes by the LEN field. /// The string is case case sensitive and is not null terminated. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Ordinal number. diff --git a/Listrom/MetadataFile.cs b/Listrom/MetadataFile.cs index 0982af4..018e017 100644 --- a/Listrom/MetadataFile.cs +++ b/Listrom/MetadataFile.cs @@ -2,20 +2,12 @@ namespace SabreTools.Models.Listrom { public class MetadataFile { -#if NET48 - public Set[] Set { get; set; } -#else public Set[]? Set { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listrom/Row.cs b/Listrom/Row.cs index 0f0bcc2..4f3dce9 100644 --- a/Listrom/Row.cs +++ b/Listrom/Row.cs @@ -15,37 +15,17 @@ namespace SabreTools.Models.Listrom public class Row { [Required] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif public bool Bad { get; set; } -#if NET48 - public string CRC { get; set; } -#else public string? CRC { get; set; } -#endif -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif public bool NoGoodDumpKnown { get; set; } } diff --git a/Listrom/Set.cs b/Listrom/Set.cs index 16c7d72..2d5eaa9 100644 --- a/Listrom/Set.cs +++ b/Listrom/Set.cs @@ -12,22 +12,10 @@ namespace SabreTools.Models.Listrom /// public class Set { -#if NET48 - public string Driver { get; set; } -#else public string? Driver { get; set; } -#endif -#if NET48 - public string Device { get; set; } -#else public string? Device { get; set; } -#endif -#if NET48 - public Row[] Row { get; set; } -#else public Row[]? Row { get; set; } -#endif } } \ No newline at end of file diff --git a/Listxml/Adjuster.cs b/Listxml/Adjuster.cs index 7ee9406..f5d6de1 100644 --- a/Listxml/Adjuster.cs +++ b/Listxml/Adjuster.cs @@ -8,44 +8,24 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif [XmlElement("condition")] -#if NET48 - public Condition Condition { get; set; } -#else public Condition? Condition { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Analog.cs b/Listxml/Analog.cs index 3aed8d7..1effbaf 100644 --- a/Listxml/Analog.cs +++ b/Listxml/Analog.cs @@ -8,29 +8,17 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("mask")] -#if NET48 - public string Mask { get; set; } -#else public string? Mask { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/BiosSet.cs b/Listxml/BiosSet.cs index e558b7b..51dc9e3 100644 --- a/Listxml/BiosSet.cs +++ b/Listxml/BiosSet.cs @@ -8,45 +8,25 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("description")] -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Chip.cs b/Listxml/Chip.cs index 39fe153..dc722b8 100644 --- a/Listxml/Chip.cs +++ b/Listxml/Chip.cs @@ -8,60 +8,32 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("tag")] -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif /// (cpu|audio) [Required] [XmlAttribute("type")] -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif /// Only present in older versions [XmlAttribute("soundonly")] -#if NET48 - public string SoundOnly { get; set; } -#else public string? SoundOnly { get; set; } -#endif [XmlAttribute("clock")] -#if NET48 - public string Clock { get; set; } -#else public string? Clock { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Condition.cs b/Listxml/Condition.cs index cdf4b7a..ddf02c6 100644 --- a/Listxml/Condition.cs +++ b/Listxml/Condition.cs @@ -8,54 +8,30 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("tag")] -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif [Required] [XmlAttribute("mask")] -#if NET48 - public string Mask { get; set; } -#else public string? Mask { get; set; } -#endif /// (eq|ne|gt|le|lt|ge) [Required] [XmlAttribute("relation")] -#if NET48 - public string Relation { get; set; } -#else public string? Relation { get; set; } -#endif [Required] [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/ConfLocation.cs b/Listxml/ConfLocation.cs index d71dd9c..9199c71 100644 --- a/Listxml/ConfLocation.cs +++ b/Listxml/ConfLocation.cs @@ -8,46 +8,26 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// Numeric? [Required] [XmlAttribute("number")] -#if NET48 - public string Number { get; set; } -#else public string? Number { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("inverted")] -#if NET48 - public string Inverted { get; set; } -#else public string? Inverted { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/ConfSetting.cs b/Listxml/ConfSetting.cs index 1393e06..2d3d972 100644 --- a/Listxml/ConfSetting.cs +++ b/Listxml/ConfSetting.cs @@ -8,52 +8,28 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif [XmlElement("condition")] -#if NET48 - public Condition Condition { get; set; } -#else public Condition? Condition { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Configuration.cs b/Listxml/Configuration.cs index cdf4f8c..1871ad7 100644 --- a/Listxml/Configuration.cs +++ b/Listxml/Configuration.cs @@ -8,65 +8,33 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("tag")] -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif [XmlAttribute("mask")] -#if NET48 - public string Mask { get; set; } -#else public string? Mask { get; set; } -#endif [XmlElement("condition")] -#if NET48 - public Condition Condition { get; set; } -#else public Condition? Condition { get; set; } -#endif [XmlElement("conflocation")] -#if NET48 - public ConfLocation[] ConfLocation { get; set; } -#else public ConfLocation[]? ConfLocation { get; set; } -#endif [XmlElement("confsetting")] -#if NET48 - public ConfSetting[] ConfSetting { get; set; } -#else public ConfSetting[]? ConfSetting { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Control.cs b/Listxml/Control.cs index 27bba13..c517de7 100644 --- a/Listxml/Control.cs +++ b/Listxml/Control.cs @@ -9,117 +9,61 @@ namespace SabreTools.Models.Listxml /// (joy|stick|paddle|pedal|lightgun|positional|dial|trackball|mouse|only_buttons|keypad|keyboard|mahjong|hanafuda|gambling) [Required] [XmlAttribute("type")] -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif /// Numeric [XmlAttribute("player")] -#if NET48 - public string Player { get; set; } -#else public string? Player { get; set; } -#endif /// Numeric [XmlAttribute("buttons")] -#if NET48 - public string Buttons { get; set; } -#else public string? Buttons { get; set; } -#endif /// Numeric [XmlAttribute("reqbuttons")] -#if NET48 - public string ReqButtons { get; set; } -#else public string? ReqButtons { get; set; } -#endif /// Numeric [XmlAttribute("minimum")] -#if NET48 - public string Minimum { get; set; } -#else public string? Minimum { get; set; } -#endif /// Numeric [XmlAttribute("maximum")] -#if NET48 - public string Maximum { get; set; } -#else public string? Maximum { get; set; } -#endif /// Numeric [XmlAttribute("sensitivity")] -#if NET48 - public string Sensitivity { get; set; } -#else public string? Sensitivity { get; set; } -#endif /// Numeric [XmlAttribute("keydelta")] -#if NET48 - public string KeyDelta { get; set; } -#else public string? KeyDelta { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("reverse")] -#if NET48 - public string Reverse { get; set; } -#else public string? Reverse { get; set; } -#endif /// Numeric? [XmlAttribute("ways")] -#if NET48 - public string Ways { get; set; } -#else public string? Ways { get; set; } -#endif /// Numeric? [XmlAttribute("ways2")] -#if NET48 - public string Ways2 { get; set; } -#else public string? Ways2 { get; set; } -#endif /// Numeric? [XmlAttribute("ways3")] -#if NET48 - public string Ways3 { get; set; } -#else public string? Ways3 { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Device.cs b/Listxml/Device.cs index 0736bff..ceb17d6 100644 --- a/Listxml/Device.cs +++ b/Listxml/Device.cs @@ -8,72 +8,36 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("type")] -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif [XmlAttribute("tag")] -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif [XmlAttribute("fixed_image")] -#if NET48 - public string FixedImage { get; set; } -#else public string? FixedImage { get; set; } -#endif /// Numeric boolean [XmlAttribute("mandatory")] -#if NET48 - public string Mandatory { get; set; } -#else public string? Mandatory { get; set; } -#endif [XmlAttribute("interface")] -#if NET48 - public string Interface { get; set; } -#else public string? Interface { get; set; } -#endif [XmlElement("instance")] -#if NET48 - public Instance Instance { get; set; } -#else public Instance? Instance { get; set; } -#endif [XmlElement("extension")] -#if NET48 - public Extension[] Extension { get; set; } -#else public Extension[]? Extension { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/DeviceRef.cs b/Listxml/DeviceRef.cs index 65457c5..f9b5d8c 100644 --- a/Listxml/DeviceRef.cs +++ b/Listxml/DeviceRef.cs @@ -8,29 +8,17 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/DipLocation.cs b/Listxml/DipLocation.cs index 502efbf..adb628d 100644 --- a/Listxml/DipLocation.cs +++ b/Listxml/DipLocation.cs @@ -8,46 +8,26 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// Numeric? [Required] [XmlAttribute("number")] -#if NET48 - public string Number { get; set; } -#else public string? Number { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("inverted")] -#if NET48 - public string Inverted { get; set; } -#else public string? Inverted { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/DipSwitch.cs b/Listxml/DipSwitch.cs index 4d1d870..13ab0d9 100644 --- a/Listxml/DipSwitch.cs +++ b/Listxml/DipSwitch.cs @@ -8,65 +8,33 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("tag")] -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif [XmlAttribute("mask")] -#if NET48 - public string Mask { get; set; } -#else public string? Mask { get; set; } -#endif [XmlElement("condition")] -#if NET48 - public Condition Condition { get; set; } -#else public Condition? Condition { get; set; } -#endif [XmlElement("diplocation")] -#if NET48 - public DipLocation[] DipLocation { get; set; } -#else public DipLocation[]? DipLocation { get; set; } -#endif [XmlElement("dipvalue")] -#if NET48 - public DipValue[] DipValue { get; set; } -#else public DipValue[]? DipValue { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/DipValue.cs b/Listxml/DipValue.cs index cf2828c..e48a983 100644 --- a/Listxml/DipValue.cs +++ b/Listxml/DipValue.cs @@ -8,52 +8,28 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif [XmlElement("condition")] -#if NET48 - public Condition Condition { get; set; } -#else public Condition? Condition { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Disk.cs b/Listxml/Disk.cs index e40a705..bd979a9 100644 --- a/Listxml/Disk.cs +++ b/Listxml/Disk.cs @@ -8,90 +8,46 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// Only present in older versions [XmlAttribute("md5")] -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif [XmlAttribute("sha1")] -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif [XmlAttribute("merge")] -#if NET48 - public string Merge { get; set; } -#else public string? Merge { get; set; } -#endif [XmlAttribute("region")] -#if NET48 - public string Region { get; set; } -#else public string? Region { get; set; } -#endif /// Numeric? [XmlAttribute("index")] -#if NET48 - public string Index { get; set; } -#else public string? Index { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("writable")] -#if NET48 - public string Writable { get; set; } -#else public string? Writable { get; set; } -#endif /// (baddump|nodump|good) "good" [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("optional")] -#if NET48 - public string Optional { get; set; } -#else public string? Optional { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Display.cs b/Listxml/Display.cs index 708fed8..1763d7f 100644 --- a/Listxml/Display.cs +++ b/Listxml/Display.cs @@ -7,135 +7,71 @@ namespace SabreTools.Models.Listxml public class Display { [XmlAttribute("tag")] -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif /// (raster|vector|lcd|svg|unknown) [Required] [XmlAttribute("type")] -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif /// (0|90|180|270) [XmlAttribute("rotate")] -#if NET48 - public string Rotate { get; set; } -#else public string? Rotate { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("flipx")] -#if NET48 - public string FlipX { get; set; } -#else public string? FlipX { get; set; } -#endif /// Numeric [XmlAttribute("width")] -#if NET48 - public string Width { get; set; } -#else public string? Width { get; set; } -#endif /// Numeric [XmlAttribute("height")] -#if NET48 - public string Height { get; set; } -#else public string? Height { get; set; } -#endif /// Numeric [Required] [XmlAttribute("refresh")] -#if NET48 - public string Refresh { get; set; } -#else public string? Refresh { get; set; } -#endif /// Numeric [XmlAttribute("pixclock")] -#if NET48 - public string PixClock { get; set; } -#else public string? PixClock { get; set; } -#endif /// Numeric [XmlAttribute("htotal")] -#if NET48 - public string HTotal { get; set; } -#else public string? HTotal { get; set; } -#endif /// Numeric [XmlAttribute("hbend")] -#if NET48 - public string HBEnd { get; set; } -#else public string? HBEnd { get; set; } -#endif /// Numeric [XmlAttribute("hbstart")] -#if NET48 - public string HBStart { get; set; } -#else public string? HBStart { get; set; } -#endif /// Numeric [XmlAttribute("vtotal")] -#if NET48 - public string VTotal { get; set; } -#else public string? VTotal { get; set; } -#endif /// Numeric [XmlAttribute("vbend")] -#if NET48 - public string VBEnd { get; set; } -#else public string? VBEnd { get; set; } -#endif /// Numeric [XmlAttribute("vbstart")] -#if NET48 - public string VBStart { get; set; } -#else public string? VBStart { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Driver.cs b/Listxml/Driver.cs index d763f66..e448001 100644 --- a/Listxml/Driver.cs +++ b/Listxml/Driver.cs @@ -9,112 +9,60 @@ namespace SabreTools.Models.Listxml /// (good|imperfect|preliminary), (good|preliminary|test) in older versions [Required] [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// (good|imperfect|preliminary), Only present in older versions [XmlAttribute("color")] -#if NET48 - public string Color { get; set; } -#else public string? Color { get; set; } -#endif /// (good|imperfect|preliminary), Only present in older versions [XmlAttribute("sound")] -#if NET48 - public string Sound { get; set; } -#else public string? Sound { get; set; } -#endif /// Only present in older versions [XmlAttribute("palettesize")] -#if NET48 - public string PaletteSize { get; set; } -#else public string? PaletteSize { get; set; } -#endif /// (good|imperfect|preliminary) [Required] [XmlAttribute("emulation")] -#if NET48 - public string Emulation { get; set; } -#else public string? Emulation { get; set; } -#endif /// (good|imperfect|preliminary) [Required] [XmlAttribute("cocktail")] -#if NET48 - public string Cocktail { get; set; } -#else public string? Cocktail { get; set; } -#endif /// (supported|unsupported) [Required] [XmlAttribute("savestate")] -#if NET48 - public string SaveState { get; set; } -#else public string? SaveState { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("requiresartwork")] -#if NET48 - public string RequiresArtwork { get; set; } -#else public string? RequiresArtwork { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("unofficial")] -#if NET48 - public string Unofficial { get; set; } -#else public string? Unofficial { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("nosoundhardware")] -#if NET48 - public string NoSoundHardware { get; set; } -#else public string? NoSoundHardware { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("incomplete")] -#if NET48 - public string Incomplete { get; set; } -#else public string? Incomplete { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Extension.cs b/Listxml/Extension.cs index 942308f..a73f490 100644 --- a/Listxml/Extension.cs +++ b/Listxml/Extension.cs @@ -8,29 +8,17 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Feature.cs b/Listxml/Feature.cs index 6f2f49d..9610218 100644 --- a/Listxml/Feature.cs +++ b/Listxml/Feature.cs @@ -9,45 +9,25 @@ namespace SabreTools.Models.Listxml /// (protection|timing|graphics|palette|sound|capture|camera|microphone|controls|keyboard|mouse|media|disk|printer|tape|punch|drum|rom|comms|lan|wan) [Required] [XmlAttribute("type")] -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif /// (unemulated|imperfect) [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// (unemulated|imperfect) [XmlAttribute("overall")] -#if NET48 - public string Overall { get; set; } -#else public string? Overall { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/GameBase.cs b/Listxml/GameBase.cs index a238fee..cbb7444 100644 --- a/Listxml/GameBase.cs +++ b/Listxml/GameBase.cs @@ -10,261 +10,121 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// Machine only [XmlAttribute("sourcefile")] -#if NET48 - public string SourceFile { get; set; } -#else public string? SourceFile { get; set; } -#endif /// (yes|no) "no", Machine only [XmlAttribute("isbios")] -#if NET48 - public string IsBios { get; set; } -#else public string? IsBios { get; set; } -#endif /// (yes|no) "no", Machine only [XmlAttribute("isdevice")] -#if NET48 - public string IsDevice { get; set; } -#else public string? IsDevice { get; set; } -#endif /// (yes|no) "no", Machine only [XmlAttribute("ismechanical")] -#if NET48 - public string IsMechanical { get; set; } -#else public string? IsMechanical { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("runnable")] -#if NET48 - public string Runnable { get; set; } -#else public string? Runnable { get; set; } -#endif [XmlAttribute("cloneof")] -#if NET48 - public string CloneOf { get; set; } -#else public string? CloneOf { get; set; } -#endif [XmlAttribute("romof")] -#if NET48 - public string RomOf { get; set; } -#else public string? RomOf { get; set; } -#endif [XmlAttribute("sampleof")] -#if NET48 - public string SampleOf { get; set; } -#else public string? SampleOf { get; set; } -#endif [Required] [XmlElement("description")] -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif [XmlElement("year")] -#if NET48 - public string Year { get; set; } -#else public string? Year { get; set; } -#endif [XmlElement("manufacturer")] -#if NET48 - public string Manufacturer { get; set; } -#else public string? Manufacturer { get; set; } -#endif /// Game only [XmlElement("history")] -#if NET48 - public string History { get; set; } -#else public string? History { get; set; } -#endif [XmlElement("biosset")] -#if NET48 - public BiosSet[] BiosSet { get; set; } -#else public BiosSet[]? BiosSet { get; set; } -#endif [XmlElement("rom")] -#if NET48 - public Rom[] Rom { get; set; } -#else public Rom[]? Rom { get; set; } -#endif [XmlElement("disk")] -#if NET48 - public Disk[] Disk { get; set; } -#else public Disk[]? Disk { get; set; } -#endif [XmlElement("device_ref")] -#if NET48 - public DeviceRef[] DeviceRef { get; set; } -#else public DeviceRef[]? DeviceRef { get; set; } -#endif [XmlElement("sample")] -#if NET48 - public Sample[] Sample { get; set; } -#else public Sample[]? Sample { get; set; } -#endif [XmlElement("chip")] -#if NET48 - public Chip[] Chip { get; set; } -#else public Chip[]? Chip { get; set; } -#endif [XmlElement("display")] -#if NET48 - public Display[] Display { get; set; } -#else public Display[]? Display { get; set; } -#endif /// Only present in older versions [XmlElement("video")] -#if NET48 - public Video[] Video { get; set; } -#else public Video[]? Video { get; set; } -#endif [XmlElement("sound")] -#if NET48 - public Sound Sound { get; set; } -#else public Sound? Sound { get; set; } -#endif [XmlElement("input")] -#if NET48 - public Input Input { get; set; } -#else public Input? Input { get; set; } -#endif [XmlElement("dipswitch")] -#if NET48 - public DipSwitch[] DipSwitch { get; set; } -#else public DipSwitch[]? DipSwitch { get; set; } -#endif [XmlElement("configuration")] -#if NET48 - public Configuration[] Configuration { get; set; } -#else public Configuration[]? Configuration { get; set; } -#endif [XmlElement("port")] -#if NET48 - public Port[] Port { get; set; } -#else public Port[]? Port { get; set; } -#endif [XmlElement("adjuster")] -#if NET48 - public Adjuster[] Adjuster { get; set; } -#else public Adjuster[]? Adjuster { get; set; } -#endif [XmlElement("driver")] -#if NET48 - public Driver Driver { get; set; } -#else public Driver? Driver { get; set; } -#endif [XmlElement("feature")] -#if NET48 - public Feature[] Feature { get; set; } -#else public Feature[]? Feature { get; set; } -#endif [XmlElement("device")] -#if NET48 - public Device[] Device { get; set; } -#else public Device[]? Device { get; set; } -#endif [XmlElement("slot")] -#if NET48 - public Slot[] Slot { get; set; } -#else public Slot[]? Slot { get; set; } -#endif [XmlElement("softwarelist")] -#if NET48 - public SoftwareList[] SoftwareList { get; set; } -#else public SoftwareList[]? SoftwareList { get; set; } -#endif [XmlElement("ramoption")] -#if NET48 - public RamOption[] RamOption { get; set; } -#else public RamOption[]? RamOption { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Input.cs b/Listxml/Input.cs index e8eaf41..26a76c1 100644 --- a/Listxml/Input.cs +++ b/Listxml/Input.cs @@ -8,77 +8,41 @@ namespace SabreTools.Models.Listxml { /// (yes|no) "no" [XmlAttribute("service")] -#if NET48 - public string Service { get; set; } -#else public string? Service { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("tilt")] -#if NET48 - public string Tilt { get; set; } -#else public string? Tilt { get; set; } -#endif /// Numeric [Required] [XmlAttribute("players")] -#if NET48 - public string Players { get; set; } -#else public string? Players { get; set; } -#endif /// Only present in older versions [XmlAttribute("control")] -#if NET48 - public string ControlAttr { get; set; } -#else public string? ControlAttr { get; set; } -#endif /// Only present in older versions, Numeric? [XmlAttribute("buttons")] -#if NET48 - public string Buttons { get; set; } -#else public string? Buttons { get; set; } -#endif /// Numeric? [XmlAttribute("coins")] -#if NET48 - public string Coins { get; set; } -#else public string? Coins { get; set; } -#endif [XmlElement("control")] -#if NET48 - public Control[] Control { get; set; } -#else public Control[]? Control { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Instance.cs b/Listxml/Instance.cs index 3557626..9711a79 100644 --- a/Listxml/Instance.cs +++ b/Listxml/Instance.cs @@ -8,37 +8,21 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("briefname")] -#if NET48 - public string BriefName { get; set; } -#else public string? BriefName { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/M1.cs b/Listxml/M1.cs index e199b01..a5529ad 100644 --- a/Listxml/M1.cs +++ b/Listxml/M1.cs @@ -7,37 +7,21 @@ namespace SabreTools.Models.Listxml public class M1 { [XmlAttribute("version")] -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif [XmlElement("machine", typeof(Machine))] [XmlElement("game", typeof(Game))] -#if NET48 - public GameBase[] Game { get; set; } -#else public GameBase[]? Game { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Mame.cs b/Listxml/Mame.cs index 5a77a59..00117be 100644 --- a/Listxml/Mame.cs +++ b/Listxml/Mame.cs @@ -7,53 +7,29 @@ namespace SabreTools.Models.Listxml public class Mame { [XmlAttribute("build")] -#if NET48 - public string Build { get; set; } -#else public string? Build { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("debug")] -#if NET48 - public string Debug { get; set; } -#else public string? Debug { get; set; } -#endif [Required] [XmlAttribute("mameconfig")] -#if NET48 - public string MameConfig { get; set; } -#else public string? MameConfig { get; set; } -#endif [XmlElement("machine", typeof(Machine))] [XmlElement("game", typeof(Game))] -#if NET48 - public GameBase[] Game { get; set; } -#else public GameBase[]? Game { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Port.cs b/Listxml/Port.cs index 9022613..fe4a6c6 100644 --- a/Listxml/Port.cs +++ b/Listxml/Port.cs @@ -8,36 +8,20 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("tag")] -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif [XmlElement("analog")] -#if NET48 - public Analog[] Analog { get; set; } -#else public Analog[]? Analog { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/RamOption.cs b/Listxml/RamOption.cs index 914508e..a6a7603 100644 --- a/Listxml/RamOption.cs +++ b/Listxml/RamOption.cs @@ -8,43 +8,23 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif [XmlText] -#if NET48 - public string Content { get; set; } -#else public string? Content { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Rom.cs b/Listxml/Rom.cs index d6cb535..9f978fe 100644 --- a/Listxml/Rom.cs +++ b/Listxml/Rom.cs @@ -8,113 +8,57 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("bios")] -#if NET48 - public string Bios { get; set; } -#else public string? Bios { get; set; } -#endif /// Numeric [Required] [XmlAttribute("size")] -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif [XmlAttribute("crc")] -#if NET48 - public string CRC { get; set; } -#else public string? CRC { get; set; } -#endif [XmlAttribute("sha1")] -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif [XmlAttribute("merge")] -#if NET48 - public string Merge { get; set; } -#else public string? Merge { get; set; } -#endif [XmlAttribute("region")] -#if NET48 - public string Region { get; set; } -#else public string? Region { get; set; } -#endif /// Numeric [XmlAttribute("offset")] -#if NET48 - public string Offset { get; set; } -#else public string? Offset { get; set; } -#endif /// (baddump|nodump|good) "good" [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("optional")] -#if NET48 - public string Optional { get; set; } -#else public string? Optional { get; set; } -#endif /// (yes|no) "no", Only present in older versions [XmlAttribute("dispose")] -#if NET48 - public string Dispose { get; set; } -#else public string? Dispose { get; set; } -#endif /// (yes|no) "no", Only present in older versions [XmlAttribute("soundonly")] -#if NET48 - public string SoundOnly { get; set; } -#else public string? SoundOnly { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Sample.cs b/Listxml/Sample.cs index b0f6fd0..fdfd56b 100644 --- a/Listxml/Sample.cs +++ b/Listxml/Sample.cs @@ -8,29 +8,17 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Slot.cs b/Listxml/Slot.cs index 3dde2a7..945194a 100644 --- a/Listxml/Slot.cs +++ b/Listxml/Slot.cs @@ -8,36 +8,20 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlElement("slotoption")] -#if NET48 - public SlotOption[] SlotOption { get; set; } -#else public SlotOption[]? SlotOption { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/SlotOption.cs b/Listxml/SlotOption.cs index 72207e1..b47b827 100644 --- a/Listxml/SlotOption.cs +++ b/Listxml/SlotOption.cs @@ -8,45 +8,25 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("devname")] -#if NET48 - public string DevName { get; set; } -#else public string? DevName { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/SoftwareList.cs b/Listxml/SoftwareList.cs index 8da678e..7ae155b 100644 --- a/Listxml/SoftwareList.cs +++ b/Listxml/SoftwareList.cs @@ -8,53 +8,29 @@ namespace SabreTools.Models.Listxml { [Required] [XmlAttribute("tag")] -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// (original|compatible) [Required] [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif [XmlAttribute("filter")] -#if NET48 - public string Filter { get; set; } -#else public string? Filter { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Sound.cs b/Listxml/Sound.cs index 3825291..5b6c25d 100644 --- a/Listxml/Sound.cs +++ b/Listxml/Sound.cs @@ -9,29 +9,17 @@ namespace SabreTools.Models.Listxml /// Numeric [Required] [XmlAttribute("channels")] -#if NET48 - public string Channels { get; set; } -#else public string? Channels { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Listxml/Video.cs b/Listxml/Video.cs index 63d6e61..f50d399 100644 --- a/Listxml/Video.cs +++ b/Listxml/Video.cs @@ -9,78 +9,42 @@ namespace SabreTools.Models.Listxml /// (raster|vector) [Required] [XmlAttribute("screen")] -#if NET48 - public string Screen { get; set; } -#else public string? Screen { get; set; } -#endif /// (vertical|horizontal) [Required] [XmlAttribute("orientation")] -#if NET48 - public string Orientation { get; set; } -#else public string? Orientation { get; set; } -#endif /// Numeric [XmlAttribute("width")] -#if NET48 - public string Width { get; set; } -#else public string? Width { get; set; } -#endif /// Numeric [XmlAttribute("height")] -#if NET48 - public string Height { get; set; } -#else public string? Height { get; set; } -#endif /// Numeric [XmlAttribute("aspectx")] -#if NET48 - public string AspectX { get; set; } -#else public string? AspectX { get; set; } -#endif /// Numeric [XmlAttribute("aspecty")] -#if NET48 - public string AspectY { get; set; } -#else public string? AspectY { get; set; } -#endif /// Numeric [XmlAttribute("refresh")] -#if NET48 - public string Refresh { get; set; } -#else public string? Refresh { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Archive.cs b/Logiqx/Archive.cs index ad3e7f5..60889b0 100644 --- a/Logiqx/Archive.cs +++ b/Logiqx/Archive.cs @@ -8,29 +8,17 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/BiosSet.cs b/Logiqx/BiosSet.cs index d6d2221..2695739 100644 --- a/Logiqx/BiosSet.cs +++ b/Logiqx/BiosSet.cs @@ -8,45 +8,25 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("description")] -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/ClrMamePro.cs b/Logiqx/ClrMamePro.cs index 368f07a..d20b197 100644 --- a/Logiqx/ClrMamePro.cs +++ b/Logiqx/ClrMamePro.cs @@ -7,53 +7,29 @@ namespace SabreTools.Models.Logiqx public class ClrMamePro { [XmlAttribute("header")] -#if NET48 - public string Header { get; set; } -#else public string? Header { get; set; } -#endif /// (none|split|merged|nonmerged|fullmerged|device|full) "split" [XmlAttribute("forcemerging")] -#if NET48 - public string ForceMerging { get; set; } -#else public string? ForceMerging { get; set; } -#endif /// (obsolete|required|ignore) "obsolete" [XmlAttribute("forcenodump")] -#if NET48 - public string ForceNodump { get; set; } -#else public string? ForceNodump { get; set; } -#endif /// (zip|unzip) "zip" [XmlAttribute("forcepacking")] -#if NET48 - public string ForcePacking { get; set; } -#else public string? ForcePacking { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Datafile.cs b/Logiqx/Datafile.cs index 8a94a8d..220c170 100644 --- a/Logiqx/Datafile.cs +++ b/Logiqx/Datafile.cs @@ -7,68 +7,36 @@ namespace SabreTools.Models.Logiqx public class Datafile { [XmlAttribute("build")] -#if NET48 - public string Build { get; set; } -#else public string? Build { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("debug")] -#if NET48 - public string Debug { get; set; } -#else public string? Debug { get; set; } -#endif /// No-Intro extension [XmlAttribute(Namespace = "http://www.w3.org/2001/XMLSchema-instance", AttributeName = "schemaLocation")] -#if NET48 - public string SchemaLocation { get; set; } -#else public string? SchemaLocation { get; set; } -#endif [XmlElement("header")] -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif [XmlElement("game", typeof(Game))] [XmlElement("machine", typeof(Machine))] -#if NET48 - public GameBase[] Game { get; set; } -#else public GameBase[]? Game { get; set; } -#endif /// RomVault extension [XmlElement("dir")] -#if NET48 - public Dir[] Dir { get; set; } -#else public Dir[]? Dir { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/DeviceRef.cs b/Logiqx/DeviceRef.cs index 4ce528e..7d6ae1b 100644 --- a/Logiqx/DeviceRef.cs +++ b/Logiqx/DeviceRef.cs @@ -8,29 +8,17 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Dir.cs b/Logiqx/Dir.cs index ebee76e..75418ec 100644 --- a/Logiqx/Dir.cs +++ b/Logiqx/Dir.cs @@ -8,37 +8,21 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlElement("game", typeof(Game))] [XmlElement("machine", typeof(Machine))] -#if NET48 - public GameBase[] Game { get; set; } -#else public GameBase[]? Game { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Disk.cs b/Logiqx/Disk.cs index 8583d5a..957ff81 100644 --- a/Logiqx/Disk.cs +++ b/Logiqx/Disk.cs @@ -8,66 +8,34 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("md5")] -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif [XmlAttribute("sha1")] -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif [XmlAttribute("merge")] -#if NET48 - public string Merge { get; set; } -#else public string? Merge { get; set; } -#endif /// (baddump|nodump|good|verified) "good" [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// MAME extension [XmlAttribute("region")] -#if NET48 - public string Region { get; set; } -#else public string? Region { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Driver.cs b/Logiqx/Driver.cs index 2ff2e17..823605c 100644 --- a/Logiqx/Driver.cs +++ b/Logiqx/Driver.cs @@ -9,88 +9,48 @@ namespace SabreTools.Models.Logiqx /// (good|imperfect|preliminary) [Required] [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// (good|imperfect|preliminary) [Required] [XmlAttribute("emulation")] -#if NET48 - public string Emulation { get; set; } -#else public string? Emulation { get; set; } -#endif /// (good|imperfect|preliminary) [Required] [XmlAttribute("cocktail")] -#if NET48 - public string Cocktail { get; set; } -#else public string? Cocktail { get; set; } -#endif /// (supported|unsupported) [Required] [XmlAttribute("savestate")] -#if NET48 - public string SaveState { get; set; } -#else public string? SaveState { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("requiresartwork")] -#if NET48 - public string RequiresArtwork { get; set; } -#else public string? RequiresArtwork { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("unofficial")] -#if NET48 - public string Unofficial { get; set; } -#else public string? Unofficial { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("nosoundhardware")] -#if NET48 - public string NoSoundHardware { get; set; } -#else public string? NoSoundHardware { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("incomplete")] -#if NET48 - public string Incomplete { get; set; } -#else public string? Incomplete { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/GameBase.cs b/Logiqx/GameBase.cs index b4cbd88..cdaf240 100644 --- a/Logiqx/GameBase.cs +++ b/Logiqx/GameBase.cs @@ -10,245 +10,117 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("sourcefile")] -#if NET48 - public string SourceFile { get; set; } -#else public string? SourceFile { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("isbios")] -#if NET48 - public string IsBios { get; set; } -#else public string? IsBios { get; set; } -#endif /// (yes|no) "no", MAME extension [XmlAttribute("isdevice")] -#if NET48 - public string IsDevice { get; set; } -#else public string? IsDevice { get; set; } -#endif /// (yes|no) "no", MAME extension [XmlAttribute("ismechanical")] -#if NET48 - public string IsMechanical { get; set; } -#else public string? IsMechanical { get; set; } -#endif [XmlAttribute("cloneof")] -#if NET48 - public string CloneOf { get; set; } -#else public string? CloneOf { get; set; } -#endif [XmlAttribute("romof")] -#if NET48 - public string RomOf { get; set; } -#else public string? RomOf { get; set; } -#endif [XmlAttribute("sampleof")] -#if NET48 - public string SampleOf { get; set; } -#else public string? SampleOf { get; set; } -#endif [XmlAttribute("board")] -#if NET48 - public string Board { get; set; } -#else public string? Board { get; set; } -#endif [XmlAttribute("rebuildto")] -#if NET48 - public string RebuildTo { get; set; } -#else public string? RebuildTo { get; set; } -#endif /// No-Intro extension [XmlAttribute("id")] -#if NET48 - public string Id { get; set; } -#else public string? Id { get; set; } -#endif /// No-Intro extension [XmlAttribute("cloneofid")] -#if NET48 - public string CloneOfId { get; set; } -#else public string? CloneOfId { get; set; } -#endif /// (no|partial|yes) "no" [XmlAttribute("runnable")] -#if NET48 - public string Runnable { get; set; } -#else public string? Runnable { get; set; } -#endif [XmlElement("comment")] -#if NET48 - public string[] Comment { get; set; } -#else public string[]? Comment { get; set; } -#endif [Required] [XmlElement("description")] -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif [XmlElement("year")] -#if NET48 - public string Year { get; set; } -#else public string? Year { get; set; } -#endif [XmlElement("manufacturer")] -#if NET48 - public string Manufacturer { get; set; } -#else public string? Manufacturer { get; set; } -#endif [XmlElement("publisher")] -#if NET48 - public string Publisher { get; set; } -#else public string? Publisher { get; set; } -#endif /// No-Intro extension includes more than 1 instance [XmlElement("category")] -#if NET48 - public string[] Category { get; set; } -#else public string[]? Category { get; set; } -#endif /// Trurip extension [XmlElement("trurip")] -#if NET48 - public Trurip Trurip { get; set; } -#else public Trurip? Trurip { get; set; } -#endif [XmlElement(elementName: "release")] -#if NET48 - public Release[] Release { get; set; } -#else public Release[]? Release { get; set; } -#endif [XmlElement("biosset")] -#if NET48 - public BiosSet[] BiosSet { get; set; } -#else public BiosSet[]? BiosSet { get; set; } -#endif [XmlElement("rom")] -#if NET48 - public Rom[] Rom { get; set; } -#else public Rom[]? Rom { get; set; } -#endif [XmlElement("disk")] -#if NET48 - public Disk[] Disk { get; set; } -#else public Disk[]? Disk { get; set; } -#endif /// Aaru extension [XmlElement("media")] -#if NET48 - public Media[] Media { get; set; } -#else public Media[]? Media { get; set; } -#endif /// MAME extension [XmlElement("device_ref")] -#if NET48 - public DeviceRef[] DeviceRef { get; set; } -#else public DeviceRef[]? DeviceRef { get; set; } -#endif [XmlElement("sample")] -#if NET48 - public Sample[] Sample { get; set; } -#else public Sample[]? Sample { get; set; } -#endif [XmlElement("archive")] -#if NET48 - public Archive[] Archive { get; set; } -#else public Archive[]? Archive { get; set; } -#endif /// MAME extension [XmlElement("driver")] -#if NET48 - public Driver Driver { get; set; } -#else public Driver? Driver { get; set; } -#endif /// MAME extension [XmlElement("softwarelist")] -#if NET48 - public SoftwareList[] SoftwareList { get; set; } -#else public SoftwareList[]? SoftwareList { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Header.cs b/Logiqx/Header.cs index 189ac46..8dd020b 100644 --- a/Logiqx/Header.cs +++ b/Logiqx/Header.cs @@ -8,133 +8,65 @@ namespace SabreTools.Models.Logiqx { /// No-Intro extension [XmlElement("id")] -#if NET48 - public string Id { get; set; } -#else public string? Id { get; set; } -#endif [Required] [XmlElement("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlElement("description")] -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif /// Trurip extension [XmlElement("rootdir")] -#if NET48 - public string RootDir { get; set; } -#else public string? RootDir { get; set; } -#endif [XmlElement("category")] -#if NET48 - public string Category { get; set; } -#else public string? Category { get; set; } -#endif [Required] [XmlElement("version")] -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif [XmlElement("date")] -#if NET48 - public string Date { get; set; } -#else public string? Date { get; set; } -#endif [Required] [XmlElement("author")] -#if NET48 - public string Author { get; set; } -#else public string? Author { get; set; } -#endif [XmlElement("email")] -#if NET48 - public string Email { get; set; } -#else public string? Email { get; set; } -#endif [XmlElement("homepage")] -#if NET48 - public string Homepage { get; set; } -#else public string? Homepage { get; set; } -#endif [XmlElement("url")] -#if NET48 - public string Url { get; set; } -#else public string? Url { get; set; } -#endif [XmlElement("comment")] -#if NET48 - public string Comment { get; set; } -#else public string? Comment { get; set; } -#endif /// Trurip extension [XmlElement("type")] -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif [XmlElement("clrmamepro")] -#if NET48 - public ClrMamePro ClrMamePro { get; set; } -#else public ClrMamePro? ClrMamePro { get; set; } -#endif [XmlElement("romcenter")] -#if NET48 - public RomCenter RomCenter { get; set; } -#else public RomCenter? RomCenter { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Media.cs b/Logiqx/Media.cs index d9cc99d..d13fdf7 100644 --- a/Logiqx/Media.cs +++ b/Logiqx/Media.cs @@ -8,57 +8,29 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("md5")] -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif [XmlAttribute("sha1")] -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif [XmlAttribute("sha256")] -#if NET48 - public string SHA256 { get; set; } -#else public string? SHA256 { get; set; } -#endif [XmlAttribute("spamsum")] -#if NET48 - public string SpamSum { get; set; } -#else public string? SpamSum { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Release.cs b/Logiqx/Release.cs index 932f774..b44fa76 100644 --- a/Logiqx/Release.cs +++ b/Logiqx/Release.cs @@ -8,59 +8,31 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("region")] -#if NET48 - public string Region { get; set; } -#else public string? Region { get; set; } -#endif [XmlAttribute("language")] -#if NET48 - public string Language { get; set; } -#else public string? Language { get; set; } -#endif [XmlAttribute("date")] -#if NET48 - public string Date { get; set; } -#else public string? Date { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Rom.cs b/Logiqx/Rom.cs index 3530387..6866113 100644 --- a/Logiqx/Rom.cs +++ b/Logiqx/Rom.cs @@ -8,160 +8,80 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("size")] -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif [XmlAttribute("crc")] -#if NET48 - public string CRC { get; set; } -#else public string? CRC { get; set; } -#endif [XmlAttribute("md5")] -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif [XmlAttribute("sha1")] -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif /// Hash/No-Intro extension [XmlAttribute("sha256")] -#if NET48 - public string SHA256 { get; set; } -#else public string? SHA256 { get; set; } -#endif /// Hash extension [XmlAttribute("sha384")] -#if NET48 - public string SHA384 { get; set; } -#else public string? SHA384 { get; set; } -#endif /// Hash extension [XmlAttribute("sha512")] -#if NET48 - public string SHA512 { get; set; } -#else public string? SHA512 { get; set; } -#endif /// Hash extension [XmlAttribute("spamsum")] -#if NET48 - public string SpamSum { get; set; } -#else public string? SpamSum { get; set; } -#endif /// DiscImgeCreator extension [XmlAttribute("xxh3_64")] -#if NET48 - public string xxHash364 { get; set; } -#else public string? xxHash364 { get; set; } -#endif /// DiscImgeCreator extension [XmlAttribute("xxh3_128")] -#if NET48 - public string xxHash3128 { get; set; } -#else public string? xxHash3128 { get; set; } -#endif [XmlAttribute("merge")] -#if NET48 - public string Merge { get; set; } -#else public string? Merge { get; set; } -#endif /// (baddump|nodump|good|verified) "good" [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// No-Intro extension [XmlAttribute("serial")] -#if NET48 - public string Serial { get; set; } -#else public string? Serial { get; set; } -#endif /// No-Intro extension [XmlAttribute("header")] -#if NET48 - public string Header { get; set; } -#else public string? Header { get; set; } -#endif [XmlAttribute("date")] -#if NET48 - public string Date { get; set; } -#else public string? Date { get; set; } -#endif /// Boolean; RomVault extension [XmlAttribute("inverted")] -#if NET48 - public string Inverted { get; set; } -#else public string? Inverted { get; set; } -#endif /// Boolean; RomVault extension [XmlAttribute("mia")] -#if NET48 - public string MIA { get; set; } -#else public string? MIA { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/RomCenter.cs b/Logiqx/RomCenter.cs index 93db744..2675acc 100644 --- a/Logiqx/RomCenter.cs +++ b/Logiqx/RomCenter.cs @@ -7,77 +7,41 @@ namespace SabreTools.Models.Logiqx public class RomCenter { [XmlAttribute("plugin")] -#if NET48 - public string Plugin { get; set; } -#else public string? Plugin { get; set; } -#endif /// (none|split|merged|unmerged|fullmerged|device|full) "split" [XmlAttribute("rommode")] -#if NET48 - public string RomMode { get; set; } -#else public string? RomMode { get; set; } -#endif /// (none|split|merged|unmerged|fullmerged|device|full) "split" [XmlAttribute("biosmode")] -#if NET48 - public string BiosMode { get; set; } -#else public string? BiosMode { get; set; } -#endif /// (none|split|merged|unmerged|fullmerged|device|full) "merged" [XmlAttribute("samplemode")] -#if NET48 - public string SampleMode { get; set; } -#else public string? SampleMode { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("lockrommode")] -#if NET48 - public string LockRomMode { get; set; } -#else public string? LockRomMode { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("lockbiosmode")] -#if NET48 - public string LockBiosMode { get; set; } -#else public string? LockBiosMode { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("locksamplemode")] -#if NET48 - public string LockSampleMode { get; set; } -#else public string? LockSampleMode { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Sample.cs b/Logiqx/Sample.cs index 36461cd..98901f3 100644 --- a/Logiqx/Sample.cs +++ b/Logiqx/Sample.cs @@ -8,29 +8,17 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/SoftwareList.cs b/Logiqx/SoftwareList.cs index 8debeae..36cabc8 100644 --- a/Logiqx/SoftwareList.cs +++ b/Logiqx/SoftwareList.cs @@ -8,53 +8,29 @@ namespace SabreTools.Models.Logiqx { [Required] [XmlAttribute("tag")] -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// (original|compatible) [Required] [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif [XmlAttribute("filter")] -#if NET48 - public string Filter { get; set; } -#else public string? Filter { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/Logiqx/Trurip.cs b/Logiqx/Trurip.cs index c42396a..0c69185 100644 --- a/Logiqx/Trurip.cs +++ b/Logiqx/Trurip.cs @@ -7,121 +7,57 @@ namespace SabreTools.Models.Logiqx public class Trurip { [XmlElement("titleid")] -#if NET48 - public string TitleID { get; set; } -#else public string? TitleID { get; set; } -#endif [XmlElement("publisher")] -#if NET48 - public string Publisher { get; set; } -#else public string? Publisher { get; set; } -#endif [XmlElement("developer")] -#if NET48 - public string Developer { get; set; } -#else public string? Developer { get; set; } -#endif [XmlElement("year")] -#if NET48 - public string Year { get; set; } -#else public string? Year { get; set; } -#endif [XmlElement("genre")] -#if NET48 - public string Genre { get; set; } -#else public string? Genre { get; set; } -#endif [XmlElement("subgenre")] -#if NET48 - public string Subgenre { get; set; } -#else public string? Subgenre { get; set; } -#endif [XmlElement("ratings")] -#if NET48 - public string Ratings { get; set; } -#else public string? Ratings { get; set; } -#endif [XmlElement("score")] -#if NET48 - public string Score { get; set; } -#else public string? Score { get; set; } -#endif [XmlElement("players")] -#if NET48 - public string Players { get; set; } -#else public string? Players { get; set; } -#endif /// Boolean? [XmlElement("enabled")] -#if NET48 - public string Enabled { get; set; } -#else public string? Enabled { get; set; } -#endif [XmlElement("crc")] -#if NET48 - public string CRC { get; set; } -#else public string? CRC { get; set; } -#endif [XmlElement("source")] -#if NET48 - public string Source { get; set; } -#else public string? Source { get; set; } -#endif [XmlElement("cloneof")] -#if NET48 - public string CloneOf { get; set; } -#else public string? CloneOf { get; set; } -#endif [XmlElement("relatedto")] -#if NET48 - public string RelatedTo { get; set; } -#else public string? RelatedTo { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/MSDOS/Executable.cs b/MSDOS/Executable.cs index f4aee6f..90d6008 100644 --- a/MSDOS/Executable.cs +++ b/MSDOS/Executable.cs @@ -14,11 +14,7 @@ namespace SabreTools.Models.MSDOS /// /// MS-DOS executable header /// -#if NET48 - public ExecutableHeader Header { get; set; } -#else public ExecutableHeader? Header { get; set; } -#endif /// /// After loading the executable into memory, the program loader goes through @@ -28,10 +24,6 @@ namespace SabreTools.Models.MSDOS /// make the loader add start segment address to the value at offset /// 1*0x10+0x1A=0x2A within the program data. /// -#if NET48 - public RelocationEntry[] RelocationTable { get; set; } -#else public RelocationEntry?[]? RelocationTable { get; set; } -#endif } } diff --git a/MSDOS/ExecutableHeader.cs b/MSDOS/ExecutableHeader.cs index 452775a..50d4f23 100644 --- a/MSDOS/ExecutableHeader.cs +++ b/MSDOS/ExecutableHeader.cs @@ -13,11 +13,7 @@ namespace SabreTools.Models.MSDOS /// /// 0x5A4D (ASCII for 'M' and 'Z') /// -#if NET48 - public string Magic { get; set; } -#else public string? Magic { get; set; } -#endif /// /// Number of bytes in the last page. @@ -101,11 +97,7 @@ namespace SabreTools.Models.MSDOS /// /// Reserved words /// -#if NET48 - public ushort[] Reserved1 { get; set; } = new ushort[4]; -#else public ushort[]? Reserved1 { get; set; } = new ushort[4]; -#endif /// /// Defined by name but no other information is given; typically zeroes @@ -120,11 +112,7 @@ namespace SabreTools.Models.MSDOS /// /// Reserved words /// -#if NET48 - public ushort[] Reserved2 { get; set; } = new ushort[10]; -#else public ushort[]? Reserved2 { get; set; } = new ushort[10]; -#endif /// /// Starting address of the PE header diff --git a/Metadata/DictionaryBase.cs b/Metadata/DictionaryBase.cs index 5a9fd90..cbd5c9f 100644 --- a/Metadata/DictionaryBase.cs +++ b/Metadata/DictionaryBase.cs @@ -5,36 +5,20 @@ namespace SabreTools.Models.Metadata /// /// Specialized dictionary base for item types /// -#if NET48 - public abstract class DictionaryBase : Dictionary -#else public abstract class DictionaryBase : Dictionary -#endif { /// /// Read a key as the specified type, returning null on error /// -#if NET48 - public T Read(string key) -#else public T? Read(string key) -#endif { try { if (!ValidateKey(key)) return default; -#if NET48 - if (!(this[key] is T)) -#else if (this[key] is not T) -#endif return default; -#if NET48 - return (T)this[key]; -#else return (T?)this[key]; -#endif } catch { @@ -54,15 +38,6 @@ namespace SabreTools.Models.Metadata if (asBool != null) return asBool; -#if NET48 - string asString = Read(key); - switch (asString?.ToLowerInvariant()) - { - case "true": case "yes": return true; - case "false": case "no": return false; - default: return null; - } -#else string? asString = Read(key); return asString?.ToLowerInvariant() switch { @@ -70,7 +45,6 @@ namespace SabreTools.Models.Metadata "false" or "no" => false, _ => null, }; -#endif } /// @@ -85,11 +59,7 @@ namespace SabreTools.Models.Metadata if (asDouble != null) return asDouble; -#if NET48 - string asString = Read(key); -#else string? asString = Read(key); -#endif if (asString != null && double.TryParse(asString, out double asStringDouble)) return asStringDouble; @@ -109,11 +79,7 @@ namespace SabreTools.Models.Metadata if (asLong != null) return asLong; -#if NET48 - string asString = Read(key); -#else string? asString = Read(key); -#endif if (asString != null && long.TryParse(asString, out long asStringLong)) return asStringLong; @@ -123,76 +89,46 @@ namespace SabreTools.Models.Metadata /// /// Read a key as a string, returning null on error /// -#if NET48 - public string ReadString(string key) -#else public string? ReadString(string key) -#endif { if (!ValidateKey(key)) return null; -#if NET48 - string asString = Read(key); -#else string? asString = Read(key); -#endif if (asString != null) return asString; -#if NET48 - string[] asArray = Read(key); - if (asArray != null) - return string.Join(",", asArray); -#else string[]? asArray = Read(key); if (asArray != null) +#if NET48 + return string.Join(",", asArray); +#else return string.Join(',', asArray); #endif // TODO: Add byte array conversion here // TODO: Add byte array read helper -#if NET48 - return this[key].ToString(); -#else return this[key]!.ToString(); -#endif } /// /// Read a key as a string[], returning null on error /// -#if NET48 - public string[] ReadStringArray(string key) -#else public string[]? ReadStringArray(string key) -#endif { if (!ValidateKey(key)) return null; -#if NET48 - string[] asArray = Read(key); -#else string[]? asArray = Read(key); -#endif if (asArray != null) return asArray; -#if NET48 - string asString = Read(key); -#else string? asString = Read(key); -#endif if (asString != null) return new string[] { asString }; -#if NET48 - asString = this[key].ToString(); -#else asString = this[key]!.ToString(); -#endif if (asString != null) return new string[] { asString }; diff --git a/MicrosoftCabinet/CFDATA.cs b/MicrosoftCabinet/CFDATA.cs index bb3315d..0145883 100644 --- a/MicrosoftCabinet/CFDATA.cs +++ b/MicrosoftCabinet/CFDATA.cs @@ -34,11 +34,7 @@ /// and the field value is non-zero, this field contains per-datablock application information. /// This field is defined by the application, and it is used for application-defined purposes. /// -#if NET48 - public byte[] ReservedData { get; set; } -#else public byte[]? ReservedData { get; set; } -#endif /// /// The compressed data bytes, compressed by using the @@ -48,10 +44,6 @@ /// uncompressed data bytes. In this case, the and field values will be equal unless /// this CFDATA structure entry crosses a cabinet file boundary. /// -#if NET48 - public byte[] CompressedData { get; set; } -#else public byte[]? CompressedData { get; set; } -#endif } } diff --git a/MicrosoftCabinet/CFFILE.cs b/MicrosoftCabinet/CFFILE.cs index 7664b34..30b4775 100644 --- a/MicrosoftCabinet/CFFILE.cs +++ b/MicrosoftCabinet/CFFILE.cs @@ -60,10 +60,6 @@ /// CFFILE.szName field, but the _A_NAME_IS_UTF attribute is not set, the characters SHOULD be /// interpreted according to the current location. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif } } diff --git a/MicrosoftCabinet/CFFOLDER.cs b/MicrosoftCabinet/CFFOLDER.cs index e575c2d..d164b28 100644 --- a/MicrosoftCabinet/CFFOLDER.cs +++ b/MicrosoftCabinet/CFFOLDER.cs @@ -46,19 +46,11 @@ /// and the cbCFFolder field is non-zero, then this field contains per-folder application information. /// This field is defined by the application, and is used for application-defined purposes. /// -#if NET48 - public byte[] ReservedData { get; set; } -#else public byte[]? ReservedData { get; set; } -#endif /// /// Data blocks associated with this folder /// -#if NET48 - public CFDATA[] DataBlocks { get; set; } -#else public CFDATA?[]? DataBlocks { get; set; } -#endif } } diff --git a/MicrosoftCabinet/CFHEADER.cs b/MicrosoftCabinet/CFHEADER.cs index 720419b..1bf24df 100644 --- a/MicrosoftCabinet/CFHEADER.cs +++ b/MicrosoftCabinet/CFHEADER.cs @@ -11,11 +11,7 @@ /// Contains the characters "M", "S", "C", and "F" (bytes 0x4D, 0x53, 0x43, /// 0x46). This field is used to ensure that the file is a cabinet (.cab) file. /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Reserved field; MUST be set to 0 (zero). @@ -111,11 +107,7 @@ /// cbCFHeader field is non-zero, this field contains per-cabinet-file application information. This field /// is defined by the application, and is used for application-defined purposes. /// -#if NET48 - public byte[] ReservedData { get; set; } -#else public byte[]? ReservedData { get; set; } -#endif /// /// If the flags.cfhdrPREV_CABINET field is not set, this @@ -127,11 +119,7 @@ /// reported to begin in the "previous cabinet," the szCabinetPrev field would indicate the name of the /// cabinet to examine. /// -#if NET48 - public string CabinetPrev { get; set; } -#else public string? CabinetPrev { get; set; } -#endif /// /// If the flags.cfhdrPREV_CABINET field is not set, then this @@ -140,11 +128,7 @@ /// This string can be used when prompting the user to insert a disk. The string can contain up to 255 /// bytes, plus the null byte. /// -#if NET48 - public string DiskPrev { get; set; } -#else public string? DiskPrev { get; set; } -#endif /// /// If the flags.cfhdrNEXT_CABINET field is not set, this @@ -152,11 +136,7 @@ /// cabinet file in a set. The string can contain up to 255 bytes, plus the null byte. Files that extend /// beyond the end of the current cabinet file are continued in the named cabinet file. /// -#if NET48 - public string CabinetNext { get; set; } -#else public string? CabinetNext { get; set; } -#endif /// /// If the flags.cfhdrNEXT_CABINET field is not set, this field is @@ -165,10 +145,6 @@ /// string can contain up to 255 bytes, plus the null byte. This string can be used when prompting the /// user to insert a disk. /// -#if NET48 - public string DiskNext { get; set; } -#else public string? DiskNext { get; set; } -#endif } } diff --git a/MicrosoftCabinet/Cabinet.cs b/MicrosoftCabinet/Cabinet.cs index 647905a..54f2d1e 100644 --- a/MicrosoftCabinet/Cabinet.cs +++ b/MicrosoftCabinet/Cabinet.cs @@ -12,28 +12,16 @@ /// /// Cabinet header /// -#if NET48 - public CFHEADER Header { get; set; } -#else public CFHEADER? Header { get; set; } -#endif /// /// One or more CFFOLDER entries /// -#if NET48 - public CFFOLDER[] Folders { get; set; } -#else public CFFOLDER?[]? Folders { get; set; } -#endif /// /// A series of one or more cabinet file (CFFILE) entries /// -#if NET48 - public CFFILE[] Files { get; set; } -#else public CFFILE?[]? Files { get; set; } -#endif } } diff --git a/MoPaQ/Archive.cs b/MoPaQ/Archive.cs index cdfe9c3..f4edee6 100644 --- a/MoPaQ/Archive.cs +++ b/MoPaQ/Archive.cs @@ -14,20 +14,12 @@ /// /// MPQ User Data (optional) /// -#if NET48 - public UserData UserData { get; set; } -#else public UserData? UserData { get; set; } -#endif /// /// MPQ Header (required) /// -#if NET48 - public ArchiveHeader ArchiveHeader { get; set; } -#else public ArchiveHeader? ArchiveHeader { get; set; } -#endif // TODO: Files (optional) // TODO: Special files (optional) @@ -35,38 +27,22 @@ /// /// HET Table (optional) /// -#if NET48 - public HetTable HetTable { get; set; } -#else public HetTable? HetTable { get; set; } -#endif /// /// BET Table (optional) /// -#if NET48 - public BetTable BetTable { get; set; } -#else public BetTable? BetTable { get; set; } -#endif /// /// Hash Table (optional) /// -#if NET48 - public HashEntry[] HashTable { get; set; } -#else public HashEntry?[]? HashTable { get; set; } -#endif /// /// Block Table (optional) /// -#if NET48 - public BlockEntry[] BlockTable { get; set; } -#else public BlockEntry?[]? BlockTable { get; set; } -#endif /// /// Hi-Block Table (optional) @@ -78,11 +54,7 @@ /// Hi-block table is plain array of 16-bit values. This table is /// not encrypted. /// -#if NET48 - public short[] HiBlockTable { get; set; } -#else public short[]? HiBlockTable { get; set; } -#endif // TODO: Strong digital signature } diff --git a/MoPaQ/ArchiveHeader.cs b/MoPaQ/ArchiveHeader.cs index 15519b2..86a43a2 100644 --- a/MoPaQ/ArchiveHeader.cs +++ b/MoPaQ/ArchiveHeader.cs @@ -11,11 +11,7 @@ /// /// The MPQ archive signature /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Size of the archive header @@ -144,61 +140,37 @@ /// MD5 of the block table before decryption /// /// 0x10 bytes -#if NET48 - public byte[] BlockTableMD5 { get; set; } -#else public byte[]? BlockTableMD5 { get; set; } -#endif /// /// MD5 of the hash table before decryption /// /// 0x10 bytes -#if NET48 - public byte[] HashTableMD5 { get; set; } -#else public byte[]? HashTableMD5 { get; set; } -#endif /// /// MD5 of the hi-block table /// /// 0x10 bytes -#if NET48 - public byte[] HiBlockTableMD5 { get; set; } -#else public byte[]? HiBlockTableMD5 { get; set; } -#endif /// /// MD5 of the BET table before decryption /// /// 0x10 bytes -#if NET48 - public byte[] BetTableMD5 { get; set; } -#else public byte[]? BetTableMD5 { get; set; } -#endif /// /// MD5 of the HET table before decryption /// /// 0x10 bytes -#if NET48 - public byte[] HetTableMD5 { get; set; } -#else public byte[]? HetTableMD5 { get; set; } -#endif /// /// MD5 of the MPQ header from signature to (including) HetTableMD5 /// /// 0x10 bytes -#if NET48 - public byte[] MpqHeaderMD5 { get; set; } -#else public byte[]? MpqHeaderMD5 { get; set; } -#endif #endregion } diff --git a/MoPaQ/BetTable.cs b/MoPaQ/BetTable.cs index 2779d46..fb6a48d 100644 --- a/MoPaQ/BetTable.cs +++ b/MoPaQ/BetTable.cs @@ -14,11 +14,7 @@ /// /// 'BET\x1A' /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Version. Seems to be always 1 @@ -131,11 +127,7 @@ /// Followed by array of file flags. Each entry is 32-bit size and its meaning is the same like /// /// Size from -#if NET48 - public uint[] FlagsArray { get; set; } -#else public uint[]? FlagsArray { get; set; } -#endif // File table. Size of each entry is taken from dwTableEntrySize. // Size of the table is (dwTableEntrySize * dwMaxFileCount), round up to 8. diff --git a/MoPaQ/HetTable.cs b/MoPaQ/HetTable.cs index 2a62c9d..bc95048 100644 --- a/MoPaQ/HetTable.cs +++ b/MoPaQ/HetTable.cs @@ -15,11 +15,7 @@ /// /// 'HET\x1A' /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Version. Seems to be always 1 @@ -77,20 +73,12 @@ /// HET hash table. Each entry is 8 bits. /// /// Size is derived from HashTableSize -#if NET48 - public byte[] HashTable { get; set; } -#else public byte[]? HashTable { get; set; } -#endif /// /// Array of file indexes. Bit size of each entry is taken from dwTotalIndexSize. /// Table size is taken from dwHashTableSize. /// -#if NET48 - public byte[][] FileIndexes { get; set; } -#else public byte[][]? FileIndexes { get; set; } -#endif } } diff --git a/MoPaQ/PatchHeader.cs b/MoPaQ/PatchHeader.cs index b5631fc..f0120e6 100644 --- a/MoPaQ/PatchHeader.cs +++ b/MoPaQ/PatchHeader.cs @@ -46,20 +46,12 @@ /// /// MD5 of the original (unpached) file /// -#if NET48 - public byte[] Md5BeforePatch { get; set; } = new byte[0x10]; -#else public byte[]? Md5BeforePatch { get; set; } = new byte[0x10]; -#endif /// /// MD5 of the patched file /// -#if NET48 - public byte[] Md5AfterPatch { get; set; } = new byte[0x10]; -#else public byte[]? Md5AfterPatch { get; set; } = new byte[0x10]; -#endif #endregion @@ -116,11 +108,7 @@ /// /// File data are simply replaced by the data in the patch. /// -#if NET48 - public byte[] PatchDataCopy { get; set; } -#else public byte[]? PatchDataCopy { get; set; } -#endif #endregion } diff --git a/MoPaQ/PatchInfo.cs b/MoPaQ/PatchInfo.cs index 83e719e..6bd79dd 100644 --- a/MoPaQ/PatchInfo.cs +++ b/MoPaQ/PatchInfo.cs @@ -25,19 +25,11 @@ /// MD5 of the entire patch file after decompression /// /// 0x10 bytes -#if NET48 - public byte[] MD5 { get; set; } -#else public byte[]? MD5 { get; set; } -#endif /// /// The sector offset table (variable length) /// -#if NET48 - public uint[] SectorOffsetTable { get; set; } -#else public uint[]? SectorOffsetTable { get; set; } -#endif } } diff --git a/MoPaQ/UserData.cs b/MoPaQ/UserData.cs index f5b147b..66c29e5 100644 --- a/MoPaQ/UserData.cs +++ b/MoPaQ/UserData.cs @@ -12,11 +12,7 @@ /// The user data signature /// /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Maximum size of the user data diff --git a/N3DS/ARM11KernelCapabilities.cs b/N3DS/ARM11KernelCapabilities.cs index 13c966a..75fbf92 100644 --- a/N3DS/ARM11KernelCapabilities.cs +++ b/N3DS/ARM11KernelCapabilities.cs @@ -34,19 +34,11 @@ /// 13 Process has access to CPU core 2 (New3DS only) /// /// TODO: Make enum for flag values -#if NET48 - public uint[] Descriptors { get; set; } -#else public uint[]? Descriptors { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif } } diff --git a/N3DS/ARM11LocalSystemCapabilities.cs b/N3DS/ARM11LocalSystemCapabilities.cs index df8b0e3..52ff297 100644 --- a/N3DS/ARM11LocalSystemCapabilities.cs +++ b/N3DS/ARM11LocalSystemCapabilities.cs @@ -36,47 +36,27 @@ /// /// Resource limit descriptors. The first byte here controls the maximum allowed CpuTime. /// -#if NET48 - public ushort[] ResourceLimitDescriptors { get; set; } -#else public ushort[]? ResourceLimitDescriptors { get; set; } -#endif /// /// Storage info /// -#if NET48 - public StorageInfo StorageInfo { get; set; } -#else public StorageInfo? StorageInfo { get; set; } -#endif /// /// Service access control /// -#if NET48 - public ulong[] ServiceAccessControl { get; set; } -#else public ulong[]? ServiceAccessControl { get; set; } -#endif /// /// Extended service access control, support for this was implemented with 9.3.0-X. /// -#if NET48 - public ulong[] ExtendedServiceAccessControl { get; set; } -#else public ulong[]? ExtendedServiceAccessControl { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif /// /// Resource limit category. (0 = APPLICATION, 1 = SYS_APPLET, 2 = LIB_APPLET, 3 = OTHER (sysmodules running under the BASE memregion)) diff --git a/N3DS/ARM9AccessControl.cs b/N3DS/ARM9AccessControl.cs index 4889549..c9e863d 100644 --- a/N3DS/ARM9AccessControl.cs +++ b/N3DS/ARM9AccessControl.cs @@ -6,11 +6,7 @@ /// /// Descriptors /// -#if NET48 - public byte[] Descriptors { get; set; } -#else public byte[]? Descriptors { get; set; } -#endif /// /// ARM9 Descriptor Version. Originally this value had to be ≥ 2. diff --git a/N3DS/AccessControlInfo.cs b/N3DS/AccessControlInfo.cs index eb54568..318fbd0 100644 --- a/N3DS/AccessControlInfo.cs +++ b/N3DS/AccessControlInfo.cs @@ -6,28 +6,16 @@ /// /// ARM11 local system capabilities /// -#if NET48 - public ARM11LocalSystemCapabilities ARM11LocalSystemCapabilities { get; set; } -#else public ARM11LocalSystemCapabilities? ARM11LocalSystemCapabilities { get; set; } -#endif /// /// ARM11 kernel capabilities /// -#if NET48 - public ARM11KernelCapabilities ARM11KernelCapabilities { get; set; } -#else public ARM11KernelCapabilities? ARM11KernelCapabilities { get; set; } -#endif /// /// ARM9 access control /// -#if NET48 - public ARM9AccessControl ARM9AccessControl { get; set; } -#else public ARM9AccessControl? ARM9AccessControl { get; set; } -#endif } } diff --git a/N3DS/CIA.cs b/N3DS/CIA.cs index 720b7f8..aecfeef 100644 --- a/N3DS/CIA.cs +++ b/N3DS/CIA.cs @@ -17,11 +17,7 @@ namespace SabreTools.Models.N3DS /// /// CIA header /// -#if NET48 - public CIAHeader Header { get; set; } -#else public CIAHeader? Header { get; set; } -#endif /// /// Certificate chain @@ -29,56 +25,32 @@ namespace SabreTools.Models.N3DS /// /// https://www.3dbrew.org/wiki/CIA#Certificate_Chain /// -#if NET48 - public Certificate[] CertificateChain { get; set; } -#else public Certificate?[]? CertificateChain { get; set; } -#endif /// /// Ticket /// -#if NET48 - public Ticket Ticket { get; set; } -#else public Ticket? Ticket { get; set; } -#endif /// /// TMD file data /// -#if NET48 - public TitleMetadata TMDFileData { get; set; } -#else public TitleMetadata? TMDFileData { get; set; } -#endif /// /// Content file data /// -#if NET48 - public NCCHHeader[] Partitions { get; set; } -#else public NCCHHeader?[]? Partitions { get; set; } -#endif /// /// Content file data /// /// TODO: Parse the content file data -#if NET48 - public byte[] ContentFileData { get; set; } -#else public byte[]? ContentFileData { get; set; } -#endif /// /// Meta file data (Not a necessary component) /// -#if NET48 - public MetaData MetaData { get; set; } -#else public MetaData? MetaData { get; set; } -#endif } } \ No newline at end of file diff --git a/N3DS/CIAHeader.cs b/N3DS/CIAHeader.cs index 04f9a18..2bb6adf 100644 --- a/N3DS/CIAHeader.cs +++ b/N3DS/CIAHeader.cs @@ -46,10 +46,6 @@ namespace SabreTools.Models.N3DS /// /// Content Index /// -#if NET48 - public byte[] ContentIndex { get; set; } -#else public byte[]? ContentIndex { get; set; } -#endif } } \ No newline at end of file diff --git a/N3DS/CardInfoHeader.cs b/N3DS/CardInfoHeader.cs index 7afb834..a56a523 100644 --- a/N3DS/CardInfoHeader.cs +++ b/N3DS/CardInfoHeader.cs @@ -16,11 +16,7 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// Filled size of cartridge @@ -30,11 +26,7 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Title version @@ -49,20 +41,12 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved3 { get; set; } -#else public byte[]? Reserved3 { get; set; } -#endif /// /// Title ID of CVer in included update partition /// -#if NET48 - public byte[] CVerTitleID { get; set; } -#else public byte[]? CVerTitleID { get; set; } -#endif /// /// Version number of CVer in included update partition @@ -72,10 +56,6 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved4 { get; set; } -#else public byte[]? Reserved4 { get; set; } -#endif } } diff --git a/N3DS/Cart.cs b/N3DS/Cart.cs index 7c7d85b..f7193fd 100644 --- a/N3DS/Cart.cs +++ b/N3DS/Cart.cs @@ -8,64 +8,36 @@ namespace SabreTools.Models.N3DS /// /// 3DS cart header /// -#if NET48 - public NCSDHeader Header { get; set; } -#else public NCSDHeader? Header { get; set; } -#endif /// /// 3DS card info header /// -#if NET48 - public CardInfoHeader CardInfoHeader { get; set; } -#else public CardInfoHeader? CardInfoHeader { get; set; } -#endif /// /// 3DS development card info header /// -#if NET48 - public DevelopmentCardInfoHeader DevelopmentCardInfoHeader { get; set; } -#else public DevelopmentCardInfoHeader? DevelopmentCardInfoHeader { get; set; } -#endif /// /// NCCH partitions /// -#if NET48 - public NCCHHeader[] Partitions { get; set; } -#else public NCCHHeader?[]? Partitions { get; set; } -#endif /// /// NCCH extended headers /// -#if NET48 - public NCCHExtendedHeader[] ExtendedHeaders { get; set; } -#else public NCCHExtendedHeader?[]? ExtendedHeaders { get; set; } -#endif /// /// ExeFS headers associated with each partition /// -#if NET48 - public ExeFSHeader[] ExeFSHeaders { get; set; } -#else public ExeFSHeader?[]? ExeFSHeaders { get; set; } -#endif /// /// RomFS headers associated with each partition /// -#if NET48 - public RomFSHeader[] RomFSHeaders { get; set; } -#else public RomFSHeader?[]? RomFSHeaders { get; set; } -#endif } } \ No newline at end of file diff --git a/N3DS/Certificate.cs b/N3DS/Certificate.cs index 6fa6e8d..ce48c6a 100644 --- a/N3DS/Certificate.cs +++ b/N3DS/Certificate.cs @@ -27,29 +27,17 @@ namespace SabreTools.Models.N3DS /// /// Signature /// -#if NET48 - public byte[] Signature { get; set; } -#else public byte[]? Signature { get; set; } -#endif /// /// Padding to align next data to 0x40 bytes /// -#if NET48 - public byte[] Padding { get; set; } -#else public byte[]? Padding { get; set; } -#endif /// /// Issuer /// -#if NET48 - public string Issuer { get; set; } -#else public string? Issuer { get; set; } -#endif /// /// Key Type @@ -59,11 +47,7 @@ namespace SabreTools.Models.N3DS /// /// Name /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Expiration time as UNIX Timestamp, used at least for CTCert @@ -76,11 +60,7 @@ namespace SabreTools.Models.N3DS /// /// Modulus /// -#if NET48 - public byte[] RSAModulus { get; set; } -#else public byte[]? RSAModulus { get; set; } -#endif /// /// Public Exponent @@ -90,11 +70,7 @@ namespace SabreTools.Models.N3DS /// /// Padding /// -#if NET48 - public byte[] RSAPadding { get; set; } -#else public byte[]? RSAPadding { get; set; } -#endif #endregion @@ -104,20 +80,12 @@ namespace SabreTools.Models.N3DS /// /// Public Key /// -#if NET48 - public byte[] ECCPublicKey { get; set; } -#else public byte[]? ECCPublicKey { get; set; } -#endif /// /// Padding /// -#if NET48 - public byte[] ECCPadding { get; set; } -#else public byte[]? ECCPadding { get; set; } -#endif #endregion } diff --git a/N3DS/ContentChunkRecord.cs b/N3DS/ContentChunkRecord.cs index 7e19af4..cdec186 100644 --- a/N3DS/ContentChunkRecord.cs +++ b/N3DS/ContentChunkRecord.cs @@ -33,10 +33,6 @@ namespace SabreTools.Models.N3DS /// /// SHA-256 hash /// -#if NET48 - public byte[] SHA256Hash { get; set; } -#else public byte[]? SHA256Hash { get; set; } -#endif } } \ No newline at end of file diff --git a/N3DS/ContentInfoRecord.cs b/N3DS/ContentInfoRecord.cs index 943a866..2cc2808 100644 --- a/N3DS/ContentInfoRecord.cs +++ b/N3DS/ContentInfoRecord.cs @@ -19,10 +19,6 @@ namespace SabreTools.Models.N3DS /// /// SHA-256 hash of the next k content records that have not been hashed yet /// -#if NET48 - public byte[] UnhashedContentRecordsSHA256Hash { get; set; } -#else public byte[]? UnhashedContentRecordsSHA256Hash { get; set; } -#endif } } \ No newline at end of file diff --git a/N3DS/DevelopmentCardInfoHeader.cs b/N3DS/DevelopmentCardInfoHeader.cs index 0f2d135..e9fa121 100644 --- a/N3DS/DevelopmentCardInfoHeader.cs +++ b/N3DS/DevelopmentCardInfoHeader.cs @@ -6,46 +6,26 @@ namespace SabreTools.Models.N3DS /// /// InitialData /// -#if NET48 - public InitialData InitialData { get; set; } -#else public InitialData? InitialData { get; set; } -#endif /// /// CardDeviceReserved1 /// -#if NET48 - public byte[] CardDeviceReserved1 { get; set; } -#else public byte[]? CardDeviceReserved1 { get; set; } -#endif /// /// TitleKey /// -#if NET48 - public byte[] TitleKey { get; set; } -#else public byte[]? TitleKey { get; set; } -#endif /// /// CardDeviceReserved2 /// -#if NET48 - public byte[] CardDeviceReserved2 { get; set; } -#else public byte[]? CardDeviceReserved2 { get; set; } -#endif /// /// TestData /// -#if NET48 - public TestData TestData { get; set; } -#else public TestData? TestData { get; set; } -#endif } } diff --git a/N3DS/ExeFSFileHeader.cs b/N3DS/ExeFSFileHeader.cs index ede81ba..dace6be 100644 --- a/N3DS/ExeFSFileHeader.cs +++ b/N3DS/ExeFSFileHeader.cs @@ -13,11 +13,7 @@ /// /// File name /// -#if NET48 - public string FileName { get; set; } -#else public string? FileName { get; set; } -#endif /// /// File offset @@ -32,10 +28,6 @@ /// /// SHA256 hash calculated over the entire file contents /// -#if NET48 - public byte[] FileHash { get; set; } -#else public byte[]? FileHash { get; set; } -#endif } } diff --git a/N3DS/ExeFSHeader.cs b/N3DS/ExeFSHeader.cs index ecddf07..742b9bd 100644 --- a/N3DS/ExeFSHeader.cs +++ b/N3DS/ExeFSHeader.cs @@ -16,29 +16,17 @@ /// /// File headers (10 headers maximum, 16 bytes each) /// -#if NET48 - public ExeFSFileHeader[] FileHeaders { get; set; } -#else public ExeFSFileHeader?[]? FileHeaders { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif /// /// File hashes (10 hashes maximum, 32 bytes each, one for each header) /// /// SHA-256 hashes -#if NET48 - public byte[][] FileHashes { get; set; } -#else public byte[][]? FileHashes { get; set; } -#endif } } diff --git a/N3DS/InitialData.cs b/N3DS/InitialData.cs index be24a3b..8a51441 100644 --- a/N3DS/InitialData.cs +++ b/N3DS/InitialData.cs @@ -6,55 +6,31 @@ namespace SabreTools.Models.N3DS /// /// Card seed keyY (first u64 is Media ID (same as first NCCH partitionId)) /// -#if NET48 - public byte[] CardSeedKeyY { get; set; } -#else public byte[]? CardSeedKeyY { get; set; } -#endif /// /// Encrypted card seed (AES-CCM, keyslot 0x3B for retail cards, see CTRCARD_SECSEED) /// -#if NET48 - public byte[] EncryptedCardSeed { get; set; } -#else public byte[]? EncryptedCardSeed { get; set; } -#endif /// /// Card seed AES-MAC /// -#if NET48 - public byte[] CardSeedAESMAC { get; set; } -#else public byte[]? CardSeedAESMAC { get; set; } -#endif /// /// Card seed nonce /// -#if NET48 - public byte[] CardSeedNonce { get; set; } -#else public byte[]? CardSeedNonce { get; set; } -#endif /// /// Reserved3 /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif /// /// Copy of first NCCH header (excluding RSA signature) /// -#if NET48 - public NCCHHeader BackupHeader { get; set; } -#else public NCCHHeader? BackupHeader { get; set; } -#endif } } diff --git a/N3DS/MetaData.cs b/N3DS/MetaData.cs index e2bff33..2a9bb08 100644 --- a/N3DS/MetaData.cs +++ b/N3DS/MetaData.cs @@ -7,20 +7,12 @@ namespace SabreTools.Models.N3DS /// Title ID dependency list - Taken from the application's ExHeader /// /// TODO: Determine numeric format of each entry -#if NET48 - public byte[] TitleIDDependencyList { get; set; } -#else public byte[]? TitleIDDependencyList { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// Core Version @@ -30,19 +22,11 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Icon Data(.ICN) - Taken from the application's ExeFS /// -#if NET48 - public byte[] IconData { get; set; } -#else public byte[]? IconData { get; set; } -#endif } } \ No newline at end of file diff --git a/N3DS/NCCHExtendedHeader.cs b/N3DS/NCCHExtendedHeader.cs index 1272d1b..c7fd142 100644 --- a/N3DS/NCCHExtendedHeader.cs +++ b/N3DS/NCCHExtendedHeader.cs @@ -11,46 +11,26 @@ /// /// SCI /// -#if NET48 - public SystemControlInfo SCI { get; set; } -#else public SystemControlInfo? SCI { get; set; } -#endif /// /// ACI /// -#if NET48 - public AccessControlInfo ACI { get; set; } -#else public AccessControlInfo? ACI { get; set; } -#endif /// /// AccessDesc signature (RSA-2048-SHA256) /// -#if NET48 - public byte[] AccessDescSignature { get; set; } -#else public byte[]? AccessDescSignature { get; set; } -#endif /// /// NCCH HDR RSA-2048 public key /// -#if NET48 - public byte[] NCCHHDRPublicKey { get; set; } -#else public byte[]? NCCHHDRPublicKey { get; set; } -#endif /// /// ACI (for limitation of first ACI) /// -#if NET48 - public AccessControlInfo ACIForLimitations { get; set; } -#else public AccessControlInfo? ACIForLimitations { get; set; } -#endif } } diff --git a/N3DS/NCCHHeader.cs b/N3DS/NCCHHeader.cs index 5e556a7..0add92c 100644 --- a/N3DS/NCCHHeader.cs +++ b/N3DS/NCCHHeader.cs @@ -6,20 +6,12 @@ /// /// RSA-2048 signature of the NCCH header, using SHA-256. /// -#if NET48 - public byte[] RSA2048Signature { get; set; } -#else public byte[]? RSA2048Signature { get; set; } -#endif /// /// Magic ID, always 'NCCH' /// -#if NET48 - public string MagicID { get; set; } -#else public string? MagicID { get; set; } -#endif /// /// Content size, in media units (1 media unit = 0x200 bytes) @@ -52,47 +44,27 @@ /// /// Program ID /// -#if NET48 - public byte[] ProgramId { get; set; } -#else public byte[]? ProgramId { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// Logo Region SHA-256 hash. (For applications built with SDK 5+) (Supported from firmware: 5.0.0-11) /// -#if NET48 - public byte[] LogoRegionHash { get; set; } -#else public byte[]? LogoRegionHash { get; set; } -#endif /// /// Product code /// -#if NET48 - public string ProductCode { get; set; } -#else public string? ProductCode { get; set; } -#endif /// /// Extended header SHA-256 hash (SHA256 of 2x Alignment Size, beginning at 0x0 of ExHeader) /// -#if NET48 - public byte[] ExtendedHeaderHash { get; set; } -#else public byte[]? ExtendedHeaderHash { get; set; } -#endif /// /// Extended header size, in bytes @@ -102,20 +74,12 @@ /// /// Reserved /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Flags /// -#if NET48 - public NCCHHeaderFlags Flags { get; set; } -#else public NCCHHeaderFlags? Flags { get; set; } -#endif /// /// Plain region offset, in media units @@ -155,11 +119,7 @@ /// /// Reserved /// -#if NET48 - public byte[] Reserved3 { get; set; } -#else public byte[]? Reserved3 { get; set; } -#endif /// /// RomFS offset, in media units @@ -179,30 +139,18 @@ /// /// Reserved /// -#if NET48 - public byte[] Reserved4 { get; set; } -#else public byte[]? Reserved4 { get; set; } -#endif /// /// ExeFS superblock SHA-256 hash - (SHA-256 hash, starting at 0x0 of the ExeFS over the number of /// media units specified in the ExeFS hash region size) /// -#if NET48 - public byte[] ExeFSSuperblockHash { get; set; } -#else public byte[]? ExeFSSuperblockHash { get; set; } -#endif /// /// RomFS superblock SHA-256 hash - (SHA-256 hash, starting at 0x0 of the RomFS over the number /// of media units specified in the RomFS hash region size) /// -#if NET48 - public byte[] RomFSSuperblockHash { get; set; } -#else public byte[]? RomFSSuperblockHash { get; set; } -#endif } } diff --git a/N3DS/NCSDHeader.cs b/N3DS/NCSDHeader.cs index 76f5564..6bc825a 100644 --- a/N3DS/NCSDHeader.cs +++ b/N3DS/NCSDHeader.cs @@ -16,20 +16,12 @@ /// /// RSA-2048 SHA-256 signature of the NCSD header /// -#if NET48 - public byte[] RSA2048Signature { get; set; } -#else public byte[]? RSA2048Signature { get; set; } -#endif /// /// Magic Number 'NCSD' /// -#if NET48 - public string MagicNumber { get; set; } -#else public string? MagicNumber { get; set; } -#endif /// /// Size of the NCSD image, in media units (1 media unit = 0x200 bytes) @@ -39,11 +31,7 @@ /// /// Media ID /// -#if NET48 - public byte[] MediaId { get; set; } -#else public byte[]? MediaId { get; set; } -#endif /// /// Partitions FS type (0=None, 1=Normal, 3=FIRM, 4=AGB_FIRM save) @@ -53,20 +41,12 @@ /// /// Partitions crypt type (each byte corresponds to a partition in the partition table) /// -#if NET48 - public byte[] PartitionsCryptType { get; set; } -#else public byte[]? PartitionsCryptType { get; set; } -#endif /// /// Offset & Length partition table, in media units /// -#if NET48 - public PartitionTableEntry[] PartitionsTable { get; set; } -#else public PartitionTableEntry?[]? PartitionsTable { get; set; } -#endif #endregion @@ -75,11 +55,7 @@ /// /// Exheader SHA-256 hash /// -#if NET48 - public byte[] ExheaderHash { get; set; } -#else public byte[]? ExheaderHash { get; set; } -#endif /// /// Additional header size @@ -94,38 +70,22 @@ /// /// Partition Flags /// -#if NET48 - public byte[] PartitionFlags { get; set; } -#else public byte[]? PartitionFlags { get; set; } -#endif /// /// Partition ID table /// -#if NET48 - public ulong[] PartitionIdTable { get; set; } -#else public ulong[]? PartitionIdTable { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// Reserved? /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Support for this was implemented with 9.6.0-X FIRM. Bit0=1 enables using bits 1-2, it's unknown @@ -147,20 +107,12 @@ /// /// Unknown /// -#if NET48 - public byte[] Unknown { get; set; } -#else public byte[]? Unknown { get; set; } -#endif /// /// Encrypted MBR partition-table, for the TWL partitions(key-data used for this keyslot is console-unique). /// -#if NET48 - public byte[] EncryptedMBR { get; set; } -#else public byte[]? EncryptedMBR { get; set; } -#endif #endregion } diff --git a/N3DS/RomFSHeader.cs b/N3DS/RomFSHeader.cs index 8056728..01a743f 100644 --- a/N3DS/RomFSHeader.cs +++ b/N3DS/RomFSHeader.cs @@ -11,11 +11,7 @@ /// /// Magic "IVFC" /// -#if NET48 - public string MagicString { get; set; } -#else public string? MagicString { get; set; } -#endif /// /// Magic number 0x10000 @@ -45,11 +41,7 @@ /// /// Reserved /// -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// Level 2 logical offset @@ -69,11 +61,7 @@ /// /// Reserved /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Level 3 logical offset @@ -93,20 +81,12 @@ /// /// Reserved /// -#if NET48 - public byte[] Reserved3 { get; set; } -#else public byte[]? Reserved3 { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved4 { get; set; } -#else public byte[]? Reserved4 { get; set; } -#endif /// /// Optional info size. diff --git a/N3DS/StorageInfo.cs b/N3DS/StorageInfo.cs index 68180de..483ae83 100644 --- a/N3DS/StorageInfo.cs +++ b/N3DS/StorageInfo.cs @@ -14,31 +14,19 @@ /// /// System savedata IDs /// -#if NET48 - public byte[] SystemSavedataIDs { get; set; } -#else public byte[]? SystemSavedataIDs { get; set; } -#endif /// /// Storage accessible unique IDs /// -#if NET48 - public byte[] StorageAccessibleUniqueIDs { get; set; } -#else public byte[]? StorageAccessibleUniqueIDs { get; set; } -#endif /// /// Filesystem access info /// /// TODO: Create enum for the flag values /// TODO: Combine with "other attributes" -#if NET48 - public byte[] FileSystemAccessInfo { get; set; } -#else public byte[]? FileSystemAccessInfo { get; set; } -#endif /// /// Other attributes diff --git a/N3DS/SystemControlInfo.cs b/N3DS/SystemControlInfo.cs index 68e02e0..0bf1653 100644 --- a/N3DS/SystemControlInfo.cs +++ b/N3DS/SystemControlInfo.cs @@ -6,20 +6,12 @@ /// /// Application title (default is "CtrApp") /// -#if NET48 - public string ApplicationTitle { get; set; } -#else public string? ApplicationTitle { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// Flag (bit 0: CompressExefsCode, bit 1: SDApplication) @@ -34,11 +26,7 @@ /// /// Text code set info /// -#if NET48 - public CodeSetInfo TextCodeSetInfo { get; set; } -#else public CodeSetInfo? TextCodeSetInfo { get; set; } -#endif /// /// Stack size @@ -48,29 +36,17 @@ /// /// Read-only code set info /// -#if NET48 - public CodeSetInfo ReadOnlyCodeSetInfo { get; set; } -#else public CodeSetInfo? ReadOnlyCodeSetInfo { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Data code set info /// -#if NET48 - public CodeSetInfo DataCodeSetInfo { get; set; } -#else public CodeSetInfo? DataCodeSetInfo { get; set; } -#endif /// /// BSS size @@ -80,19 +56,11 @@ /// /// Dependency module (program ID) list /// -#if NET48 - public ulong[] DependencyModuleList { get; set; } -#else public ulong[]? DependencyModuleList { get; set; } -#endif /// /// SystemInfo /// -#if NET48 - public SystemInfo SystemInfo { get; set; } -#else public SystemInfo? SystemInfo { get; set; } -#endif } } diff --git a/N3DS/SystemInfo.cs b/N3DS/SystemInfo.cs index 7ad6d1b..51d2d84 100644 --- a/N3DS/SystemInfo.cs +++ b/N3DS/SystemInfo.cs @@ -16,10 +16,6 @@ /// /// Reserved /// -#if NET48 - public byte[] Reserved { get; set; } -#else public byte[]? Reserved { get; set; } -#endif } } diff --git a/N3DS/TestData.cs b/N3DS/TestData.cs index 7fd1281..85feae4 100644 --- a/N3DS/TestData.cs +++ b/N3DS/TestData.cs @@ -9,83 +9,47 @@ namespace SabreTools.Models.N3DS /// /// The bytes FF 00 FF 00 AA 55 AA 55. /// -#if NET48 - public byte[] Signature { get; set; } -#else public byte[]? Signature { get; set; } -#endif /// /// An ascending byte sequence equal to the offset mod 256 (08 09 0A ... FE FF 00 01 ... FF). /// -#if NET48 - public byte[] AscendingByteSequence { get; set; } -#else public byte[]? AscendingByteSequence { get; set; } -#endif /// /// A descending byte sequence equal to 255 minus the offset mod 256 (FF FE FD ... 00 FF DE ... 00). /// -#if NET48 - public byte[] DescendingByteSequence { get; set; } -#else public byte[]? DescendingByteSequence { get; set; } -#endif /// /// Filled with 00 (0b00000000) bytes. /// -#if NET48 - public byte[] Filled00 { get; set; } -#else public byte[]? Filled00 { get; set; } -#endif /// /// Filled with FF (0b11111111) bytes. /// -#if NET48 - public byte[] FilledFF { get; set; } -#else public byte[]? FilledFF { get; set; } -#endif /// /// Filled with 0F (0b00001111) bytes. /// -#if NET48 - public byte[] Filled0F { get; set; } -#else public byte[]? Filled0F { get; set; } -#endif /// /// Filled with F0 (0b11110000) bytes. /// -#if NET48 - public byte[] FilledF0 { get; set; } -#else public byte[]? FilledF0 { get; set; } -#endif /// /// Filled with 55 (0b01010101) bytes. /// -#if NET48 - public byte[] Filled55 { get; set; } -#else public byte[]? Filled55 { get; set; } -#endif /// /// Filled with AA (0b10101010) bytes. /// -#if NET48 - public byte[] FilledAA { get; set; } -#else public byte[]? FilledAA { get; set; } -#endif /// /// The final byte is 00 (0b00000000). diff --git a/N3DS/Ticket.cs b/N3DS/Ticket.cs index 957cfb6..5e12a98 100644 --- a/N3DS/Ticket.cs +++ b/N3DS/Ticket.cs @@ -25,38 +25,22 @@ namespace SabreTools.Models.N3DS /// /// Signature /// -#if NET48 - public byte[] Signature { get; set; } -#else public byte[]? Signature { get; set; } -#endif /// /// Padding /// -#if NET48 - public byte[] Padding { get; set; } -#else public byte[]? Padding { get; set; } -#endif /// /// Issuer /// -#if NET48 - public string Issuer { get; set; } -#else public string? Issuer { get; set; } -#endif /// /// ECC PublicKey /// -#if NET48 - public byte[] ECCPublicKey { get; set; } -#else public byte[]? ECCPublicKey { get; set; } -#endif /// /// Version (For 3DS this is always 1) @@ -87,11 +71,7 @@ namespace SabreTools.Models.N3DS /// The titlekey is used to decrypt content downloaded from the CDN using 128-bit AES-CBC with /// the content index (as big endian u16, padded with trailing zeroes) as the IV. /// -#if NET48 - public byte[] TitleKey { get; set; } -#else public byte[]? TitleKey { get; set; } -#endif /// /// Reserved @@ -116,11 +96,7 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Ticket title version @@ -134,11 +110,7 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved3 { get; set; } -#else public byte[]? Reserved3 { get; set; } -#endif /// /// License Type @@ -153,11 +125,7 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved4 { get; set; } -#else public byte[]? Reserved4 { get; set; } -#endif /// /// eShop Account ID? @@ -177,11 +145,7 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved6 { get; set; } -#else public byte[]? Reserved6 { get; set; } -#endif /// /// Limits @@ -189,11 +153,7 @@ namespace SabreTools.Models.N3DS /// /// In demos, the first u32 in the "Limits" section is 0x4, then the second u32 is the max-playcount. /// -#if NET48 - public uint[] Limits { get; set; } -#else public uint[]? Limits { get; set; } -#endif /// /// The Content Index of a ticket has its own size defined within itself, @@ -205,11 +165,7 @@ namespace SabreTools.Models.N3DS /// /// Content Index /// -#if NET48 - public byte[] ContentIndex { get; set; } -#else public byte[]? ContentIndex { get; set; } -#endif /// /// Certificate chain @@ -217,10 +173,6 @@ namespace SabreTools.Models.N3DS /// /// https://www.3dbrew.org/wiki/Ticket#Certificate_Chain /// -#if NET48 - public Certificate[] CertificateChain { get; set; } -#else public Certificate?[]? CertificateChain { get; set; } -#endif } } diff --git a/N3DS/TitleMetadata.cs b/N3DS/TitleMetadata.cs index 6ae235d..ba67184 100644 --- a/N3DS/TitleMetadata.cs +++ b/N3DS/TitleMetadata.cs @@ -26,29 +26,17 @@ namespace SabreTools.Models.N3DS /// /// Signature /// -#if NET48 - public byte[] Signature { get; set; } -#else public byte[]? Signature { get; set; } -#endif /// /// Padding /// -#if NET48 - public byte[] Padding1 { get; set; } -#else public byte[]? Padding1 { get; set; } -#endif /// /// Signature Issuer /// -#if NET48 - public string Issuer { get; set; } -#else public string? Issuer { get; set; } -#endif /// /// Version @@ -103,11 +91,7 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// SRL Flag @@ -117,11 +101,7 @@ namespace SabreTools.Models.N3DS /// /// Reserved /// -#if NET48 - public byte[] Reserved3 { get; set; } -#else public byte[]? Reserved3 { get; set; } -#endif /// /// Access Rights @@ -146,39 +126,23 @@ namespace SabreTools.Models.N3DS /// /// Padding /// -#if NET48 - public byte[] Padding2 { get; set; } -#else public byte[]? Padding2 { get; set; } -#endif /// /// SHA-256 Hash of the Content Info Records /// -#if NET48 - public byte[] SHA256HashContentInfoRecords { get; set; } -#else public byte[]? SHA256HashContentInfoRecords { get; set; } -#endif /// /// There are 64 of these records, usually only the first is used. /// -#if NET48 - public ContentInfoRecord[] ContentInfoRecords { get; set; } -#else public ContentInfoRecord?[]? ContentInfoRecords { get; set; } -#endif /// /// There is one of these for each content contained in this title. /// (Determined by "Content Count" in the TMD Header). /// -#if NET48 - public ContentChunkRecord[] ContentChunkRecords { get; set; } -#else public ContentChunkRecord?[]? ContentChunkRecords { get; set; } -#endif /// /// Certificate chain @@ -186,10 +150,6 @@ namespace SabreTools.Models.N3DS /// /// https://www.3dbrew.org/wiki/Title_metadata#Certificate_Chain /// -#if NET48 - public Certificate[] CertificateChain { get; set; } -#else public Certificate?[]? CertificateChain { get; set; } -#endif } } \ No newline at end of file diff --git a/NCF/DirectoryEntry.cs b/NCF/DirectoryEntry.cs index 494f149..a7d31dc 100644 --- a/NCF/DirectoryEntry.cs +++ b/NCF/DirectoryEntry.cs @@ -11,11 +11,7 @@ namespace SabreTools.Models.NCF /// /// Directory item name from the end of the directory items. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Size of the item. (If file, file size. If folder, num items.) diff --git a/NCF/File.cs b/NCF/File.cs index 892abc6..a517feb 100644 --- a/NCF/File.cs +++ b/NCF/File.cs @@ -11,127 +11,71 @@ namespace SabreTools.Models.NCF /// /// Header data /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Directory header data /// -#if NET48 - public DirectoryHeader DirectoryHeader { get; set; } -#else public DirectoryHeader? DirectoryHeader { get; set; } -#endif /// /// Directory entries data /// -#if NET48 - public DirectoryEntry[] DirectoryEntries { get; set; } -#else public DirectoryEntry?[]? DirectoryEntries { get; set; } -#endif /// /// Directory names data /// -#if NET48 - public Dictionary DirectoryNames { get; set; } -#else public Dictionary? DirectoryNames { get; set; } -#endif /// /// Directory info 1 entries data /// -#if NET48 - public DirectoryInfo1Entry[] DirectoryInfo1Entries { get; set; } -#else public DirectoryInfo1Entry?[]? DirectoryInfo1Entries { get; set; } -#endif /// /// Directory info 2 entries data /// -#if NET48 - public DirectoryInfo2Entry[] DirectoryInfo2Entries { get; set; } -#else public DirectoryInfo2Entry?[]? DirectoryInfo2Entries { get; set; } -#endif /// /// Directory copy entries data /// -#if NET48 - public DirectoryCopyEntry[] DirectoryCopyEntries { get; set; } -#else public DirectoryCopyEntry?[]? DirectoryCopyEntries { get; set; } -#endif /// /// Directory local entries data /// -#if NET48 - public DirectoryLocalEntry[] DirectoryLocalEntries { get; set; } -#else public DirectoryLocalEntry?[]? DirectoryLocalEntries { get; set; } -#endif /// /// Unknown header data /// -#if NET48 - public UnknownHeader UnknownHeader { get; set; } -#else public UnknownHeader? UnknownHeader { get; set; } -#endif /// /// Unknown entries data /// -#if NET48 - public UnknownEntry[] UnknownEntries { get; set; } -#else public UnknownEntry?[]? UnknownEntries { get; set; } -#endif /// /// Checksum header data /// -#if NET48 - public ChecksumHeader ChecksumHeader { get; set; } -#else public ChecksumHeader? ChecksumHeader { get; set; } -#endif /// /// Checksum map header data /// -#if NET48 - public ChecksumMapHeader ChecksumMapHeader { get; set; } -#else public ChecksumMapHeader? ChecksumMapHeader { get; set; } -#endif /// /// Checksum map entries data /// -#if NET48 - public ChecksumMapEntry[] ChecksumMapEntries { get; set; } -#else public ChecksumMapEntry?[]? ChecksumMapEntries { get; set; } -#endif /// /// Checksum entries data /// -#if NET48 - public ChecksumEntry[] ChecksumEntries { get; set; } -#else public ChecksumEntry?[]? ChecksumEntries { get; set; } -#endif } } diff --git a/NewExecutable/Executable.cs b/NewExecutable/Executable.cs index 3d472a9..a5945e4 100644 --- a/NewExecutable/Executable.cs +++ b/NewExecutable/Executable.cs @@ -16,82 +16,46 @@ namespace SabreTools.Models.NewExecutable /// /// MS-DOS executable stub /// -#if NET48 - public MSDOS.Executable Stub { get; set; } -#else public MSDOS.Executable? Stub { get; set; } -#endif /// /// New Executable header /// -#if NET48 - public ExecutableHeader Header { get; set; } -#else public ExecutableHeader? Header { get; set; } -#endif /// /// Segment table /// -#if NET48 - public SegmentTableEntry[] SegmentTable { get; set; } -#else public SegmentTableEntry?[]? SegmentTable { get; set; } -#endif /// /// Resource table /// -#if NET48 - public ResourceTable ResourceTable { get; set; } -#else public ResourceTable? ResourceTable { get; set; } -#endif /// /// Resident-Name table /// -#if NET48 - public ResidentNameTableEntry[] ResidentNameTable { get; set; } -#else public ResidentNameTableEntry?[]? ResidentNameTable { get; set; } -#endif /// /// Module-Reference table /// -#if NET48 - public ModuleReferenceTableEntry[] ModuleReferenceTable { get; set; } -#else public ModuleReferenceTableEntry?[]? ModuleReferenceTable { get; set; } -#endif /// /// Imported-Name table /// -#if NET48 - public Dictionary ImportedNameTable { get; set; } -#else public Dictionary? ImportedNameTable { get; set; } -#endif /// /// Entry table /// -#if NET48 - public EntryTableBundle[] EntryTable { get; set; } -#else public EntryTableBundle?[]? EntryTable { get; set; } -#endif /// /// Nonresident-Name table /// -#if NET48 - public NonResidentNameTableEntry[] NonResidentNameTable { get; set; } -#else public NonResidentNameTableEntry?[]? NonResidentNameTable { get; set; } -#endif } } diff --git a/NewExecutable/ExecutableHeader.cs b/NewExecutable/ExecutableHeader.cs index ebda8b7..52f522d 100644 --- a/NewExecutable/ExecutableHeader.cs +++ b/NewExecutable/ExecutableHeader.cs @@ -13,11 +13,7 @@ namespace SabreTools.Models.NewExecutable /// "N" is low-order byte. /// "E" is high-order byte. /// -#if NET48 - public string Magic; -#else public string? Magic; -#endif /// /// Version number of the linker. diff --git a/NewExecutable/ImportedNameTableEntry.cs b/NewExecutable/ImportedNameTableEntry.cs index 3fe09f8..4b5106d 100644 --- a/NewExecutable/ImportedNameTableEntry.cs +++ b/NewExecutable/ImportedNameTableEntry.cs @@ -20,10 +20,6 @@ /// /// ASCII text of the name string. /// -#if NET48 - public byte[] NameString { get; set; } -#else public byte[]? NameString { get; set; } -#endif } } diff --git a/NewExecutable/NonResidentNameTableEntry.cs b/NewExecutable/NonResidentNameTableEntry.cs index 3e2e46b..608cf78 100644 --- a/NewExecutable/NonResidentNameTableEntry.cs +++ b/NewExecutable/NonResidentNameTableEntry.cs @@ -20,11 +20,7 @@ /// /// ASCII text of the name string. /// -#if NET48 - public byte[] NameString { get; set; } -#else public byte[]? NameString { get; set; } -#endif /// /// Ordinal number (index into entry table). This value is ignored diff --git a/NewExecutable/PerSegmentData.cs b/NewExecutable/PerSegmentData.cs index 538085b..360c90e 100644 --- a/NewExecutable/PerSegmentData.cs +++ b/NewExecutable/PerSegmentData.cs @@ -18,10 +18,6 @@ /// /// A table of relocation records follows. /// -#if NET48 - public RelocationRecord[] RelocationRecords { get; set; } -#else public RelocationRecord?[]? RelocationRecords { get; set; } -#endif } } diff --git a/NewExecutable/RelocationRecord.cs b/NewExecutable/RelocationRecord.cs index 22f37a2..6cd6022 100644 --- a/NewExecutable/RelocationRecord.cs +++ b/NewExecutable/RelocationRecord.cs @@ -34,40 +34,24 @@ /// INTERNALREF /// /// Must be NULL if is not set to -#if NET48 - public InternalRefRelocationRecord InternalRefRelocationRecord { get; set; } -#else public InternalRefRelocationRecord? InternalRefRelocationRecord { get; set; } -#endif /// /// IMPORTNAME /// /// Must be NULL if is not set to -#if NET48 - public ImportNameRelocationRecord ImportNameRelocationRecord { get; set; } -#else public ImportNameRelocationRecord? ImportNameRelocationRecord { get; set; } -#endif /// /// IMPORTORDINAL /// /// Must be NULL if is not set to -#if NET48 - public ImportOrdinalRelocationRecord ImportOrdinalRelocationRecord { get; set; } -#else public ImportOrdinalRelocationRecord? ImportOrdinalRelocationRecord { get; set; } -#endif /// /// IMPORTORDINAL /// /// Must be NULL if is not set to -#if NET48 - public OSFixupRelocationRecord OSFixupRelocationRecord { get; set; } -#else public OSFixupRelocationRecord? OSFixupRelocationRecord { get; set; } -#endif } } diff --git a/NewExecutable/ResidentNameTableEntry.cs b/NewExecutable/ResidentNameTableEntry.cs index baabc86..f653b09 100644 --- a/NewExecutable/ResidentNameTableEntry.cs +++ b/NewExecutable/ResidentNameTableEntry.cs @@ -19,11 +19,7 @@ /// /// ASCII text of the name string. /// -#if NET48 - public byte[] NameString { get; set; } -#else public byte[]? NameString { get; set; } -#endif /// /// Ordinal number (index into entry table). This value is ignored diff --git a/NewExecutable/ResourceTable.cs b/NewExecutable/ResourceTable.cs index 6a4eb3c..b2b6a34 100644 --- a/NewExecutable/ResourceTable.cs +++ b/NewExecutable/ResourceTable.cs @@ -23,20 +23,12 @@ namespace SabreTools.Models.NewExecutable /// /// A table of resource type information blocks follows. /// -#if NET48 - public ResourceTypeInformationEntry[] ResourceTypes { get; set; } -#else public ResourceTypeInformationEntry?[]? ResourceTypes { get; set; } -#endif /// /// Resource type and name strings are stored at the end of the /// resource table. /// -#if NET48 - public Dictionary TypeAndNameStrings { get; set; } -#else public Dictionary? TypeAndNameStrings { get; set; } -#endif } } diff --git a/NewExecutable/ResourceTypeAndNameString.cs b/NewExecutable/ResourceTypeAndNameString.cs index 2c2ce49..8a25383 100644 --- a/NewExecutable/ResourceTypeAndNameString.cs +++ b/NewExecutable/ResourceTypeAndNameString.cs @@ -18,10 +18,6 @@ /// /// ASCII text of the type or name string. /// -#if NET48 - public byte[] Text { get; set; } -#else public byte[]? Text { get; set; } -#endif } } diff --git a/NewExecutable/ResourceTypeInformationEntry.cs b/NewExecutable/ResourceTypeInformationEntry.cs index a1fe18a..3c87f34 100644 --- a/NewExecutable/ResourceTypeInformationEntry.cs +++ b/NewExecutable/ResourceTypeInformationEntry.cs @@ -29,10 +29,6 @@ /// /// A table of resources for this type follows. /// -#if NET48 - public ResourceTypeResourceEntry[] Resources { get; set; } -#else public ResourceTypeResourceEntry?[]? Resources { get; set; } -#endif } } diff --git a/Nitro/Cart.cs b/Nitro/Cart.cs index d3085ac..651c493 100644 --- a/Nitro/Cart.cs +++ b/Nitro/Cart.cs @@ -8,46 +8,26 @@ namespace SabreTools.Models.Nitro /// /// DS/DSi cart header /// -#if NET48 - public CommonHeader CommonHeader { get; set; } -#else public CommonHeader? CommonHeader { get; set; } -#endif /// /// DSi extended cart header /// -#if NET48 - public ExtendedDSiHeader ExtendedDSiHeader { get; set; } -#else public ExtendedDSiHeader? ExtendedDSiHeader { get; set; } -#endif /// /// Secure area, may be encrypted or decrypted /// -#if NET48 - public byte[] SecureArea { get; set; } -#else public byte[]? SecureArea { get; set; } -#endif /// /// Name table (folder allocation table, name list) /// -#if NET48 - public NameTable NameTable { get; set; } -#else public NameTable? NameTable { get; set; } -#endif /// /// File allocation table /// -#if NET48 - public FileAllocationTableEntry[] FileAllocationTable { get; set; } -#else public FileAllocationTableEntry?[]? FileAllocationTable { get; set; } -#endif } } \ No newline at end of file diff --git a/Nitro/CommonHeader.cs b/Nitro/CommonHeader.cs index 9b37c07..9796c7f 100644 --- a/Nitro/CommonHeader.cs +++ b/Nitro/CommonHeader.cs @@ -9,11 +9,7 @@ namespace SabreTools.Models.Nitro /// /// Game Title /// -#if NET48 - public string GameTitle { get; set; } -#else public string? GameTitle { get; set; } -#endif /// /// Gamecode @@ -23,11 +19,7 @@ namespace SabreTools.Models.Nitro /// /// Makercode /// -#if NET48 - public string MakerCode { get; set; } -#else public string? MakerCode { get; set; } -#endif /// /// Unitcode @@ -47,11 +39,7 @@ namespace SabreTools.Models.Nitro /// /// Reserved /// -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// Game Revision (used by DSi titles) @@ -186,11 +174,7 @@ namespace SabreTools.Models.Nitro /// /// Secure disable /// -#if NET48 - public byte[] SecureDisable { get; set; } -#else public byte[]? SecureDisable { get; set; } -#endif /// /// NTR region ROM size (excluding DSi area) @@ -205,20 +189,12 @@ namespace SabreTools.Models.Nitro /// ///Reserved (0x88, 0x8C, 0x90 = Unknown, used by DSi) /// -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// Nintendo Logo /// -#if NET48 - public byte[] NintendoLogo { get; set; } -#else public byte[]? NintendoLogo { get; set; } -#endif /// /// Nintendo Logo CRC @@ -233,10 +209,6 @@ namespace SabreTools.Models.Nitro /// /// Debugger reserved /// -#if NET48 - public byte[] DebuggerReserved { get; set; } -#else public byte[]? DebuggerReserved { get; set; } -#endif } } \ No newline at end of file diff --git a/Nitro/ExtendedDSiHeader.cs b/Nitro/ExtendedDSiHeader.cs index 98148d6..943fe82 100644 --- a/Nitro/ExtendedDSiHeader.cs +++ b/Nitro/ExtendedDSiHeader.cs @@ -9,29 +9,17 @@ namespace SabreTools.Models.Nitro /// /// Global MBK1..MBK5 Settings /// -#if NET48 - public uint[] GlobalMBK15Settings { get; set; } -#else public uint[]? GlobalMBK15Settings { get; set; } -#endif /// /// Local MBK6..MBK8 Settings for ARM9 /// -#if NET48 - public uint[] LocalMBK68SettingsARM9 { get; set; } -#else public uint[]? LocalMBK68SettingsARM9 { get; set; } -#endif /// /// Local MBK6..MBK8 Settings for ARM7 /// -#if NET48 - public uint[] LocalMBK68SettingsARM7 { get; set; } -#else public uint[]? LocalMBK68SettingsARM7 { get; set; } -#endif /// /// Global MBK9 Setting @@ -166,11 +154,7 @@ namespace SabreTools.Models.Nitro /// /// Unknown (used by DSi) /// -#if NET48 - public byte[] Unknown2 { get; set; } -#else public byte[]? Unknown2 { get; set; } -#endif /// /// Modcrypt area 1 offset @@ -195,11 +179,7 @@ namespace SabreTools.Models.Nitro /// /// Title ID /// -#if NET48 - public byte[] TitleID { get; set; } -#else public byte[]? TitleID { get; set; } -#endif /// /// DSiWare: "public.sav" size @@ -214,118 +194,66 @@ namespace SabreTools.Models.Nitro /// /// Reserved (zero) /// -#if NET48 - public byte[] ReservedZero { get; set; } -#else public byte[]? ReservedZero { get; set; } -#endif /// /// Unknown (used by DSi) /// -#if NET48 - public byte[] Unknown3 { get; set; } -#else public byte[]? Unknown3 { get; set; } -#endif /// /// ARM9 (with encrypted secure area) SHA1 HMAC hash /// -#if NET48 - public byte[] ARM9WithSecureAreaSHA1HMACHash { get; set; } -#else public byte[]? ARM9WithSecureAreaSHA1HMACHash { get; set; } -#endif /// /// ARM7 SHA1 HMAC hash /// -#if NET48 - public byte[] ARM7SHA1HMACHash { get; set; } -#else public byte[]? ARM7SHA1HMACHash { get; set; } -#endif /// /// Digest master SHA1 HMAC hash /// -#if NET48 - public byte[] DigestMasterSHA1HMACHash { get; set; } -#else public byte[]? DigestMasterSHA1HMACHash { get; set; } -#endif /// /// Banner SHA1 HMAC hash /// -#if NET48 - public byte[] BannerSHA1HMACHash { get; set; } -#else public byte[]? BannerSHA1HMACHash { get; set; } -#endif /// /// ARM9i (decrypted) SHA1 HMAC hash /// -#if NET48 - public byte[] ARM9iDecryptedSHA1HMACHash { get; set; } -#else public byte[]? ARM9iDecryptedSHA1HMACHash { get; set; } -#endif /// /// ARM7i (decrypted) SHA1 HMAC hash /// -#if NET48 - public byte[] ARM7iDecryptedSHA1HMACHash { get; set; } -#else public byte[]? ARM7iDecryptedSHA1HMACHash { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved5 { get; set; } -#else public byte[]? Reserved5 { get; set; } -#endif /// /// ARM9 (without secure area) SHA1 HMAC hash /// -#if NET48 - public byte[] ARM9NoSecureAreaSHA1HMACHash { get; set; } -#else public byte[]? ARM9NoSecureAreaSHA1HMACHash { get; set; } -#endif /// /// Reserved /// -#if NET48 - public byte[] Reserved6 { get; set; } -#else public byte[]? Reserved6 { get; set; } -#endif /// /// Reserved and unchecked region, always zero. Used for passing arguments in debug environment. /// -#if NET48 - public byte[] ReservedAndUnchecked { get; set; } -#else public byte[]? ReservedAndUnchecked { get; set; } -#endif /// /// RSA signature (the first 0xE00 bytes of the header are signed with an 1024-bit RSA signature). /// -#if NET48 - public byte[] RSASignature { get; set; } -#else public byte[]? RSASignature { get; set; } -#endif } } \ No newline at end of file diff --git a/Nitro/NameListEntry.cs b/Nitro/NameListEntry.cs index 6883fa2..4da0790 100644 --- a/Nitro/NameListEntry.cs +++ b/Nitro/NameListEntry.cs @@ -17,11 +17,7 @@ namespace SabreTools.Models.Nitro /// /// The variable length name (UTF-8) /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// Only there if it is a folder. Refers to the the index of it diff --git a/Nitro/NameTable.cs b/Nitro/NameTable.cs index c55b9a2..1109fe2 100644 --- a/Nitro/NameTable.cs +++ b/Nitro/NameTable.cs @@ -15,19 +15,11 @@ namespace SabreTools.Models.Nitro /// /// Folder allocation table /// -#if NET48 - public FolderAllocationTableEntry[] FolderAllocationTable { get; set; } -#else public FolderAllocationTableEntry?[]? FolderAllocationTable { get; set; } -#endif /// /// Name list /// -#if NET48 - public NameListEntry[] NameList { get; set; } -#else public NameListEntry?[]? NameList { get; set; } -#endif } } \ No newline at end of file diff --git a/OfflineList/CanOpen.cs b/OfflineList/CanOpen.cs index 8e57011..50087d4 100644 --- a/OfflineList/CanOpen.cs +++ b/OfflineList/CanOpen.cs @@ -7,29 +7,17 @@ namespace SabreTools.Models.OfflineList public class CanOpen { [XmlElement("extension")] -#if NET48 - public string[] Extension { get; set; } -#else public string[]? Extension { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/Configuration.cs b/OfflineList/Configuration.cs index c814525..743198d 100644 --- a/OfflineList/Configuration.cs +++ b/OfflineList/Configuration.cs @@ -7,101 +7,49 @@ namespace SabreTools.Models.OfflineList public class Configuration { [XmlElement("datName")] -#if NET48 - public string DatName { get; set; } -#else public string? DatName { get; set; } -#endif [XmlElement("imFolder")] -#if NET48 - public string ImFolder { get; set; } -#else public string? ImFolder { get; set; } -#endif [XmlElement("datVersion")] -#if NET48 - public string DatVersion { get; set; } -#else public string? DatVersion { get; set; } -#endif [XmlElement("system")] -#if NET48 - public string System { get; set; } -#else public string? System { get; set; } -#endif /// Numeric? [XmlElement("screenshotsWidth")] -#if NET48 - public string ScreenshotsWidth { get; set; } -#else public string? ScreenshotsWidth { get; set; } -#endif /// Numeric? [XmlElement("screenshotsHeight")] -#if NET48 - public string ScreenshotsHeight { get; set; } -#else public string? ScreenshotsHeight { get; set; } -#endif [XmlElement("infos")] -#if NET48 - public Infos Infos { get; set; } -#else public Infos? Infos { get; set; } -#endif [XmlElement("canOpen")] -#if NET48 - public CanOpen CanOpen { get; set; } -#else public CanOpen? CanOpen { get; set; } -#endif [XmlElement("newDat")] -#if NET48 - public NewDat NewDat { get; set; } -#else public NewDat? NewDat { get; set; } -#endif [XmlElement("search")] -#if NET48 - public Search Search { get; set; } -#else public Search? Search { get; set; } -#endif [XmlElement("romTitle")] -#if NET48 - public string RomTitle { get; set; } -#else public string? RomTitle { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/Dat.cs b/OfflineList/Dat.cs index 24c731d..f1e2964 100644 --- a/OfflineList/Dat.cs +++ b/OfflineList/Dat.cs @@ -7,50 +7,26 @@ namespace SabreTools.Models.OfflineList public class Dat { [XmlAttribute(Namespace = "http://www.w3.org/2001/XMLSchema-instance", AttributeName = "noNamespaceSchemaLocation")] -#if NET48 - public string NoNamespaceSchemaLocation { get; set; } -#else public string? NoNamespaceSchemaLocation { get; set; } -#endif [XmlElement("configuration")] -#if NET48 - public Configuration Configuration { get; set; } -#else public Configuration? Configuration { get; set; } -#endif [XmlElement("games")] -#if NET48 - public Games Games { get; set; } -#else public Games? Games { get; set; } -#endif [XmlElement("gui")] -#if NET48 - public GUI GUI { get; set; } -#else public GUI? GUI { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/DatUrl.cs b/OfflineList/DatUrl.cs index ba53ff0..792285b 100644 --- a/OfflineList/DatUrl.cs +++ b/OfflineList/DatUrl.cs @@ -7,36 +7,20 @@ namespace SabreTools.Models.OfflineList public class DatUrl { [XmlAttribute("fileName")] -#if NET48 - public string FileName { get; set; } -#else public string? FileName { get; set; } -#endif [XmlText] -#if NET48 - public string Content { get; set; } -#else public string? Content { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/FileRomCRC.cs b/OfflineList/FileRomCRC.cs index 93a105d..b3691d3 100644 --- a/OfflineList/FileRomCRC.cs +++ b/OfflineList/FileRomCRC.cs @@ -7,36 +7,20 @@ namespace SabreTools.Models.OfflineList public class FileRomCRC { [XmlAttribute("extension")] -#if NET48 - public string Extension { get; set; } -#else public string? Extension { get; set; } -#endif [XmlText] -#if NET48 - public string Content { get; set; } -#else public string? Content { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/Files.cs b/OfflineList/Files.cs index 3945512..e5e0f2a 100644 --- a/OfflineList/Files.cs +++ b/OfflineList/Files.cs @@ -7,29 +7,17 @@ namespace SabreTools.Models.OfflineList public class Files { [XmlElement("romCRC")] -#if NET48 - public FileRomCRC[] RomCRC { get; set; } -#else public FileRomCRC[]? RomCRC { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/Find.cs b/OfflineList/Find.cs index ffca175..652e067 100644 --- a/OfflineList/Find.cs +++ b/OfflineList/Find.cs @@ -7,44 +7,24 @@ namespace SabreTools.Models.OfflineList public class Find { [XmlAttribute("operation")] -#if NET48 - public string Operation { get; set; } -#else public string? Operation { get; set; } -#endif /// Numeric? [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif [XmlText] -#if NET48 - public string Content { get; set; } -#else public string? Content { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/GUI.cs b/OfflineList/GUI.cs index 843b182..0ead2f6 100644 --- a/OfflineList/GUI.cs +++ b/OfflineList/GUI.cs @@ -7,29 +7,17 @@ namespace SabreTools.Models.OfflineList public class GUI { [XmlElement("images")] -#if NET48 - public Images Images { get; set; } -#else public Images? Images { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/Game.cs b/OfflineList/Game.cs index e1bc844..26e3436 100644 --- a/OfflineList/Game.cs +++ b/OfflineList/Game.cs @@ -7,121 +7,57 @@ namespace SabreTools.Models.OfflineList public class Game { [XmlElement("imageNumber")] -#if NET48 - public string ImageNumber { get; set; } -#else public string? ImageNumber { get; set; } -#endif [XmlElement("releaseNumber")] -#if NET48 - public string ReleaseNumber { get; set; } -#else public string? ReleaseNumber { get; set; } -#endif [XmlElement("title")] -#if NET48 - public string Title { get; set; } -#else public string? Title { get; set; } -#endif [XmlElement("saveType")] -#if NET48 - public string SaveType { get; set; } -#else public string? SaveType { get; set; } -#endif /// Numeric [XmlElement("romSize")] -#if NET48 - public string RomSize { get; set; } -#else public string? RomSize { get; set; } -#endif [XmlElement("publisher")] -#if NET48 - public string Publisher { get; set; } -#else public string? Publisher { get; set; } -#endif [XmlElement("location")] -#if NET48 - public string Location { get; set; } -#else public string? Location { get; set; } -#endif [XmlElement("sourceRom")] -#if NET48 - public string SourceRom { get; set; } -#else public string? SourceRom { get; set; } -#endif [XmlElement("language")] -#if NET48 - public string Language { get; set; } -#else public string? Language { get; set; } -#endif [XmlElement("files")] -#if NET48 - public Files Files { get; set; } -#else public Files? Files { get; set; } -#endif [XmlElement("im1CRC")] -#if NET48 - public string Im1CRC { get; set; } -#else public string? Im1CRC { get; set; } -#endif [XmlElement("im2CRC")] -#if NET48 - public string Im2CRC { get; set; } -#else public string? Im2CRC { get; set; } -#endif [XmlElement("comment")] -#if NET48 - public string Comment { get; set; } -#else public string? Comment { get; set; } -#endif [XmlElement("duplicateID")] -#if NET48 - public string DuplicateID { get; set; } -#else public string? DuplicateID { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/Games.cs b/OfflineList/Games.cs index ebc84e1..2098fbf 100644 --- a/OfflineList/Games.cs +++ b/OfflineList/Games.cs @@ -7,29 +7,17 @@ namespace SabreTools.Models.OfflineList public class Games { [XmlElement("game")] -#if NET48 - public Game[] Game { get; set; } -#else public Game[]? Game { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/Image.cs b/OfflineList/Image.cs index 6982f0c..c6ce986 100644 --- a/OfflineList/Image.cs +++ b/OfflineList/Image.cs @@ -7,50 +7,26 @@ namespace SabreTools.Models.OfflineList public class Image { [XmlAttribute("x")] -#if NET48 - public string X { get; set; } -#else public string? X { get; set; } -#endif [XmlAttribute("y")] -#if NET48 - public string Y { get; set; } -#else public string? Y { get; set; } -#endif [XmlAttribute("width")] -#if NET48 - public string Width { get; set; } -#else public string? Width { get; set; } -#endif [XmlAttribute("height")] -#if NET48 - public string Height { get; set; } -#else public string? Height { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/Images.cs b/OfflineList/Images.cs index e1af5a0..7f28b1c 100644 --- a/OfflineList/Images.cs +++ b/OfflineList/Images.cs @@ -7,43 +7,23 @@ namespace SabreTools.Models.OfflineList public class Images { [XmlAttribute("width")] -#if NET48 - public string Width { get; set; } -#else public string? Width { get; set; } -#endif [XmlAttribute("height")] -#if NET48 - public string Height { get; set; } -#else public string? Height { get; set; } -#endif [XmlElement("image")] -#if NET48 - public Image[] Image { get; set; } -#else public Image[]? Image { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/InfoBase.cs b/OfflineList/InfoBase.cs index 527d512..338836f 100644 --- a/OfflineList/InfoBase.cs +++ b/OfflineList/InfoBase.cs @@ -7,45 +7,25 @@ namespace SabreTools.Models.OfflineList { /// Boolean [XmlAttribute("visible")] -#if NET48 - public string Visible { get; set; } -#else public string? Visible { get; set; } -#endif /// Boolean [XmlAttribute("inNamingOption")] -#if NET48 - public string InNamingOption { get; set; } -#else public string? InNamingOption { get; set; } -#endif /// Boolean [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/Infos.cs b/OfflineList/Infos.cs index e94184b..6f10afa 100644 --- a/OfflineList/Infos.cs +++ b/OfflineList/Infos.cs @@ -7,113 +7,53 @@ namespace SabreTools.Models.OfflineList public class Infos { [XmlElement("title")] -#if NET48 - public Title Title { get; set; } -#else public Title? Title { get; set; } -#endif [XmlElement("location")] -#if NET48 - public Location Location { get; set; } -#else public Location? Location { get; set; } -#endif [XmlElement("publisher")] -#if NET48 - public Publisher Publisher { get; set; } -#else public Publisher? Publisher { get; set; } -#endif [XmlElement("sourceRom")] -#if NET48 - public SourceRom SourceRom { get; set; } -#else public SourceRom? SourceRom { get; set; } -#endif [XmlElement("saveType")] -#if NET48 - public SaveType SaveType { get; set; } -#else public SaveType? SaveType { get; set; } -#endif [XmlElement("romSize")] -#if NET48 - public RomSize RomSize { get; set; } -#else public RomSize? RomSize { get; set; } -#endif [XmlElement("releaseNumber")] -#if NET48 - public ReleaseNumber ReleaseNumber { get; set; } -#else public ReleaseNumber? ReleaseNumber { get; set; } -#endif [XmlElement("languageNumber")] -#if NET48 - public LanguageNumber LanguageNumber { get; set; } -#else public LanguageNumber? LanguageNumber { get; set; } -#endif [XmlElement("comment")] -#if NET48 - public Comment Comment { get; set; } -#else public Comment? Comment { get; set; } -#endif [XmlElement("romCRC")] -#if NET48 - public RomCRC RomCRC { get; set; } -#else public RomCRC? RomCRC { get; set; } -#endif [XmlElement("im1CRC")] -#if NET48 - public Im1CRC Im1CRC { get; set; } -#else public Im1CRC? Im1CRC { get; set; } -#endif [XmlElement("im2CRC")] -#if NET48 - public Im2CRC Im2CRC { get; set; } -#else public Im2CRC? Im2CRC { get; set; } -#endif [XmlElement("languages")] -#if NET48 - public Languages Languages { get; set; } -#else public Languages? Languages { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/NewDat.cs b/OfflineList/NewDat.cs index 78da342..817ed28 100644 --- a/OfflineList/NewDat.cs +++ b/OfflineList/NewDat.cs @@ -7,43 +7,23 @@ namespace SabreTools.Models.OfflineList public class NewDat { [XmlElement("datVersionURL")] -#if NET48 - public string DatVersionUrl { get; set; } -#else public string? DatVersionUrl { get; set; } -#endif [XmlElement("datURL")] -#if NET48 - public DatUrl DatUrl { get; set; } -#else public DatUrl? DatUrl { get; set; } -#endif [XmlElement("imURL")] -#if NET48 - public string ImUrl { get; set; } -#else public string? ImUrl { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/Search.cs b/OfflineList/Search.cs index d2c619c..6aca4f8 100644 --- a/OfflineList/Search.cs +++ b/OfflineList/Search.cs @@ -7,29 +7,17 @@ namespace SabreTools.Models.OfflineList public class Search { [XmlElement("to")] -#if NET48 - public To[] To { get; set; } -#else public To[]? To { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OfflineList/To.cs b/OfflineList/To.cs index afb929f..a907db1 100644 --- a/OfflineList/To.cs +++ b/OfflineList/To.cs @@ -7,52 +7,28 @@ namespace SabreTools.Models.OfflineList public class To { [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif /// Boolean [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif /// Boolean [XmlAttribute("auto")] -#if NET48 - public string Auto { get; set; } -#else public string? Auto { get; set; } -#endif [XmlElement("find")] -#if NET48 - public Find[] Find { get; set; } -#else public Find[]? Find { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OpenMSX/Dump.cs b/OpenMSX/Dump.cs index 03ffba7..286b521 100644 --- a/OpenMSX/Dump.cs +++ b/OpenMSX/Dump.cs @@ -7,38 +7,22 @@ namespace SabreTools.Models.OpenMSX public class Dump { [XmlElement("original")] -#if NET48 - public Original Original { get; set; } -#else public Original? Original { get; set; } -#endif [XmlElement("rom", typeof(Rom))] [XmlElement("megarom", typeof(MegaRom))] [XmlElement("sccpluscart", typeof(SCCPlusCart))] -#if NET48 - public RomBase Rom { get; set; } -#else public RomBase? Rom { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OpenMSX/Original.cs b/OpenMSX/Original.cs index df0e1f3..7659b1d 100644 --- a/OpenMSX/Original.cs +++ b/OpenMSX/Original.cs @@ -8,36 +8,20 @@ namespace SabreTools.Models.OpenMSX { /// Boolean? [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif [XmlText] -#if NET48 - public string Content { get; set; } -#else public string? Content { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OpenMSX/RomBase.cs b/OpenMSX/RomBase.cs index b303e7a..dbff0a3 100644 --- a/OpenMSX/RomBase.cs +++ b/OpenMSX/RomBase.cs @@ -9,51 +9,27 @@ namespace SabreTools.Models.OpenMSX public abstract class RomBase { [XmlElement("start")] -#if NET48 - public string Start { get; set; } -#else public string? Start { get; set; } -#endif [XmlElement("type")] -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif /// SHA-1 hash [XmlElement("hash")] -#if NET48 - public string Hash { get; set; } -#else public string? Hash { get; set; } -#endif [XmlElement("remark")] -#if NET48 - public string Remark { get; set; } -#else public string? Remark { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OpenMSX/Software.cs b/OpenMSX/Software.cs index 1d3a781..29167e1 100644 --- a/OpenMSX/Software.cs +++ b/OpenMSX/Software.cs @@ -8,75 +8,39 @@ namespace SabreTools.Models.OpenMSX { [Required] [XmlElement("title")] -#if NET48 - public string Title { get; set; } -#else public string? Title { get; set; } -#endif [XmlElement("genmsxid")] -#if NET48 - public string GenMSXID { get; set; } -#else public string? GenMSXID { get; set; } -#endif [Required] [XmlElement("system")] -#if NET48 - public string System { get; set; } -#else public string? System { get; set; } -#endif [Required] [XmlElement("company")] -#if NET48 - public string Company { get; set; } -#else public string? Company { get; set; } -#endif [Required] [XmlElement("year")] -#if NET48 - public string Year { get; set; } -#else public string? Year { get; set; } -#endif [Required] [XmlElement("country")] -#if NET48 - public string Country { get; set; } -#else public string? Country { get; set; } -#endif [XmlElement("dump")] -#if NET48 - public Dump[] Dump { get; set; } -#else public Dump[]? Dump { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/OpenMSX/SoftwareDb.cs b/OpenMSX/SoftwareDb.cs index a5e7dce..f94db29 100644 --- a/OpenMSX/SoftwareDb.cs +++ b/OpenMSX/SoftwareDb.cs @@ -7,36 +7,20 @@ namespace SabreTools.Models.OpenMSX public class SoftwareDb { [XmlAttribute("timestamp")] -#if NET48 - public string Timestamp { get; set; } -#else public string? Timestamp { get; set; } -#endif [XmlElement("software")] -#if NET48 - public Software[] Software { get; set; } -#else public Software[]? Software { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/PAK/DirectoryItem.cs b/PAK/DirectoryItem.cs index a6e0349..196c376 100644 --- a/PAK/DirectoryItem.cs +++ b/PAK/DirectoryItem.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.PAK /// /// Item Name /// -#if NET48 - public string ItemName { get; set; } -#else public string? ItemName { get; set; } -#endif /// /// Item Offset diff --git a/PAK/File.cs b/PAK/File.cs index fa54c6c..aced1f0 100644 --- a/PAK/File.cs +++ b/PAK/File.cs @@ -9,19 +9,11 @@ namespace SabreTools.Models.PAK /// /// Deserialized directory header data /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Deserialized directory items data /// -#if NET48 - public DirectoryItem[] DirectoryItems { get; set; } -#else public DirectoryItem?[]? DirectoryItems { get; set; } -#endif } } diff --git a/PAK/Header.cs b/PAK/Header.cs index 18a5c68..34e765c 100644 --- a/PAK/Header.cs +++ b/PAK/Header.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.PAK /// /// Signature /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Directory Offset diff --git a/PFF/Archive.cs b/PFF/Archive.cs index 4d787d8..bf14abf 100644 --- a/PFF/Archive.cs +++ b/PFF/Archive.cs @@ -9,28 +9,16 @@ namespace SabreTools.Models.PFF /// /// Archive header /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Segments /// -#if NET48 - public Segment[] Segments { get; set; } -#else public Segment?[]? Segments { get; set; } -#endif /// /// Footer /// -#if NET48 - public Footer Footer { get; set; } -#else public Footer? Footer { get; set; } -#endif } } \ No newline at end of file diff --git a/PFF/Footer.cs b/PFF/Footer.cs index 235d082..0670930 100644 --- a/PFF/Footer.cs +++ b/PFF/Footer.cs @@ -19,10 +19,6 @@ namespace SabreTools.Models.PFF /// /// King tag /// -#if NET48 - public string KingTag { get; set; } -#else public string? KingTag { get; set; } -#endif } } \ No newline at end of file diff --git a/PFF/Header.cs b/PFF/Header.cs index 8c4fe86..9f09f60 100644 --- a/PFF/Header.cs +++ b/PFF/Header.cs @@ -16,11 +16,7 @@ namespace SabreTools.Models.PFF /// Signature /// /// Versions 2 and 3 share the same signature but different header sizes -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Number of files diff --git a/PFF/Segment.cs b/PFF/Segment.cs index 7840bb7..2c975e4 100644 --- a/PFF/Segment.cs +++ b/PFF/Segment.cs @@ -29,11 +29,7 @@ namespace SabreTools.Models.PFF /// /// File name /// -#if NET48 - public string FileName { get; set; } -#else public string? FileName { get; set; } -#endif /// /// Modified date diff --git a/PIC/DiscInformation.cs b/PIC/DiscInformation.cs index 4e82280..ed1e848 100644 --- a/PIC/DiscInformation.cs +++ b/PIC/DiscInformation.cs @@ -29,10 +29,6 @@ /// /// Disc information and emergency brake units /// -#if NET48 - public DiscInformationUnit[] Units { get; set; } -#else public DiscInformationUnit?[]? Units { get; set; } -#endif } } diff --git a/PIC/DiscInformationUnit.cs b/PIC/DiscInformationUnit.cs index d59c545..ac709ce 100644 --- a/PIC/DiscInformationUnit.cs +++ b/PIC/DiscInformationUnit.cs @@ -7,28 +7,16 @@ /// /// Unit header /// -#if NET48 - public DiscInformationUnitHeader Header { get; set; } -#else public DiscInformationUnitHeader? Header { get; set; } -#endif /// /// Unit body /// -#if NET48 - public DiscInformationUnitBody Body { get; set; } -#else public DiscInformationUnitBody? Body { get; set; } -#endif /// /// Unit trailer (BD-R/RE only) /// -#if NET48 - public DiscInformationUnitTrailer Trailer { get; set; } -#else public DiscInformationUnitTrailer? Trailer { get; set; } -#endif } } diff --git a/PIC/DiscInformationUnitBody.cs b/PIC/DiscInformationUnitBody.cs index 1ad475a..a2fce4d 100644 --- a/PIC/DiscInformationUnitBody.cs +++ b/PIC/DiscInformationUnitBody.cs @@ -12,11 +12,7 @@ namespace SabreTools.Models.PIC /// = "BDW" for BD-RE /// = "BDR" for BD-R /// -#if NET48 - public string DiscTypeIdentifier { get; set; } -#else public string? DiscTypeIdentifier { get; set; } -#endif /// /// Disc Size/Class/Version @@ -27,10 +23,6 @@ namespace SabreTools.Models.PIC /// DI Unit Format dependent contents /// /// 52 bytes for BD-ROM, 100 bytes for BD-R/RE -#if NET48 - public byte[] FormatDependentContents { get; set; } -#else public byte[]? FormatDependentContents { get; set; } -#endif } } diff --git a/PIC/DiscInformationUnitHeader.cs b/PIC/DiscInformationUnitHeader.cs index 1946e8b..ed93195 100644 --- a/PIC/DiscInformationUnitHeader.cs +++ b/PIC/DiscInformationUnitHeader.cs @@ -8,11 +8,7 @@ namespace SabreTools.Models.PIC /// Disc Information Identifier "DI" /// Emergency Brake Identifier "EB" /// -#if NET48 - public string DiscInformationIdentifier { get; set; } -#else public string? DiscInformationIdentifier { get; set; } -#endif /// /// Disc Information Format diff --git a/PIC/DiscInformationUnitTrailer.cs b/PIC/DiscInformationUnitTrailer.cs index bc2a762..fe22f11 100644 --- a/PIC/DiscInformationUnitTrailer.cs +++ b/PIC/DiscInformationUnitTrailer.cs @@ -11,21 +11,13 @@ namespace SabreTools.Models.PIC /// Disc Manufacturer ID /// /// 6 bytes -#if NET48 - public byte[] DiscManufacturerID { get; set; } = new byte[6]; -#else public byte[]? DiscManufacturerID { get; set; } = new byte[6]; -#endif /// /// Media Type ID /// /// 3 bytes -#if NET48 - public byte[] MediaTypeID { get; set; } = new byte[3]; -#else public byte[]? MediaTypeID { get; set; } = new byte[3]; -#endif /// /// Time Stamp diff --git a/PlayJ/AudioFile.cs b/PlayJ/AudioFile.cs index 5ed073d..8e0a94c 100644 --- a/PlayJ/AudioFile.cs +++ b/PlayJ/AudioFile.cs @@ -8,20 +8,12 @@ namespace SabreTools.Models.PlayJ /// /// Header /// -#if NET48 - public AudioHeader Header { get; set; } -#else public AudioHeader? Header { get; set; } -#endif /// /// Unknown block 1 /// -#if NET48 - public UnknownBlock1 UnknownBlock1 { get; set; } -#else public UnknownBlock1? UnknownBlock1 { get; set; } -#endif #region V1 Only @@ -34,11 +26,7 @@ namespace SabreTools.Models.PlayJ /// /// Unknown block 3 (V1 only) /// -#if NET48 - public UnknownBlock3 UnknownBlock3 { get; set; } -#else public UnknownBlock3? UnknownBlock3 { get; set; } -#endif #endregion @@ -52,11 +40,7 @@ namespace SabreTools.Models.PlayJ /// /// Data files (V2 only) /// -#if NET48 - public DataFile[] DataFiles { get; set; } -#else public DataFile?[]? DataFiles { get; set; } -#endif // After the data files is a block starting with 0x00000001 // This block then contains highly repeating data, possible audio samples? diff --git a/PlayJ/AudioHeader.cs b/PlayJ/AudioHeader.cs index 6a9b96d..a379d85 100644 --- a/PlayJ/AudioHeader.cs +++ b/PlayJ/AudioHeader.cs @@ -26,11 +26,7 @@ namespace SabreTools.Models.PlayJ /// /// Track name (not null-terminated) /// -#if NET48 - public string Track { get; set; } -#else public string? Track { get; set; } -#endif /// /// Length of the artist name @@ -40,11 +36,7 @@ namespace SabreTools.Models.PlayJ /// /// Artist name (not null-terminated) /// -#if NET48 - public string Artist { get; set; } -#else public string? Artist { get; set; } -#endif /// /// Length of the album name @@ -54,11 +46,7 @@ namespace SabreTools.Models.PlayJ /// /// Album name (not null-terminated) /// -#if NET48 - public string Album { get; set; } -#else public string? Album { get; set; } -#endif /// /// Length of the writer name @@ -68,11 +56,7 @@ namespace SabreTools.Models.PlayJ /// /// Writer name (not null-terminated) /// -#if NET48 - public string Writer { get; set; } -#else public string? Writer { get; set; } -#endif /// /// Length of the publisher name @@ -82,11 +66,7 @@ namespace SabreTools.Models.PlayJ /// /// Publisher name (not null-terminated) /// -#if NET48 - public string Publisher { get; set; } -#else public string? Publisher { get; set; } -#endif /// /// Length of the label name @@ -96,11 +76,7 @@ namespace SabreTools.Models.PlayJ /// /// Label name (not null-terminated) /// -#if NET48 - public string Label { get; set; } -#else public string? Label { get; set; } -#endif /// /// Length of the comments @@ -112,10 +88,6 @@ namespace SabreTools.Models.PlayJ /// Comments (not null-terminated) /// /// Optional field only in some samples -#if NET48 - public string Comments { get; set; } -#else public string? Comments { get; set; } -#endif } } \ No newline at end of file diff --git a/PlayJ/DataFile.cs b/PlayJ/DataFile.cs index 205ceb2..30418e4 100644 --- a/PlayJ/DataFile.cs +++ b/PlayJ/DataFile.cs @@ -13,11 +13,7 @@ namespace SabreTools.Models.PlayJ /// /// Data file name /// -#if NET48 - public string FileName { get; set; } -#else public string? FileName { get; set; } -#endif /// /// Length of the data @@ -27,11 +23,7 @@ namespace SabreTools.Models.PlayJ /// /// Data /// -#if NET48 - public byte[] Data { get; set; } -#else public byte[]? Data { get; set; } -#endif // Notes about Data: // - Each data block in the samples contains a GIF header diff --git a/PlayJ/Playlist.cs b/PlayJ/Playlist.cs index b79d804..8d0a529 100644 --- a/PlayJ/Playlist.cs +++ b/PlayJ/Playlist.cs @@ -8,19 +8,11 @@ namespace SabreTools.Models.PlayJ /// /// Playlist header /// -#if NET48 - public PlaylistHeader Header { get; set; } -#else public PlaylistHeader? Header { get; set; } -#endif /// /// Embedded audio files / headers /// -#if NET48 - public AudioFile[] AudioFiles { get; set; } -#else public AudioFile?[]? AudioFiles { get; set; } -#endif } } \ No newline at end of file diff --git a/PlayJ/PlaylistHeader.cs b/PlayJ/PlaylistHeader.cs index fb0326c..7a90588 100644 --- a/PlayJ/PlaylistHeader.cs +++ b/PlayJ/PlaylistHeader.cs @@ -13,10 +13,6 @@ namespace SabreTools.Models.PlayJ /// /// 52 bytes of unknown data /// -#if NET48 - public byte[] Data { get; set; } -#else public byte[]? Data { get; set; } -#endif } } \ No newline at end of file diff --git a/PlayJ/UnknownBlock1.cs b/PlayJ/UnknownBlock1.cs index 27026ce..9494c39 100644 --- a/PlayJ/UnknownBlock1.cs +++ b/PlayJ/UnknownBlock1.cs @@ -13,11 +13,7 @@ namespace SabreTools.Models.PlayJ /// /// Unknown data /// -#if NET48 - public byte[] Data { get; set; } -#else public byte[]? Data { get; set; } -#endif // Notes about Data: // - Might be UInt16 offset and UInt16 length pairs diff --git a/PlayJ/UnknownBlock3.cs b/PlayJ/UnknownBlock3.cs index fc81f8a..691aaa1 100644 --- a/PlayJ/UnknownBlock3.cs +++ b/PlayJ/UnknownBlock3.cs @@ -8,11 +8,7 @@ namespace SabreTools.Models.PlayJ /// /// Unknown data /// -#if NET48 - public byte[] Data { get; set; } -#else public byte[]? Data { get; set; } -#endif // Notes about Data: // - This may be where the encrypted audio samples live diff --git a/PlayStation3/SFB.cs b/PlayStation3/SFB.cs index a848c11..11bb858 100644 --- a/PlayStation3/SFB.cs +++ b/PlayStation3/SFB.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.PlayStation3 /// /// ".SFB" /// -#if NET48 - public byte[] Magic { get; set; } -#else public byte[]? Magic { get; set; } -#endif /// /// File version(?) @@ -21,21 +17,13 @@ namespace SabreTools.Models.PlayStation3 /// Unknown (zeroes) /// /// 0x18 bytes -#if NET48 - public byte[] Reserved1 { get; set; } -#else public byte[]? Reserved1 { get; set; } -#endif /// /// "HYBRID_FLAG" (Flags type) /// /// 0x10 bytes -#if NET48 - public string FlagsType { get; set; } -#else public string? FlagsType { get; set; } -#endif /// /// Disc Content Data Offset @@ -51,31 +39,19 @@ namespace SabreTools.Models.PlayStation3 /// Unknown (zeroes) /// /// 0x08 bytes -#if NET48 - public byte[] Reserved2 { get; set; } -#else public byte[]? Reserved2 { get; set; } -#endif /// /// "TITLE_ID" (Disc Title Name) /// /// 0x08 bytes -#if NET48 - public string DiscTitleName { get; set; } -#else public string? DiscTitleName { get; set; } -#endif /// /// Unknown (zeroes) /// /// 0x08 bytes -#if NET48 - public byte[] Reserved3 { get; set; } -#else public byte[]? Reserved3 { get; set; } -#endif /// /// Disc Version Data Offset @@ -91,50 +67,30 @@ namespace SabreTools.Models.PlayStation3 /// Unknown (zeroes) /// /// 0x188 bytes -#if NET48 - public byte[] Reserved4 { get; set; } -#else public byte[]? Reserved4 { get; set; } -#endif /// /// Disc Content (Hybrid Flags) /// /// 0x20 bytes -#if NET48 - public string DiscContent { get; set; } -#else public string? DiscContent { get; set; } -#endif /// /// Disc Title /// /// 0x10 bytes -#if NET48 - public string DiscTitle { get; set; } -#else public string? DiscTitle { get; set; } -#endif /// /// Disc Version /// /// 0x10 bytes -#if NET48 - public string DiscVersion { get; set; } -#else public string? DiscVersion { get; set; } -#endif /// /// Unknown (zeroes) /// /// 0x3C0 bytes -#if NET48 - public byte[] Reserved5 { get; set; } -#else public byte[]? Reserved5 { get; set; } -#endif } } diff --git a/PlayStation3/SFO.cs b/PlayStation3/SFO.cs index ff43b66..5788524 100644 --- a/PlayStation3/SFO.cs +++ b/PlayStation3/SFO.cs @@ -6,20 +6,12 @@ namespace SabreTools.Models.PlayStation3 /// /// SFO header /// -#if NET48 - public SFOHeader Header { get; set; } -#else public SFOHeader? Header { get; set; } -#endif /// /// Index table /// -#if NET48 - public SFOIndexTableEntry[] IndexTable { get; set; } -#else public SFOIndexTableEntry[]? IndexTable { get; set; } -#endif /// /// Key table @@ -37,21 +29,13 @@ namespace SabreTools.Models.PlayStation3 /// coincidence caused by the length of the key names used, when this /// happens there is no padding needed) /// -#if NET48 - public string[] KeyTable { get; set; } -#else public string[]? KeyTable { get; set; } -#endif /// /// Padding /// /// Enough bytes to align to 4 bytes -#if NET48 - public byte[] Padding { get; set; } -#else public byte[]? Padding { get; set; } -#endif /// /// Data table @@ -66,10 +50,6 @@ namespace SabreTools.Models.PlayStation3 /// being used). This entries can be considered reserved, and are marked with /// a len = 0 in the associated entry in the index_table /// -#if NET48 - public byte[][] DataTable { get; set; } -#else public byte[][]? DataTable { get; set; } -#endif } } diff --git a/PlayStation3/SFOHeader.cs b/PlayStation3/SFOHeader.cs index 5a6412e..1e8a314 100644 --- a/PlayStation3/SFOHeader.cs +++ b/PlayStation3/SFOHeader.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.PlayStation3 /// /// "\0PSF" /// -#if NET48 - public byte[] Magic { get; set; } -#else public byte[]? Magic { get; set; } -#endif /// /// Version diff --git a/PortableExecutable/AssemblyManifest.cs b/PortableExecutable/AssemblyManifest.cs index 1ced131..337bc7a 100644 --- a/PortableExecutable/AssemblyManifest.cs +++ b/PortableExecutable/AssemblyManifest.cs @@ -7,508 +7,264 @@ namespace SabreTools.Models.PortableExecutable public sealed class AssemblyManifest { [XmlAttribute("manifestVersion")] -#if NET48 - public string ManifestVersion { get; set; } -#else public string? ManifestVersion { get; set; } -#endif #region Group [XmlElement("assemblyIdentity")] -#if NET48 - public AssemblyIdentity[] AssemblyIdentities { get; set; } -#else public AssemblyIdentity?[]? AssemblyIdentities { get; set; } -#endif [XmlElement("noInheritable")] -#if NET48 - public AssemblyNoInheritable[] NoInheritables { get; set; } -#else public AssemblyNoInheritable?[]? NoInheritables { get; set; } -#endif #endregion #region Group [XmlElement("description")] -#if NET48 - public AssemblyDescription Description { get; set; } -#else public AssemblyDescription? Description { get; set; } -#endif [XmlElement("noInherit")] -#if NET48 - public AssemblyNoInherit NoInherit { get; set; } -#else public AssemblyNoInherit? NoInherit { get; set; } -#endif //[XmlElement("noInheritable")] //public AssemblyNoInheritable NoInheritable { get; set; } [XmlElement("comInterfaceExternalProxyStub")] -#if NET48 - public AssemblyCOMInterfaceExternalProxyStub[] COMInterfaceExternalProxyStub { get; set; } -#else public AssemblyCOMInterfaceExternalProxyStub?[]? COMInterfaceExternalProxyStub { get; set; } -#endif [XmlElement("dependency")] -#if NET48 - public AssemblyDependency[] Dependency { get; set; } -#else public AssemblyDependency?[]? Dependency { get; set; } -#endif [XmlElement("file")] -#if NET48 - public AssemblyFile[] File { get; set; } -#else public AssemblyFile?[]? File { get; set; } -#endif [XmlElement("clrClass")] -#if NET48 - public AssemblyCommonLanguageRuntimeClass[] CLRClass { get; set; } -#else public AssemblyCommonLanguageRuntimeClass?[]? CLRClass { get; set; } -#endif [XmlElement("clrSurrogate")] -#if NET48 - public AssemblyCommonLanguageSurrogateClass[] CLRSurrogate { get; set; } -#else public AssemblyCommonLanguageSurrogateClass?[]? CLRSurrogate { get; set; } -#endif #endregion [XmlAnyElement] -#if NET48 - public object[] EverythingElse { get; set; } -#else public object[]? EverythingElse { get; set; } -#endif } /// public sealed class AssemblyActiveCodePage { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyAutoElevate { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyBindingRedirect { [XmlAttribute("oldVersion")] -#if NET48 - public string OldVersion { get; set; } -#else public string? OldVersion { get; set; } -#endif [XmlAttribute("newVersion")] -#if NET48 - public string NewVersion { get; set; } -#else public string? NewVersion { get; set; } -#endif } /// public sealed class AssemblyCOMClass { [XmlAttribute("clsid")] -#if NET48 - public string CLSID { get; set; } -#else public string? CLSID { get; set; } -#endif [XmlAttribute("threadingModel")] -#if NET48 - public string ThreadingModel { get; set; } -#else public string? ThreadingModel { get; set; } -#endif [XmlAttribute("progid")] -#if NET48 - public string ProgID { get; set; } -#else public string? ProgID { get; set; } -#endif [XmlAttribute("tlbid")] -#if NET48 - public string TLBID { get; set; } -#else public string? TLBID { get; set; } -#endif [XmlAttribute("description")] -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif [XmlElement("progid")] -#if NET48 - public AssemblyProgID[] ProgIDs { get; set; } -#else public AssemblyProgID?[]? ProgIDs { get; set; } -#endif } /// public sealed class AssemblyCOMInterfaceExternalProxyStub { [XmlAttribute("iid")] -#if NET48 - public string IID { get; set; } -#else public string? IID { get; set; } -#endif [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("tlbid")] -#if NET48 - public string TLBID { get; set; } -#else public string? TLBID { get; set; } -#endif [XmlAttribute("numMethods")] -#if NET48 - public string NumMethods { get; set; } -#else public string? NumMethods { get; set; } -#endif [XmlAttribute("proxyStubClsid32")] -#if NET48 - public string ProxyStubClsid32 { get; set; } -#else public string? ProxyStubClsid32 { get; set; } -#endif [XmlAttribute("baseInterface")] -#if NET48 - public string BaseInterface { get; set; } -#else public string? BaseInterface { get; set; } -#endif } /// public sealed class AssemblyCOMInterfaceProxyStub { [XmlAttribute("iid")] -#if NET48 - public string IID { get; set; } -#else public string? IID { get; set; } -#endif [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("tlbid")] -#if NET48 - public string TLBID { get; set; } -#else public string? TLBID { get; set; } -#endif [XmlAttribute("numMethods")] -#if NET48 - public string NumMethods { get; set; } -#else public string? NumMethods { get; set; } -#endif [XmlAttribute("proxyStubClsid32")] -#if NET48 - public string ProxyStubClsid32 { get; set; } -#else public string? ProxyStubClsid32 { get; set; } -#endif [XmlAttribute("baseInterface")] -#if NET48 - public string BaseInterface { get; set; } -#else public string? BaseInterface { get; set; } -#endif } /// public sealed class AssemblyCommonLanguageRuntimeClass { [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("clsid")] -#if NET48 - public string CLSID { get; set; } -#else public string? CLSID { get; set; } -#endif [XmlAttribute("progid")] -#if NET48 - public string ProgID { get; set; } -#else public string? ProgID { get; set; } -#endif [XmlAttribute("tlbid")] -#if NET48 - public string TLBID { get; set; } -#else public string? TLBID { get; set; } -#endif [XmlAttribute("description")] -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif [XmlAttribute("runtimeVersion")] -#if NET48 - public string RuntimeVersion { get; set; } -#else public string? RuntimeVersion { get; set; } -#endif [XmlAttribute("threadingModel")] -#if NET48 - public string ThreadingModel { get; set; } -#else public string? ThreadingModel { get; set; } -#endif [XmlElement("progid")] -#if NET48 - public AssemblyProgID[] ProgIDs { get; set; } -#else public AssemblyProgID?[]? ProgIDs { get; set; } -#endif } /// public sealed class AssemblyCommonLanguageSurrogateClass { [XmlAttribute("clsid")] -#if NET48 - public string CLSID { get; set; } -#else public string? CLSID { get; set; } -#endif [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("runtimeVersion")] -#if NET48 - public string RuntimeVersion { get; set; } -#else public string? RuntimeVersion { get; set; } -#endif } /// public sealed class AssemblyDependency { [XmlElement("dependentAssembly")] -#if NET48 - public AssemblyDependentAssembly DependentAssembly { get; set; } -#else public AssemblyDependentAssembly? DependentAssembly { get; set; } -#endif [XmlAttribute("optional")] -#if NET48 - public string Optional { get; set; } -#else public string? Optional { get; set; } -#endif } /// public sealed class AssemblyDependentAssembly { [XmlElement("assemblyIdentity")] -#if NET48 - public AssemblyIdentity AssemblyIdentity { get; set; } -#else public AssemblyIdentity? AssemblyIdentity { get; set; } -#endif [XmlElement("bindingRedirect")] -#if NET48 - public AssemblyBindingRedirect[] BindingRedirect { get; set; } -#else public AssemblyBindingRedirect?[]? BindingRedirect { get; set; } -#endif } /// public sealed class AssemblyDescription { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyDisableTheming { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyDisableWindowFiltering { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyDPIAware { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyDPIAwareness { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyFile { [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("hash")] -#if NET48 - public string Hash { get; set; } -#else public string? Hash { get; set; } -#endif [XmlAttribute("hashalg")] -#if NET48 - public string HashAlgorithm { get; set; } -#else public string? HashAlgorithm { get; set; } -#endif [XmlAttribute("size")] -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif #region Group [XmlElement("comClass")] -#if NET48 - public AssemblyCOMClass[] COMClass { get; set; } -#else public AssemblyCOMClass?[]? COMClass { get; set; } -#endif [XmlElement("comInterfaceProxyStub")] -#if NET48 - public AssemblyCOMInterfaceProxyStub[] COMInterfaceProxyStub { get; set; } -#else public AssemblyCOMInterfaceProxyStub?[]? COMInterfaceProxyStub { get; set; } -#endif [XmlElement("typelib")] -#if NET48 - public AssemblyTypeLib[] Typelib { get; set; } -#else public AssemblyTypeLib?[]? Typelib { get; set; } -#endif [XmlElement("windowClass")] -#if NET48 - public AssemblyWindowClass[] WindowClass { get; set; } -#else public AssemblyWindowClass?[]? WindowClass { get; set; } -#endif #endregion } @@ -517,90 +273,50 @@ namespace SabreTools.Models.PortableExecutable public sealed class AssemblyGDIScaling { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyHeapType { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyHighResolutionScrollingAware { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyIdentity { [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("version")] -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif [XmlAttribute("type")] -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif [XmlAttribute("processorArchitecture")] -#if NET48 - public string ProcessorArchitecture { get; set; } -#else public string? ProcessorArchitecture { get; set; } -#endif [XmlAttribute("publicKeyToken")] -#if NET48 - public string PublicKeyToken { get; set; } -#else public string? PublicKeyToken { get; set; } -#endif [XmlAttribute("language")] -#if NET48 - public string Language { get; set; } -#else public string? Language { get; set; } -#endif } /// public sealed class AssemblyLongPathAware { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// @@ -617,101 +333,57 @@ namespace SabreTools.Models.PortableExecutable public sealed class AssemblyPrinterDriverIsolation { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyProgID { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblySupportedOS { [XmlAttribute("Id")] -#if NET48 - public string Id { get; set; } -#else public string? Id { get; set; } -#endif } /// public sealed class AssemblyTypeLib { [XmlElement("tlbid")] -#if NET48 - public string TLBID { get; set; } -#else public string? TLBID { get; set; } -#endif [XmlElement("version")] -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif [XmlElement("helpdir")] -#if NET48 - public string HelpDir { get; set; } -#else public string? HelpDir { get; set; } -#endif [XmlElement("resourceid")] -#if NET48 - public string ResourceID { get; set; } -#else public string? ResourceID { get; set; } -#endif [XmlElement("flags")] -#if NET48 - public string Flags { get; set; } -#else public string? Flags { get; set; } -#endif } /// public sealed class AssemblyUltraHighResolutionScrollingAware { [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } /// public sealed class AssemblyWindowClass { [XmlAttribute("versioned")] -#if NET48 - public string Versioned { get; set; } -#else public string? Versioned { get; set; } -#endif [XmlText] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } // TODO: Left off at diff --git a/PortableExecutable/AttributeCertificateTableEntry.cs b/PortableExecutable/AttributeCertificateTableEntry.cs index d002d42..042466d 100644 --- a/PortableExecutable/AttributeCertificateTableEntry.cs +++ b/PortableExecutable/AttributeCertificateTableEntry.cs @@ -58,10 +58,6 @@ /// Contains a certificate, such as an Authenticode signature. /// /// -#if NET48 - public byte[] Certificate { get; set; } -#else public byte[]? Certificate { get; set; } -#endif } } diff --git a/PortableExecutable/BaseRelocationBlock.cs b/PortableExecutable/BaseRelocationBlock.cs index 29ccf07..6fc7abe 100644 --- a/PortableExecutable/BaseRelocationBlock.cs +++ b/PortableExecutable/BaseRelocationBlock.cs @@ -46,10 +46,6 @@ /// in the Page RVA field for the block. This offset /// specifies where the base relocation is to be applied. /// -#if NET48 - public BaseRelocationTypeOffsetFieldEntry[] TypeOffsetFieldEntries { get; set; } -#else public BaseRelocationTypeOffsetFieldEntry?[]? TypeOffsetFieldEntries { get; set; } -#endif } } diff --git a/PortableExecutable/COFFStringTable.cs b/PortableExecutable/COFFStringTable.cs index 0c4c465..2e1735c 100644 --- a/PortableExecutable/COFFStringTable.cs +++ b/PortableExecutable/COFFStringTable.cs @@ -20,10 +20,6 @@ /// Following the size are null-terminated strings that are pointed to by symbols /// in the COFF symbol table. /// -#if NET48 - public string[] Strings { get; set; } -#else public string[]? Strings { get; set; } -#endif } } diff --git a/PortableExecutable/COFFSymbolTableEntry.cs b/PortableExecutable/COFFSymbolTableEntry.cs index 774c3d9..7129ec6 100644 --- a/PortableExecutable/COFFSymbolTableEntry.cs +++ b/PortableExecutable/COFFSymbolTableEntry.cs @@ -26,11 +26,7 @@ /// An array of 8 bytes. This array is padded with nulls on the right if /// the name is less than 8 bytes long. /// -#if NET48 - public byte[] ShortName { get; set; } = new byte[8]; -#else public byte[]? ShortName { get; set; } = new byte[8]; -#endif /// /// A field that is set to all zeros if the name is longer than 8 bytes. @@ -162,11 +158,7 @@ /// /// Unused /// -#if NET48 - public byte[] AuxFormat2Unused2 { get; set; } = new byte[6]; -#else public byte[]? AuxFormat2Unused2 { get; set; } = new byte[6]; -#endif /// /// The symbol-table index of the next .bf symbol record. If the function is the @@ -217,11 +209,7 @@ /// /// Unused /// -#if NET48 - public byte[] AuxFormat3Unused { get; set; } = new byte[10]; -#else public byte[]? AuxFormat3Unused { get; set; } = new byte[10]; -#endif #endregion @@ -235,11 +223,7 @@ /// An ANSI string that gives the name of the source file. This is padded /// with nulls if it is less than the maximum length. /// -#if NET48 - public byte[] AuxFormat4FileName { get; set; } = new byte[18]; -#else public byte[]? AuxFormat4FileName { get; set; } = new byte[18]; -#endif #endregion @@ -287,11 +271,7 @@ /// /// Unused /// -#if NET48 - public byte[] AuxFormat5Unused { get; set; } = new byte[3]; -#else public byte[]? AuxFormat5Unused { get; set; } = new byte[3]; -#endif #endregion @@ -318,11 +298,7 @@ /// /// Reserved, must be zero. /// -#if NET48 - public byte[] AuxFormat6Reserved2 { get; set; } = new byte[12]; -#else public byte[]? AuxFormat6Reserved2 { get; set; } = new byte[12]; -#endif #endregion diff --git a/PortableExecutable/CursorAndIconResource.cs b/PortableExecutable/CursorAndIconResource.cs index 81ea13a..9651e1c 100644 --- a/PortableExecutable/CursorAndIconResource.cs +++ b/PortableExecutable/CursorAndIconResource.cs @@ -33,11 +33,7 @@ /// /// Describes keyboard accelerator characteristics. /// -#if NET48 - public NewHeader NEWHEADER { get; set; } -#else public NewHeader? NEWHEADER { get; set; } -#endif // TODO: Add array of entries in the resource } diff --git a/PortableExecutable/DebugTable.cs b/PortableExecutable/DebugTable.cs index 595e862..709bca0 100644 --- a/PortableExecutable/DebugTable.cs +++ b/PortableExecutable/DebugTable.cs @@ -33,10 +33,6 @@ /// file and is not mapped into the run-time address space). If it is mapped, /// the RVA is its address. /// -#if NET48 - public DebugDirectoryEntry[] DebugDirectoryTable { get; set; } -#else public DebugDirectoryEntry?[]? DebugDirectoryTable { get; set; } -#endif } } diff --git a/PortableExecutable/DialogBoxResource.cs b/PortableExecutable/DialogBoxResource.cs index 375776b..6b0ddb4 100644 --- a/PortableExecutable/DialogBoxResource.cs +++ b/PortableExecutable/DialogBoxResource.cs @@ -14,20 +14,12 @@ /// /// Dialog box header structure /// -#if NET48 - public DialogTemplate DialogTemplate { get; set; } -#else public DialogTemplate? DialogTemplate { get; set; } -#endif /// /// Dialog box extended header structure /// -#if NET48 - public DialogTemplateExtended ExtendedDialogTemplate { get; set; } -#else public DialogTemplateExtended? ExtendedDialogTemplate { get; set; } -#endif #endregion @@ -39,11 +31,7 @@ /// box. The cdit member specifies the number of DLGITEMTEMPLATE structures in the template. /// These DLGITEMTEMPLATE structures must be aligned on DWORD boundaries. /// -#if NET48 - public DialogItemTemplate[] DialogItemTemplates { get; set; } -#else public DialogItemTemplate?[]? DialogItemTemplates { get; set; } -#endif /// /// Following the DLGTEMPLATEEX header in an extended dialog box template is one or more @@ -51,11 +39,7 @@ /// member of the DLGITEMTEMPLATEEX structure specifies the number of DLGITEMTEMPLATEEX /// structures that follow in the template. /// -#if NET48 - public DialogItemTemplateExtended[] ExtendedDialogItemTemplates { get; set; } -#else public DialogItemTemplateExtended?[]? ExtendedDialogItemTemplates { get; set; } -#endif #endregion } diff --git a/PortableExecutable/DialogItemTemplate.cs b/PortableExecutable/DialogItemTemplate.cs index a8d4f77..1f771f6 100644 --- a/PortableExecutable/DialogItemTemplate.cs +++ b/PortableExecutable/DialogItemTemplate.cs @@ -86,11 +86,7 @@ /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// -#if NET48 - public string ClassResource { get; set; } -#else public string? ClassResource { get; set; } -#endif /// /// The ordinal value of a predefined system class. @@ -109,11 +105,7 @@ /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// -#if NET48 - public string TitleResource { get; set; } -#else public string? TitleResource { get; set; } -#endif /// /// An ordinal value of a resource, such as an icon, in an executable file @@ -133,10 +125,6 @@ /// When the system creates the control, it passes a pointer to this data in the lParam parameter of the /// WM_CREATE message that it sends to the control. /// -#if NET48 - public byte[] CreationData { get; set; } -#else public byte[]? CreationData { get; set; } -#endif } } diff --git a/PortableExecutable/DialogItemTemplateExtended.cs b/PortableExecutable/DialogItemTemplateExtended.cs index 3a81175..9fa7d3b 100644 --- a/PortableExecutable/DialogItemTemplateExtended.cs +++ b/PortableExecutable/DialogItemTemplateExtended.cs @@ -84,11 +84,7 @@ /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// -#if NET48 - public string ClassResource { get; set; } -#else public string? ClassResource { get; set; } -#endif /// /// The ordinal value of a predefined system class. @@ -107,11 +103,7 @@ /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// -#if NET48 - public string TitleResource { get; set; } -#else public string? TitleResource { get; set; } -#endif /// /// An ordinal value of a resource, such as an icon, in an executable file @@ -131,10 +123,6 @@ /// When the system creates the control, it passes a pointer to this data in the lParam parameter of the /// WM_CREATE message that it sends to the control. /// -#if NET48 - public byte[] CreationData { get; set; } -#else public byte[]? CreationData { get; set; } -#endif } } diff --git a/PortableExecutable/DialogTemplate.cs b/PortableExecutable/DialogTemplate.cs index 49865c8..33b53ec 100644 --- a/PortableExecutable/DialogTemplate.cs +++ b/PortableExecutable/DialogTemplate.cs @@ -96,11 +96,7 @@ /// If you specify character strings in the menu, class, title, or typeface arrays, you must use /// Unicode strings. /// -#if NET48 - public string MenuResource { get; set; } -#else public string? MenuResource { get; set; } -#endif /// /// The ordinal value of a menu resource in an executable file. @@ -119,11 +115,7 @@ /// If you specify character strings in the menu, class, title, or typeface arrays, you must use /// Unicode strings. /// -#if NET48 - public string ClassResource { get; set; } -#else public string? ClassResource { get; set; } -#endif /// /// The ordinal value of a predefined system class. @@ -139,11 +131,7 @@ /// If you specify character strings in the menu, class, title, or typeface arrays, you must use /// Unicode strings. /// -#if NET48 - public string TitleResource { get; set; } -#else public string? TitleResource { get; set; } -#endif /// /// The 16-bit point size value and the typeface array follow the title array, but only if the @@ -167,10 +155,6 @@ /// If you specify character strings in the menu, class, title, or typeface arrays, you must use /// Unicode strings. /// -#if NET48 - public string Typeface { get; set; } -#else public string? Typeface { get; set; } -#endif } } diff --git a/PortableExecutable/DialogTemplateExtended.cs b/PortableExecutable/DialogTemplateExtended.cs index 3e94aed..2838ccb 100644 --- a/PortableExecutable/DialogTemplateExtended.cs +++ b/PortableExecutable/DialogTemplateExtended.cs @@ -107,11 +107,7 @@ /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// -#if NET48 - public string MenuResource { get; set; } -#else public string? MenuResource { get; set; } -#endif /// /// The ordinal value of a menu resource in an executable file. @@ -129,11 +125,7 @@ /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// -#if NET48 - public string ClassResource { get; set; } -#else public string? ClassResource { get; set; } -#endif /// /// The ordinal value of a predefined system window class. @@ -148,11 +140,7 @@ /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// -#if NET48 - public string TitleResource { get; set; } -#else public string? TitleResource { get; set; } -#endif /// /// The point size of the font to use for the text in the dialog box and its controls. @@ -192,10 +180,6 @@ /// If you specify character strings in the class and title arrays, you must use Unicode strings. Use the /// MultiByteToWideChar function to generate Unicode strings from ANSI strings. /// -#if NET48 - public string Typeface { get; set; } -#else public string? Typeface { get; set; } -#endif } } diff --git a/PortableExecutable/DirEntry.cs b/PortableExecutable/DirEntry.cs index cf30907..1e7629c 100644 --- a/PortableExecutable/DirEntry.cs +++ b/PortableExecutable/DirEntry.cs @@ -16,10 +16,6 @@ /// The FONTDIRENTRY structure for the specified font directly follows the DIRENTRY structure /// for that font. /// -#if NET48 - public FontDirEntry Entry { get; set; } -#else public FontDirEntry? Entry { get; set; } -#endif } } diff --git a/PortableExecutable/Executable.cs b/PortableExecutable/Executable.cs index b910396..e8d0290 100644 --- a/PortableExecutable/Executable.cs +++ b/PortableExecutable/Executable.cs @@ -12,40 +12,24 @@ namespace SabreTools.Models.PortableExecutable /// /// MS-DOS executable stub /// -#if NET48 - public MSDOS.Executable Stub { get; set; } -#else public MSDOS.Executable? Stub { get; set; } -#endif /// /// After the MS-DOS stub, at the file offset specified at offset 0x3c, is a 4-byte /// signature that identifies the file as a PE format image file. This signature is "PE\0\0" /// (the letters "P" and "E" followed by two null bytes). /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// COFF file header /// -#if NET48 - public COFFFileHeader COFFFileHeader { get; set; } -#else public COFFFileHeader? COFFFileHeader { get; set; } -#endif /// /// Optional header /// -#if NET48 - public OptionalHeader OptionalHeader { get; set; } -#else public OptionalHeader? OptionalHeader { get; set; } -#endif // TODO: Support grouped sections in section reading and parsing // https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#grouped-sections-object-only @@ -56,47 +40,27 @@ namespace SabreTools.Models.PortableExecutable /// /// Section table /// -#if NET48 - public SectionHeader[] SectionTable { get; set; } -#else public SectionHeader?[]? SectionTable { get; set; } -#endif /// /// COFF symbol table /// -#if NET48 - public COFFSymbolTableEntry[] COFFSymbolTable { get; set; } -#else public COFFSymbolTableEntry?[]? COFFSymbolTable { get; set; } -#endif /// /// COFF string table /// -#if NET48 - public COFFStringTable COFFStringTable { get; set; } -#else public COFFStringTable? COFFStringTable { get; set; } -#endif /// /// Attribute certificate table /// -#if NET48 - public AttributeCertificateTableEntry[] AttributeCertificateTable { get; set; } -#else public AttributeCertificateTableEntry?[]? AttributeCertificateTable { get; set; } -#endif /// /// Delay-load directory table /// -#if NET48 - public DelayLoadDirectoryTable DelayLoadDirectoryTable { get; set; } -#else public DelayLoadDirectoryTable? DelayLoadDirectoryTable { get; set; } -#endif #region Named Sections @@ -107,20 +71,12 @@ namespace SabreTools.Models.PortableExecutable /// /// Base relocation table (.reloc) /// -#if NET48 - public BaseRelocationBlock[] BaseRelocationTable { get; set; } -#else public BaseRelocationBlock?[]? BaseRelocationTable { get; set; } -#endif /// /// Debug table (.debug*) /// -#if NET48 - public DebugTable DebugTable { get; set; } -#else public DebugTable? DebugTable { get; set; } -#endif // .drectve - A section is a directive section if it has the IMAGE_SCN_LNK_INFO // flag set in the section header and has the .drectve section name. The linker @@ -141,29 +97,17 @@ namespace SabreTools.Models.PortableExecutable /// /// Export table (.edata) /// -#if NET48 - public ExportTable ExportTable { get; set; } -#else public ExportTable? ExportTable { get; set; } -#endif /// /// Import table (.idata) /// -#if NET48 - public ImportTable ImportTable { get; set; } -#else public ImportTable? ImportTable { get; set; } -#endif /// /// Resource directory table (.rsrc) /// -#if NET48 - public ResourceDirectoryTable ResourceDirectoryTable { get; set; } -#else public ResourceDirectoryTable? ResourceDirectoryTable { get; set; } -#endif // .sxdata - The valid exception handlers of an object are listed in the .sxdata // section of that object. The section is marked IMAGE_SCN_LNK_INFO. It contains diff --git a/PortableExecutable/ExportDirectoryTable.cs b/PortableExecutable/ExportDirectoryTable.cs index dbe4f98..838c4f9 100644 --- a/PortableExecutable/ExportDirectoryTable.cs +++ b/PortableExecutable/ExportDirectoryTable.cs @@ -39,11 +39,7 @@ /// /// ASCII string that contains the name of the DLL. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// The starting ordinal number for exports in this image. This field specifies diff --git a/PortableExecutable/ExportNamePointerTable.cs b/PortableExecutable/ExportNamePointerTable.cs index 2cae1f7..83db9fb 100644 --- a/PortableExecutable/ExportNamePointerTable.cs +++ b/PortableExecutable/ExportNamePointerTable.cs @@ -13,10 +13,6 @@ /// /// The pointers are 32 bits each and are relative to the image base. /// -#if NET48 - public uint[] Pointers { get; set; } -#else public uint[]? Pointers { get; set; } -#endif } } diff --git a/PortableExecutable/ExportNameTable.cs b/PortableExecutable/ExportNameTable.cs index 99cc296..c3df14c 100644 --- a/PortableExecutable/ExportNameTable.cs +++ b/PortableExecutable/ExportNameTable.cs @@ -22,10 +22,6 @@ /// /// A series of null-terminated ASCII strings of variable length. /// -#if NET48 - public string[] Strings { get; set; } -#else public string[]? Strings { get; set; } -#endif } } diff --git a/PortableExecutable/ExportOrdinalTable.cs b/PortableExecutable/ExportOrdinalTable.cs index 58f3330..1025e92 100644 --- a/PortableExecutable/ExportOrdinalTable.cs +++ b/PortableExecutable/ExportOrdinalTable.cs @@ -37,10 +37,6 @@ /// /// An array of 16-bit unbiased indexes into the export address table /// -#if NET48 - public ushort[] Indexes { get; set; } -#else public ushort[]? Indexes { get; set; } -#endif } } diff --git a/PortableExecutable/ExportTable.cs b/PortableExecutable/ExportTable.cs index 5e6a570..3a2f1f6 100644 --- a/PortableExecutable/ExportTable.cs +++ b/PortableExecutable/ExportTable.cs @@ -19,11 +19,7 @@ /// A table with just one row (unlike the debug directory). This table indicates the /// locations and sizes of the other export tables. /// -#if NET48 - public ExportDirectoryTable ExportDirectoryTable { get; set; } -#else public ExportDirectoryTable? ExportDirectoryTable { get; set; } -#endif /// /// An array of RVAs of exported symbols. These are the actual addresses of the exported @@ -31,20 +27,12 @@ /// can import a symbol by using an index to this table (an ordinal) or, optionally, by /// using the public name that corresponds to the ordinal if a public name is defined. /// -#if NET48 - public ExportAddressTableEntry[] ExportAddressTable { get; set; } -#else public ExportAddressTableEntry?[]? ExportAddressTable { get; set; } -#endif /// /// An array of pointers to the public export names, sorted in ascending order. /// -#if NET48 - public ExportNamePointerTable NamePointerTable { get; set; } -#else public ExportNamePointerTable? NamePointerTable { get; set; } -#endif /// /// An array of the ordinals that correspond to members of the name pointer table. The @@ -52,11 +40,7 @@ /// must have the same number of members. Each ordinal is an index into the export address /// table. /// -#if NET48 - public ExportOrdinalTable OrdinalTable { get; set; } -#else public ExportOrdinalTable? OrdinalTable { get; set; } -#endif /// /// A series of null-terminated ASCII strings. Members of the name pointer table point into @@ -64,10 +48,6 @@ /// exported; they are not necessarily the same as the private names that are used within /// the image file. /// -#if NET48 - public ExportNameTable ExportNameTable { get; set; } -#else public ExportNameTable? ExportNameTable { get; set; } -#endif } } diff --git a/PortableExecutable/FontDirEntry.cs b/PortableExecutable/FontDirEntry.cs index f16b628..13dddef 100644 --- a/PortableExecutable/FontDirEntry.cs +++ b/PortableExecutable/FontDirEntry.cs @@ -22,11 +22,7 @@ /// The font supplier's copyright information. /// /// 60 characters -#if NET48 - public byte[] Copyright { get; set; } -#else public byte[]? Copyright { get; set; } -#endif /// /// The type of font file. @@ -168,19 +164,11 @@ /// /// The name of the device if this font file is designated for a specific device. /// -#if NET48 - public string DeviceName { get; set; } -#else public string? DeviceName { get; set; } -#endif /// /// The typeface name of the font. /// -#if NET48 - public string FaceName { get; set; } -#else public string? FaceName { get; set; } -#endif } } diff --git a/PortableExecutable/FontGroupHeader.cs b/PortableExecutable/FontGroupHeader.cs index edfd195..c6f8d9e 100644 --- a/PortableExecutable/FontGroupHeader.cs +++ b/PortableExecutable/FontGroupHeader.cs @@ -16,10 +16,6 @@ /// A structure that contains a unique ordinal identifier for each font in the resource. The DE /// member is a placeholder for the variable-length array of DIRENTRY structures. /// -#if NET48 - public DirEntry[] DE { get; set; } -#else public DirEntry?[]? DE { get; set; } -#endif } } diff --git a/PortableExecutable/HintNameTableEntry.cs b/PortableExecutable/HintNameTableEntry.cs index b56f778..2ced00c 100644 --- a/PortableExecutable/HintNameTableEntry.cs +++ b/PortableExecutable/HintNameTableEntry.cs @@ -18,10 +18,6 @@ /// must be matched to the public name in the DLL. This string is case sensitive /// and terminated by a null byte. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif } } diff --git a/PortableExecutable/ImportDirectoryTableEntry.cs b/PortableExecutable/ImportDirectoryTableEntry.cs index feedb6e..12d67d0 100644 --- a/PortableExecutable/ImportDirectoryTableEntry.cs +++ b/PortableExecutable/ImportDirectoryTableEntry.cs @@ -39,11 +39,7 @@ /// /// ASCII string that contains the name of the DLL. /// -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif /// /// The RVA of the import address table. The contents of this table are identical diff --git a/PortableExecutable/ImportTable.cs b/PortableExecutable/ImportTable.cs index 0cc69e3..e588c16 100644 --- a/PortableExecutable/ImportTable.cs +++ b/PortableExecutable/ImportTable.cs @@ -23,39 +23,23 @@ namespace SabreTools.Models.PortableExecutable /// The import information begins with the import directory table, which describes the /// remainder of the import information. /// -#if NET48 - public ImportDirectoryTableEntry[] ImportDirectoryTable { get; set; } -#else public ImportDirectoryTableEntry?[]? ImportDirectoryTable { get; set; } -#endif /// /// An import lookup table is an array of 32-bit numbers for PE32 or an array of 64-bit /// numbers for PE32+. /// -#if NET48 - public Dictionary ImportLookupTables { get; set; } -#else public Dictionary? ImportLookupTables { get; set; } -#endif /// /// These addresses are the actual memory addresses of the symbols, although technically /// they are still called "virtual addresses". /// -#if NET48 - public Dictionary ImportAddressTables { get; set; } -#else public Dictionary? ImportAddressTables { get; set; } -#endif /// /// One hint/name table suffices for the entire import section. /// -#if NET48 - public HintNameTableEntry[] HintNameTable { get; set; } -#else public HintNameTableEntry?[]? HintNameTable { get; set; } -#endif } } diff --git a/PortableExecutable/LoadConfigurationDirectory.cs b/PortableExecutable/LoadConfigurationDirectory.cs index 4e153c2..8986db5 100644 --- a/PortableExecutable/LoadConfigurationDirectory.cs +++ b/PortableExecutable/LoadConfigurationDirectory.cs @@ -282,11 +282,7 @@ /// Code integrity information. /// /// 12 bytes -#if NET48 - public byte[] CodeIntegrity { get; set; } -#else public byte[]? CodeIntegrity { get; set; } -#endif #region GuardAddressTakenIatEntryTable diff --git a/PortableExecutable/MenuItem.cs b/PortableExecutable/MenuItem.cs index cb745a3..8920688 100644 --- a/PortableExecutable/MenuItem.cs +++ b/PortableExecutable/MenuItem.cs @@ -24,11 +24,7 @@ /// A null-terminated Unicode string that contains the text for this menu item. /// There is no fixed limit on the size of this string. /// -#if NET48 - public string NormalMenuText { get; set; } -#else public string? NormalMenuText { get; set; } -#endif #endregion @@ -59,11 +55,7 @@ /// A null-terminated Unicode string that contains the text for this menu item. /// There is no fixed limit on the size of this string. /// -#if NET48 - public string PopupMenuText { get; set; } -#else public string? PopupMenuText { get; set; } -#endif #endregion } diff --git a/PortableExecutable/MenuItemExtended.cs b/PortableExecutable/MenuItemExtended.cs index dd83d52..771fedc 100644 --- a/PortableExecutable/MenuItemExtended.cs +++ b/PortableExecutable/MenuItemExtended.cs @@ -32,10 +32,6 @@ /// A null-terminated Unicode string that contains the text for this menu item. /// There is no fixed limit on the size of this string. /// -#if NET48 - public string MenuText { get; set; } -#else public string? MenuText { get; set; } -#endif } } diff --git a/PortableExecutable/MenuResource.cs b/PortableExecutable/MenuResource.cs index b384422..cfa3083 100644 --- a/PortableExecutable/MenuResource.cs +++ b/PortableExecutable/MenuResource.cs @@ -14,20 +14,12 @@ /// /// Menu header structure /// -#if NET48 - public MenuHeader MenuHeader { get; set; } -#else public MenuHeader? MenuHeader { get; set; } -#endif /// /// Menu extended header structure /// -#if NET48 - public MenuHeaderExtended ExtendedMenuHeader { get; set; } -#else public MenuHeaderExtended? ExtendedMenuHeader { get; set; } -#endif #endregion @@ -36,20 +28,12 @@ /// /// Menu items /// -#if NET48 - public MenuItem[] MenuItems { get; set; } -#else public MenuItem?[]? MenuItems { get; set; } -#endif /// /// Extended menu items /// -#if NET48 - public MenuItemExtended[] ExtendedMenuItems { get; set; } -#else public MenuItemExtended?[]? ExtendedMenuItems { get; set; } -#endif #endregion } diff --git a/PortableExecutable/MessageResourceData.cs b/PortableExecutable/MessageResourceData.cs index 9228c1d..32cbfef 100644 --- a/PortableExecutable/MessageResourceData.cs +++ b/PortableExecutable/MessageResourceData.cs @@ -17,19 +17,11 @@ namespace SabreTools.Models.PortableExecutable /// /// An array of structures. The array is the size indicated by the NumberOfBlocks member. /// -#if NET48 - public MessageResourceBlock[] Blocks { get; set; } -#else public MessageResourceBlock?[]? Blocks { get; set; } -#endif /// /// Message resource entries /// -#if NET48 - public Dictionary Entries { get; set; } -#else public Dictionary? Entries { get; set; } -#endif } } diff --git a/PortableExecutable/MessageResourceEntry.cs b/PortableExecutable/MessageResourceEntry.cs index 4400db0..fc2bf2f 100644 --- a/PortableExecutable/MessageResourceEntry.cs +++ b/PortableExecutable/MessageResourceEntry.cs @@ -20,10 +20,6 @@ /// /// Pointer to an array that contains the error message or message box display text. /// -#if NET48 - public string Text { get; set; } -#else public string? Text { get; set; } -#endif } } diff --git a/PortableExecutable/NB10ProgramDatabase.cs b/PortableExecutable/NB10ProgramDatabase.cs index 0b10a97..591ad33 100644 --- a/PortableExecutable/NB10ProgramDatabase.cs +++ b/PortableExecutable/NB10ProgramDatabase.cs @@ -34,10 +34,6 @@ /// Null-terminated name of the PDB file. It can also contain full /// or partial path to the file. /// -#if NET48 - public string PdbFileName { get; set; } -#else public string? PdbFileName { get; set; } -#endif } } diff --git a/PortableExecutable/OptionalHeader.cs b/PortableExecutable/OptionalHeader.cs index 02d4b6a..4f7051c 100644 --- a/PortableExecutable/OptionalHeader.cs +++ b/PortableExecutable/OptionalHeader.cs @@ -275,65 +275,37 @@ /// /// The export table address and size. /// -#if NET48 - public DataDirectory ExportTable { get; set; } -#else public DataDirectory? ExportTable { get; set; } -#endif /// /// The import table address and size. /// -#if NET48 - public DataDirectory ImportTable { get; set; } -#else public DataDirectory? ImportTable { get; set; } -#endif /// /// The resource table address and size. /// -#if NET48 - public DataDirectory ResourceTable { get; set; } -#else public DataDirectory? ResourceTable { get; set; } -#endif /// /// The exception table address and size. /// -#if NET48 - public DataDirectory ExceptionTable { get; set; } -#else public DataDirectory? ExceptionTable { get; set; } -#endif /// /// The attribute certificate table address and size. /// -#if NET48 - public DataDirectory CertificateTable { get; set; } -#else public DataDirectory? CertificateTable { get; set; } -#endif /// /// The base relocation table address and size. /// -#if NET48 - public DataDirectory BaseRelocationTable { get; set; } -#else public DataDirectory? BaseRelocationTable { get; set; } -#endif /// /// The debug data starting address and size. /// -#if NET48 - public DataDirectory Debug { get; set; } -#else public DataDirectory? Debug { get; set; } -#endif /// /// Reserved, must be 0 @@ -344,65 +316,37 @@ /// The RVA of the value to be stored in the global pointer register. /// The size member of this structure must be set to zero. /// -#if NET48 - public DataDirectory GlobalPtr { get; set; } -#else public DataDirectory? GlobalPtr { get; set; } -#endif /// /// The thread local storage (TLS) table address and size. /// -#if NET48 - public DataDirectory ThreadLocalStorageTable { get; set; } -#else public DataDirectory? ThreadLocalStorageTable { get; set; } -#endif /// /// The load configuration table address and size. /// -#if NET48 - public DataDirectory LoadConfigTable { get; set; } -#else public DataDirectory? LoadConfigTable { get; set; } -#endif /// /// The bound import table address and size. /// -#if NET48 - public DataDirectory BoundImport { get; set; } -#else public DataDirectory? BoundImport { get; set; } -#endif /// /// The import address table address and size /// -#if NET48 - public DataDirectory ImportAddressTable { get; set; } -#else public DataDirectory? ImportAddressTable { get; set; } -#endif /// /// The delay import descriptor address and size. /// -#if NET48 - public DataDirectory DelayImportDescriptor { get; set; } -#else public DataDirectory? DelayImportDescriptor { get; set; } -#endif /// /// The CLR runtime header address and size. /// -#if NET48 - public DataDirectory CLRRuntimeHeader { get; set; } -#else public DataDirectory? CLRRuntimeHeader { get; set; } -#endif /// /// Reserved, must be zero diff --git a/PortableExecutable/RSDSProgramDatabase.cs b/PortableExecutable/RSDSProgramDatabase.cs index 23113e3..3c6a992 100644 --- a/PortableExecutable/RSDSProgramDatabase.cs +++ b/PortableExecutable/RSDSProgramDatabase.cs @@ -29,10 +29,6 @@ namespace SabreTools.Models.PortableExecutable /// /// zero terminated UTF8 path and file name /// -#if NET48 - public string PathAndFileName { get; set; } -#else public string? PathAndFileName { get; set; } -#endif } } diff --git a/PortableExecutable/ResourceDataEntry.cs b/PortableExecutable/ResourceDataEntry.cs index 804649e..a06ba5b 100644 --- a/PortableExecutable/ResourceDataEntry.cs +++ b/PortableExecutable/ResourceDataEntry.cs @@ -24,11 +24,7 @@ /// /// The resource data that is pointed to by the Data RVA field. /// -#if NET48 - public byte[] Data { get; set; } -#else public byte[]? Data { get; set; } -#endif /// /// The code page that is used to decode code point values within the diff --git a/PortableExecutable/ResourceDirectoryEntry.cs b/PortableExecutable/ResourceDirectoryEntry.cs index 8a1b322..4e9b597 100644 --- a/PortableExecutable/ResourceDirectoryEntry.cs +++ b/PortableExecutable/ResourceDirectoryEntry.cs @@ -31,11 +31,7 @@ /// A string that gives the Type, Name, or Language ID entry, depending on /// level of table. /// -#if NET48 - public ResourceDirectoryString Name { get; set; } -#else public ResourceDirectoryString? Name { get; set; } -#endif /// /// A 32-bit integer that identifies the Type, Name, or Language ID entry. @@ -54,11 +50,7 @@ /// /// Resource data entry (a leaf). /// -#if NET48 - public ResourceDataEntry DataEntry { get; set; } -#else public ResourceDataEntry? DataEntry { get; set; } -#endif /// /// High bit 1. The lower 31 bits are the address of another resource @@ -69,11 +61,7 @@ /// /// Another resource directory table (the next level down). /// -#if NET48 - public ResourceDirectoryTable Subdirectory { get; set; } -#else public ResourceDirectoryTable? Subdirectory { get; set; } -#endif #endregion } diff --git a/PortableExecutable/ResourceDirectoryString.cs b/PortableExecutable/ResourceDirectoryString.cs index b1b6785..5249366 100644 --- a/PortableExecutable/ResourceDirectoryString.cs +++ b/PortableExecutable/ResourceDirectoryString.cs @@ -18,10 +18,6 @@ /// /// The variable-length Unicode string data, word-aligned. /// -#if NET48 - public byte[] UnicodeString { get; set; } -#else public byte[]? UnicodeString { get; set; } -#endif } } diff --git a/PortableExecutable/ResourceDirectoryTable.cs b/PortableExecutable/ResourceDirectoryTable.cs index eb7425f..994f77a 100644 --- a/PortableExecutable/ResourceDirectoryTable.cs +++ b/PortableExecutable/ResourceDirectoryTable.cs @@ -54,10 +54,6 @@ /// strings to identify Type, Name, or Language entries (depending on the /// level of the table). /// -#if NET48 - public ResourceDirectoryEntry[] Entries { get; set; } -#else public ResourceDirectoryEntry?[]? Entries { get; set; } -#endif } } diff --git a/PortableExecutable/SectionHeader.cs b/PortableExecutable/SectionHeader.cs index 4efb77c..6bc0c1a 100644 --- a/PortableExecutable/SectionHeader.cs +++ b/PortableExecutable/SectionHeader.cs @@ -29,11 +29,7 @@ /// characters. Long names in object files are truncated if they are emitted /// to an executable file. /// -#if NET48 - public byte[] Name { get; set; } = new byte[8]; -#else public byte[]? Name { get; set; } = new byte[8]; -#endif /// /// The total size of the section when loaded into memory. If this value is @@ -104,19 +100,11 @@ /// /// COFF Relocations (Object Only) /// -#if NET48 - public COFFRelocation[] COFFRelocations { get; set; } -#else public COFFRelocation?[]? COFFRelocations { get; set; } -#endif /// /// COFF Line Numbers (Deprecated) /// -#if NET48 - public COFFLineNumber[] COFFLineNumbers { get; set; } -#else public COFFLineNumber?[]? COFFLineNumbers { get; set; } -#endif } } diff --git a/PortableExecutable/SecuROMAddD.cs b/PortableExecutable/SecuROMAddD.cs index b357765..6311cf0 100644 --- a/PortableExecutable/SecuROMAddD.cs +++ b/PortableExecutable/SecuROMAddD.cs @@ -27,20 +27,12 @@ /// /// Version, always 8 bytes? /// -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif /// /// Unknown (Build? Formatted as a string) /// -#if NET48 - public char[] Build { get; set; } -#else public char[]? Build { get; set; } -#endif /// /// Unknown (0x14h), Variable number of bytes before entry table @@ -55,19 +47,11 @@ /// "554900-001" in 4.84.76.7968 /// "548520-001" in 4.85.07.0009 /// -#if NET48 - public byte[] Unknown14h { get; set; } -#else public byte[]? Unknown14h { get; set; } -#endif /// /// Entry table /// -#if NET48 - public SecuROMAddDEntry[] Entries { get; set; } -#else public SecuROMAddDEntry?[]? Entries { get; set; } -#endif } } diff --git a/PortableExecutable/SecuROMAddDEntry.cs b/PortableExecutable/SecuROMAddDEntry.cs index bfc2659..7b24556 100644 --- a/PortableExecutable/SecuROMAddDEntry.cs +++ b/PortableExecutable/SecuROMAddDEntry.cs @@ -61,11 +61,7 @@ /// Entry file name (null-terminated) /// /// 12 bytes long in the sample (all 3 entries) in 4.47.00.0039 -#if NET48 - public string FileName { get; set; } -#else public string? FileName { get; set; } -#endif /// /// Unknown (0x2C) diff --git a/PortableExecutable/StringData.cs b/PortableExecutable/StringData.cs index ad91fad..f5ab210 100644 --- a/PortableExecutable/StringData.cs +++ b/PortableExecutable/StringData.cs @@ -64,11 +64,7 @@ /// set in the dwFileFlags member of the VS_FIXEDFILEINFO structure. For example, Value /// could be "Private build for Olivetti solving mouse problems on M250 and M250E computers". /// -#if NET48 - public string Key { get; set; } -#else public string? Key { get; set; } -#endif /// /// As many zero words as necessary to align the Value member on a 32-bit boundary. @@ -78,10 +74,6 @@ /// /// A zero-terminated string. See the szKey member description for more information. /// -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif } } diff --git a/PortableExecutable/StringFileInfo.cs b/PortableExecutable/StringFileInfo.cs index d100507..24cc3f9 100644 --- a/PortableExecutable/StringFileInfo.cs +++ b/PortableExecutable/StringFileInfo.cs @@ -26,11 +26,7 @@ /// /// The Unicode string L"StringFileInfo". /// -#if NET48 - public string Key { get; set; } -#else public string? Key { get; set; } -#endif /// /// As many zero words as necessary to align the Children member on a 32-bit boundary. @@ -42,10 +38,6 @@ /// member indicates the appropriate language and code page for displaying the text in /// that StringTable structure. /// -#if NET48 - public StringTable[] Children { get; set; } -#else public StringTable?[]? Children { get; set; } -#endif } } diff --git a/PortableExecutable/StringTable.cs b/PortableExecutable/StringTable.cs index a56f707..a22ac3b 100644 --- a/PortableExecutable/StringTable.cs +++ b/PortableExecutable/StringTable.cs @@ -31,11 +31,7 @@ /// identifier contains two parts: the low-order 10 bits specify the major language, /// and the high-order 6 bits specify the sublanguage. /// -#if NET48 - public string Key { get; set; } -#else public string? Key { get; set; } -#endif /// /// As many zero words as necessary to align the Children member on a 32-bit boundary. @@ -45,10 +41,6 @@ /// /// An array of one or more StringData structures. /// -#if NET48 - public StringData[] Children { get; set; } -#else public StringData?[]? Children { get; set; } -#endif } } diff --git a/PortableExecutable/VarData.cs b/PortableExecutable/VarData.cs index d7e75c3..64d3102 100644 --- a/PortableExecutable/VarData.cs +++ b/PortableExecutable/VarData.cs @@ -26,11 +26,7 @@ /// /// The Unicode string L"Translation". /// -#if NET48 - public string Key { get; set; } -#else public string? Key { get; set; } -#endif /// /// As many zero words as necessary to align the Value member on a 32-bit boundary. @@ -49,10 +45,6 @@ /// independent. If the Var structure is omitted, the file will be interpreted as both /// language and code page independent. /// -#if NET48 - public uint[] Value { get; set; } -#else public uint[]? Value { get; set; } -#endif } } diff --git a/PortableExecutable/VarFileInfo.cs b/PortableExecutable/VarFileInfo.cs index ac0f31c..9ee8387 100644 --- a/PortableExecutable/VarFileInfo.cs +++ b/PortableExecutable/VarFileInfo.cs @@ -26,11 +26,7 @@ /// /// The Unicode string L"VarFileInfo". /// -#if NET48 - public string Key { get; set; } -#else public string? Key { get; set; } -#endif /// /// As many zero words as necessary to align the Children member on a 32-bit boundary. @@ -40,10 +36,6 @@ /// /// Typically contains a list of languages that the application or DLL supports. /// -#if NET48 - public VarData[] Children { get; set; } -#else public VarData?[]? Children { get; set; } -#endif } } diff --git a/PortableExecutable/VersionInfo.cs b/PortableExecutable/VersionInfo.cs index f67ed10..cd733cc 100644 --- a/PortableExecutable/VersionInfo.cs +++ b/PortableExecutable/VersionInfo.cs @@ -29,11 +29,7 @@ /// /// The Unicode string L"VS_VERSION_INFO". /// -#if NET48 - public string Key { get; set; } -#else public string? Key { get; set; } -#endif /// /// Contains as many zero words as necessary to align the Value member on a 32-bit boundary. @@ -44,11 +40,7 @@ /// Arbitrary data associated with this VS_VERSIONINFO structure. The ValueLength member /// specifies the length of this member; if ValueLength is zero, this member does not exist. /// -#if NET48 - public FixedFileInfo Value { get; set; } -#else public FixedFileInfo? Value { get; set; } -#endif /// /// As many zero words as necessary to align the Children member on a 32-bit boundary. @@ -59,19 +51,11 @@ /// /// The StringFileInfo structure to store user-defined string information data. /// -#if NET48 - public StringFileInfo StringFileInfo { get; set; } -#else public StringFileInfo? StringFileInfo { get; set; } -#endif /// /// The VarFileInfo structure to store language information data. /// -#if NET48 - public VarFileInfo VarFileInfo { get; set; } -#else public VarFileInfo? VarFileInfo { get; set; } -#endif } } diff --git a/Quantum/Archive.cs b/Quantum/Archive.cs index 43f6386..e624394 100644 --- a/Quantum/Archive.cs +++ b/Quantum/Archive.cs @@ -9,20 +9,12 @@ namespace SabreTools.Models.Quantum /// /// Quantum header /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// This is immediately followed by the list of files /// -#if NET48 - public FileDescriptor[] FileList { get; set; } -#else public FileDescriptor?[]? FileList { get; set; } -#endif /// /// Immediately following the list of files is the compressed data diff --git a/Quantum/FileDescriptor.cs b/Quantum/FileDescriptor.cs index ea08971..9d02a95 100644 --- a/Quantum/FileDescriptor.cs +++ b/Quantum/FileDescriptor.cs @@ -14,11 +14,7 @@ namespace SabreTools.Models.Quantum /// /// File name, variable length string, not zero-terminated /// -#if NET48 - public string FileName { get; set; } -#else public string? FileName { get; set; } -#endif /// /// Length of comment field @@ -28,11 +24,7 @@ namespace SabreTools.Models.Quantum /// /// Comment field, variable length string, not zero-terminated /// -#if NET48 - public string CommentField { get; set; } -#else public string? CommentField { get; set; } -#endif /// /// Fully expanded file size in bytes diff --git a/Quantum/Header.cs b/Quantum/Header.cs index dd4849b..d8ce48a 100644 --- a/Quantum/Header.cs +++ b/Quantum/Header.cs @@ -9,11 +9,7 @@ namespace SabreTools.Models.Quantum /// /// Quantum signature: 0x44 0x53 /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// Quantum major version number diff --git a/RomCenter/Credits.cs b/RomCenter/Credits.cs index 572ca99..c26e2f3 100644 --- a/RomCenter/Credits.cs +++ b/RomCenter/Credits.cs @@ -4,62 +4,30 @@ namespace SabreTools.Models.RomCenter public class Credits { /// author -#if NET48 - public string Author { get; set; } -#else public string? Author { get; set; } -#endif /// version -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif /// email -#if NET48 - public string Email { get; set; } -#else public string? Email { get; set; } -#endif /// homepage -#if NET48 - public string Homepage { get; set; } -#else public string? Homepage { get; set; } -#endif /// url -#if NET48 - public string Url { get; set; } -#else public string? Url { get; set; } -#endif /// date -#if NET48 - public string Date { get; set; } -#else public string? Date { get; set; } -#endif /// comment -#if NET48 - public string Comment { get; set; } -#else public string? Comment { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/RomCenter/Dat.cs b/RomCenter/Dat.cs index d126e54..330a118 100644 --- a/RomCenter/Dat.cs +++ b/RomCenter/Dat.cs @@ -4,41 +4,21 @@ namespace SabreTools.Models.RomCenter public class Dat { /// version -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif /// plugin -#if NET48 - public string Plugin { get; set; } -#else public string? Plugin { get; set; } -#endif /// split -#if NET48 - public string Split { get; set; } -#else public string? Split { get; set; } -#endif /// merge -#if NET48 - public string Merge { get; set; } -#else public string? Merge { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/RomCenter/Emulator.cs b/RomCenter/Emulator.cs index b824d15..f0f234e 100644 --- a/RomCenter/Emulator.cs +++ b/RomCenter/Emulator.cs @@ -4,27 +4,15 @@ namespace SabreTools.Models.RomCenter public class Emulator { /// refname -#if NET48 - public string RefName { get; set; } -#else public string? RefName { get; set; } -#endif /// version -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/RomCenter/Games.cs b/RomCenter/Games.cs index 56ad0cc..2899325 100644 --- a/RomCenter/Games.cs +++ b/RomCenter/Games.cs @@ -3,20 +3,12 @@ namespace SabreTools.Models.RomCenter /// [games] public class Games { -#if NET48 - public Rom[] Rom { get; set; } -#else public Rom[]? Rom { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/RomCenter/MetadataFile.cs b/RomCenter/MetadataFile.cs index 68db21b..c68919a 100644 --- a/RomCenter/MetadataFile.cs +++ b/RomCenter/MetadataFile.cs @@ -3,41 +3,21 @@ namespace SabreTools.Models.RomCenter public class MetadataFile { /// [credits] -#if NET48 - public Credits Credits { get; set; } -#else public Credits? Credits { get; set; } -#endif /// [dat] -#if NET48 - public Dat Dat { get; set; } -#else public Dat? Dat { get; set; } -#endif /// [emulator] -#if NET48 - public Emulator Emulator { get; set; } -#else public Emulator? Emulator { get; set; } -#endif /// [games] -#if NET48 - public Games Games { get; set; } -#else public Games? Games { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/RomCenter/Rom.cs b/RomCenter/Rom.cs index 4ba9b3e..fff9b41 100644 --- a/RomCenter/Rom.cs +++ b/RomCenter/Rom.cs @@ -4,76 +4,36 @@ namespace SabreTools.Models.RomCenter public class Rom { /// 0 -#if NET48 - public string ParentName { get; set; } -#else public string? ParentName { get; set; } -#endif /// 1 -#if NET48 - public string ParentDescription { get; set; } -#else public string? ParentDescription { get; set; } -#endif /// 2 -#if NET48 - public string GameName { get; set; } -#else public string? GameName { get; set; } -#endif /// 3 -#if NET48 - public string GameDescription { get; set; } -#else public string? GameDescription { get; set; } -#endif /// 4 -#if NET48 - public string RomName { get; set; } -#else public string? RomName { get; set; } -#endif /// 5 -#if NET48 - public string RomCRC { get; set; } -#else public string? RomCRC { get; set; } -#endif /// 6 -#if NET48 - public string RomSize { get; set; } -#else public string? RomSize { get; set; } -#endif /// 7 -#if NET48 - public string RomOf { get; set; } -#else public string? RomOf { get; set; } -#endif /// 8 -#if NET48 - public string MergeName { get; set; } -#else public string? MergeName { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SFFS/FileEntry.cs b/SFFS/FileEntry.cs index 62132c0..e99dbc5 100644 --- a/SFFS/FileEntry.cs +++ b/SFFS/FileEntry.cs @@ -7,11 +7,7 @@ /// MD5 hash of filename (not encrypted,) /// /// 0x10 bytes -#if NET48 - public byte[] FilenameMD5Hash { get; set; } -#else public byte[]? FilenameMD5Hash { get; set; } -#endif /// /// Index of fileheader (encrypted with filename) diff --git a/SFFS/FileHeader.cs b/SFFS/FileHeader.cs index cbbadb7..524d605 100644 --- a/SFFS/FileHeader.cs +++ b/SFFS/FileHeader.cs @@ -12,10 +12,6 @@ /// File info (timestamps, size, data position, encrypted) /// /// Unknown format -#if NET48 - public byte[] FileInfo { get; set; } -#else public byte[]? FileInfo { get; set; } -#endif } } diff --git a/SFFS/StarForceFileSystem.cs b/SFFS/StarForceFileSystem.cs index cf5f37b..26e7f0a 100644 --- a/SFFS/StarForceFileSystem.cs +++ b/SFFS/StarForceFileSystem.cs @@ -18,28 +18,16 @@ /// /// Header /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Files /// -#if NET48 - public FileEntry[] Files { get; set; } -#else public FileEntry?[]? Files { get; set; } -#endif /// /// File headers /// -#if NET48 - public FileHeader[] FileHeaders { get; set; } -#else public FileHeader?[]? FileHeaders { get; set; } -#endif } } diff --git a/SGA/DirectoryHeader.cs b/SGA/DirectoryHeader.cs index 59614ac..53dc541 100644 --- a/SGA/DirectoryHeader.cs +++ b/SGA/DirectoryHeader.cs @@ -5,34 +5,18 @@ namespace SabreTools.Models.SGA { public uint SectionOffset { get; set; } -#if NET48 - public T SectionCount { get; set; } -#else public T? SectionCount { get; set; } -#endif public uint FolderOffset { get; set; } -#if NET48 - public T FolderCount { get; set; } -#else public T? FolderCount { get; set; } -#endif public uint FileOffset { get; set; } -#if NET48 - public T FileCount { get; set; } -#else public T? FileCount { get; set; } -#endif public uint StringTableOffset { get; set; } -#if NET48 - public T StringTableCount { get; set; } -#else public T? StringTableCount { get; set; } -#endif } } diff --git a/SGA/File.cs b/SGA/File.cs index ffe5a6f..1777ac2 100644 --- a/SGA/File.cs +++ b/SGA/File.cs @@ -9,19 +9,11 @@ namespace SabreTools.Models.SGA /// ///Header data /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Directory data /// -#if NET48 - public Directory Directory { get; set; } -#else public Directory? Directory { get; set; } -#endif } } diff --git a/SGA/File4.cs b/SGA/File4.cs index 7390afb..58c2de5 100644 --- a/SGA/File4.cs +++ b/SGA/File4.cs @@ -5,11 +5,7 @@ namespace SabreTools.Models.SGA { public uint NameOffset { get; set; } -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif public uint Offset { get; set; } diff --git a/SGA/FileHeader.cs b/SGA/FileHeader.cs index bbcbcb8..f8a1c12 100644 --- a/SGA/FileHeader.cs +++ b/SGA/FileHeader.cs @@ -3,11 +3,7 @@ namespace SabreTools.Models.SGA /// public sealed class FileHeader { -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif public uint CRC32 { get; set; } } diff --git a/SGA/Folder.cs b/SGA/Folder.cs index f60a8d7..d6b017c 100644 --- a/SGA/Folder.cs +++ b/SGA/Folder.cs @@ -5,34 +5,14 @@ namespace SabreTools.Models.SGA { public uint NameOffset { get; set; } -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif -#if NET48 - public T FolderStartIndex { get; set; } -#else public T? FolderStartIndex { get; set; } -#endif -#if NET48 - public T FolderEndIndex { get; set; } -#else public T? FolderEndIndex { get; set; } -#endif -#if NET48 - public T FileStartIndex { get; set; } -#else public T? FileStartIndex { get; set; } -#endif -#if NET48 - public T FileEndIndex { get; set; } -#else public T? FileEndIndex { get; set; } -#endif } } diff --git a/SGA/Header.cs b/SGA/Header.cs index 145c0d0..a615ea6 100644 --- a/SGA/Header.cs +++ b/SGA/Header.cs @@ -3,11 +3,7 @@ namespace SabreTools.Models.SGA /// public abstract class Header { -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif public ushort MajorVersion { get; set; } diff --git a/SGA/Header4.cs b/SGA/Header4.cs index 8be0401..b12edea 100644 --- a/SGA/Header4.cs +++ b/SGA/Header4.cs @@ -3,23 +3,11 @@ namespace SabreTools.Models.SGA /// public sealed class Header4 : Header { -#if NET48 - public byte[] FileMD5 { get; set; } -#else public byte[]? FileMD5 { get; set; } -#endif -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif -#if NET48 - public byte[] HeaderMD5 { get; set; } -#else public byte[]? HeaderMD5 { get; set; } -#endif public uint HeaderLength { get; set; } diff --git a/SGA/Header6.cs b/SGA/Header6.cs index 1dd594d..14c67ad 100644 --- a/SGA/Header6.cs +++ b/SGA/Header6.cs @@ -3,11 +3,7 @@ namespace SabreTools.Models.SGA /// public sealed class Header6 : Header { -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif public uint HeaderLength { get; set; } diff --git a/SGA/Section.cs b/SGA/Section.cs index 80c3e28..7a77359 100644 --- a/SGA/Section.cs +++ b/SGA/Section.cs @@ -3,46 +3,18 @@ namespace SabreTools.Models.SGA /// public abstract class Section { -#if NET48 - public string Alias { get; set; } -#else public string? Alias { get; set; } -#endif -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif -#if NET48 - public T FolderStartIndex { get; set; } -#else public T? FolderStartIndex { get; set; } -#endif -#if NET48 - public T FolderEndIndex { get; set; } -#else public T? FolderEndIndex { get; set; } -#endif -#if NET48 - public T FileStartIndex { get; set; } -#else public T? FileStartIndex { get; set; } -#endif -#if NET48 - public T FileEndIndex { get; set; } -#else public T? FileEndIndex { get; set; } -#endif -#if NET48 - public T FolderRootIndex { get; set; } -#else public T? FolderRootIndex { get; set; } -#endif } } diff --git a/SGA/SpecializedDirectory.cs b/SGA/SpecializedDirectory.cs index 4ed43af..328376c 100644 --- a/SGA/SpecializedDirectory.cs +++ b/SGA/SpecializedDirectory.cs @@ -16,55 +16,31 @@ namespace SabreTools.Models.SGA /// /// Source SGA file /// -#if NET48 - public File File { get; set; } -#else public File? File { get; set; } -#endif /// /// Directory header data /// -#if NET48 - public TDirectoryHeader DirectoryHeader { get; set; } -#else public TDirectoryHeader? DirectoryHeader { get; set; } -#endif /// /// Sections data /// -#if NET48 - public TSection[] Sections { get; set; } -#else public TSection?[]? Sections { get; set; } -#endif /// /// Folders data /// -#if NET48 - public TFolder[] Folders { get; set; } -#else public TFolder?[]? Folders { get; set; } -#endif /// /// Files data /// -#if NET48 - public TFile[] Files { get; set; } -#else public TFile?[]? Files { get; set; } -#endif /// /// String table data /// -#if NET48 - public Dictionary StringTable { get; set; } -#else public Dictionary? StringTable { get; set; } -#endif } } diff --git a/SeparatedValue/MetadataFile.cs b/SeparatedValue/MetadataFile.cs index 1568af8..7fddc2e 100644 --- a/SeparatedValue/MetadataFile.cs +++ b/SeparatedValue/MetadataFile.cs @@ -3,16 +3,8 @@ namespace SabreTools.Models.SeparatedValue public class MetadataFile { [Required] -#if NET48 - public string[] Header { get; set; } -#else public string[]? Header { get; set; } -#endif -#if NET48 - public Row[] Row { get; set; } -#else public Row[]? Row { get; set; } -#endif } } \ No newline at end of file diff --git a/SeparatedValue/Row.cs b/SeparatedValue/Row.cs index dfac796..b9f170c 100644 --- a/SeparatedValue/Row.cs +++ b/SeparatedValue/Row.cs @@ -6,134 +6,62 @@ namespace SabreTools.Models.SeparatedValue public class Row { /// File Name -#if NET48 - public string FileName { get; set; } -#else public string? FileName { get; set; } -#endif /// Internal Name -#if NET48 - public string InternalName { get; set; } -#else public string? InternalName { get; set; } -#endif /// Description -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif /// Game Name [Required] -#if NET48 - public string GameName { get; set; } -#else public string? GameName { get; set; } -#endif /// Game Description -#if NET48 - public string GameDescription { get; set; } -#else public string? GameDescription { get; set; } -#endif /// Type [Required] -#if NET48 - public string Type { get; set; } -#else public string? Type { get; set; } -#endif /// Rom Name -#if NET48 - public string RomName { get; set; } -#else public string? RomName { get; set; } -#endif /// Disk Name -#if NET48 - public string DiskName { get; set; } -#else public string? DiskName { get; set; } -#endif /// Size, Numeric -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif /// CRC -#if NET48 - public string CRC { get; set; } -#else public string? CRC { get; set; } -#endif /// MD5 -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif /// SHA1 -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif /// SHA256 -#if NET48 - public string SHA256 { get; set; } -#else public string? SHA256 { get; set; } -#endif /// SHA384, Optional -#if NET48 - public string SHA384 { get; set; } -#else public string? SHA384 { get; set; } -#endif /// SHA512, Optional -#if NET48 - public string SHA512 { get; set; } -#else public string? SHA512 { get; set; } -#endif /// SpamSum, Optional -#if NET48 - public string SpamSum { get; set; } -#else public string? SpamSum { get; set; } -#endif /// Status, Nodump -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty -#if NET48 - public string[] ADDITIONAL_ELEMENTS { get; set; } -#else public string[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/DataArea.cs b/SoftwareList/DataArea.cs index f5e0691..fe3db82 100644 --- a/SoftwareList/DataArea.cs +++ b/SoftwareList/DataArea.cs @@ -8,60 +8,32 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("size")] -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif - + /// (8|16|32|64) "8" [XmlAttribute("width")] -#if NET48 - public string Width { get; set; } -#else public string? Width { get; set; } -#endif - + /// (big|little) "little" [XmlAttribute("endianness")] -#if NET48 - public string Endianness { get; set; } -#else public string? Endianness { get; set; } -#endif [XmlElement("rom")] -#if NET48 - public Rom[] Rom { get; set; } -#else public Rom[]? Rom { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/DipSwitch.cs b/SoftwareList/DipSwitch.cs index a7591f8..2fd6fd3 100644 --- a/SoftwareList/DipSwitch.cs +++ b/SoftwareList/DipSwitch.cs @@ -8,51 +8,27 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("tag")] -#if NET48 - public string Tag { get; set; } -#else public string? Tag { get; set; } -#endif [XmlAttribute("mask")] -#if NET48 - public string Mask { get; set; } -#else public string? Mask { get; set; } -#endif [XmlElement("dipvalue")] -#if NET48 - public DipValue[] DipValue { get; set; } -#else public DipValue[]? DipValue { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/DipValue.cs b/SoftwareList/DipValue.cs index 894cb37..1f70bd0 100644 --- a/SoftwareList/DipValue.cs +++ b/SoftwareList/DipValue.cs @@ -8,45 +8,25 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("default")] -#if NET48 - public string Default { get; set; } -#else public string? Default { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/Disk.cs b/SoftwareList/Disk.cs index 5614c82..ca0cbe3 100644 --- a/SoftwareList/Disk.cs +++ b/SoftwareList/Disk.cs @@ -8,59 +8,31 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("md5")] -#if NET48 - public string MD5 { get; set; } -#else public string? MD5 { get; set; } -#endif [XmlAttribute("sha1")] -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif /// (baddump|nodump|good) "good" [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// (yes|no) "no" [XmlAttribute("writeable")] -#if NET48 - public string Writeable { get; set; } -#else public string? Writeable { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/DiskArea.cs b/SoftwareList/DiskArea.cs index 79b4d20..20bba25 100644 --- a/SoftwareList/DiskArea.cs +++ b/SoftwareList/DiskArea.cs @@ -8,36 +8,20 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlElement("disk")] -#if NET48 - public Disk[] Disk { get; set; } -#else public Disk[]? Disk { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/Feature.cs b/SoftwareList/Feature.cs index 1e665f3..2d15ec4 100644 --- a/SoftwareList/Feature.cs +++ b/SoftwareList/Feature.cs @@ -8,36 +8,20 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/Info.cs b/SoftwareList/Info.cs index db7f11c..b68f5d7 100644 --- a/SoftwareList/Info.cs +++ b/SoftwareList/Info.cs @@ -8,36 +8,20 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/Part.cs b/SoftwareList/Part.cs index 9fc827d..d4ff21f 100644 --- a/SoftwareList/Part.cs +++ b/SoftwareList/Part.cs @@ -8,65 +8,33 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [Required] [XmlAttribute("interface")] -#if NET48 - public string Interface { get; set; } -#else public string? Interface { get; set; } -#endif [XmlElement("feature")] -#if NET48 - public Feature[] Feature { get; set; } -#else public Feature[]? Feature { get; set; } -#endif [XmlElement("dataarea")] -#if NET48 - public DataArea[] DataArea { get; set; } -#else public DataArea[]? DataArea { get; set; } -#endif [XmlElement("diskarea")] -#if NET48 - public DiskArea[] DiskArea { get; set; } -#else public DiskArea[]? DiskArea { get; set; } -#endif [XmlElement("dipswitch")] -#if NET48 - public DipSwitch[] DipSwitch { get; set; } -#else public DipSwitch[]? DipSwitch { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/Rom.cs b/SoftwareList/Rom.cs index a038f49..e738389 100644 --- a/SoftwareList/Rom.cs +++ b/SoftwareList/Rom.cs @@ -8,88 +8,44 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("size")] -#if NET48 - public string Size { get; set; } -#else public string? Size { get; set; } -#endif [XmlAttribute("length")] -#if NET48 - public string Length { get; set; } -#else public string? Length { get; set; } -#endif [XmlAttribute("crc")] -#if NET48 - public string CRC { get; set; } -#else public string? CRC { get; set; } -#endif [XmlAttribute("sha1")] -#if NET48 - public string SHA1 { get; set; } -#else public string? SHA1 { get; set; } -#endif /// Numeric? [XmlAttribute("offset")] -#if NET48 - public string Offset { get; set; } -#else public string? Offset { get; set; } -#endif [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif /// (baddump|nodump|good) "good" [XmlAttribute("status")] -#if NET48 - public string Status { get; set; } -#else public string? Status { get; set; } -#endif /// (load16_byte|load16_word|load16_word_swap|load32_byte|load32_word|load32_word_swap|load32_dword|load64_word|load64_word_swap|reload|fill|continue|reload_plain|ignore) [XmlAttribute("loadflag")] -#if NET48 - public string LoadFlag { get; set; } -#else public string? LoadFlag { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/SharedFeat.cs b/SoftwareList/SharedFeat.cs index 9bcf312..22c1b49 100644 --- a/SoftwareList/SharedFeat.cs +++ b/SoftwareList/SharedFeat.cs @@ -8,36 +8,20 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("value")] -#if NET48 - public string Value { get; set; } -#else public string? Value { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/Software.cs b/SoftwareList/Software.cs index 7c0171d..194acd8 100644 --- a/SoftwareList/Software.cs +++ b/SoftwareList/Software.cs @@ -8,96 +8,48 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("cloneof")] -#if NET48 - public string CloneOf { get; set; } -#else public string? CloneOf { get; set; } -#endif /// (yes|partial|no) "yes" [XmlAttribute("supported")] -#if NET48 - public string Supported { get; set; } -#else public string? Supported { get; set; } -#endif [Required] [XmlElement("description")] -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif [Required] [XmlElement("year")] -#if NET48 - public string Year { get; set; } -#else public string? Year { get; set; } -#endif [Required] [XmlElement("publisher")] -#if NET48 - public string Publisher { get; set; } -#else public string? Publisher { get; set; } -#endif [XmlElement("notes")] -#if NET48 - public string Notes { get; set; } -#else public string? Notes { get; set; } -#endif [XmlElement("info")] -#if NET48 - public Info[] Info { get; set; } -#else public Info[]? Info { get; set; } -#endif [XmlElement("sharedfeat")] -#if NET48 - public SharedFeat[] SharedFeat { get; set; } -#else public SharedFeat[]? SharedFeat { get; set; } -#endif [XmlElement("part")] -#if NET48 - public Part[] Part { get; set; } -#else public Part[]? Part { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/SoftwareList/SoftwareList.cs b/SoftwareList/SoftwareList.cs index 532ac46..8dd2782 100644 --- a/SoftwareList/SoftwareList.cs +++ b/SoftwareList/SoftwareList.cs @@ -8,50 +8,26 @@ namespace SabreTools.Models.SoftwareList { [Required] [XmlAttribute("name")] -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif [XmlAttribute("description")] -#if NET48 - public string Description { get; set; } -#else public string? Description { get; set; } -#endif [XmlElement("notes")] -#if NET48 - public string Notes { get; set; } -#else public string? Notes { get; set; } -#endif [XmlElement("software")] -#if NET48 - public Software[] Software { get; set; } -#else public Software[]? Software { get; set; } -#endif #region DO NOT USE IN PRODUCTION /// Should be empty [XmlAnyAttribute] -#if NET48 - public XmlAttribute[] ADDITIONAL_ATTRIBUTES { get; set; } -#else public XmlAttribute[]? ADDITIONAL_ATTRIBUTES { get; set; } -#endif /// Should be empty [XmlAnyElement] -#if NET48 - public object[] ADDITIONAL_ELEMENTS { get; set; } -#else public object[]? ADDITIONAL_ELEMENTS { get; set; } -#endif #endregion } diff --git a/TAR/Archive.cs b/TAR/Archive.cs index 59adaf3..1f6665b 100644 --- a/TAR/Archive.cs +++ b/TAR/Archive.cs @@ -5,10 +5,6 @@ namespace SabreTools.Models.TAR /// /// File header /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif } } \ No newline at end of file diff --git a/TAR/Header.cs b/TAR/Header.cs index e8256a7..7821797 100644 --- a/TAR/Header.cs +++ b/TAR/Header.cs @@ -5,11 +5,7 @@ namespace SabreTools.Models.TAR /// /// File name /// -#if NET48 - public string FileName { get; set; } -#else public string? FileName { get; set; } -#endif /// /// File mode @@ -49,73 +45,41 @@ namespace SabreTools.Models.TAR /// /// Name of linked file /// -#if NET48 - public string LinkName { get; set; } -#else public string? LinkName { get; set; } -#endif /// /// UStar indicator, "ustar", then NUL /// -#if NET48 - public string Magic { get; set; } -#else public string? Magic { get; set; } -#endif /// /// UStar version, "00" /// -#if NET48 - public string Version { get; set; } -#else public string? Version { get; set; } -#endif /// /// Owner user name /// -#if NET48 - public string UserName { get; set; } -#else public string? UserName { get; set; } -#endif /// /// Owner group name /// -#if NET48 - public string GroupName { get; set; } -#else public string? GroupName { get; set; } -#endif /// /// Device major number /// -#if NET48 - public string DevMajor { get; set; } -#else public string? DevMajor { get; set; } -#endif /// /// Device minor number /// -#if NET48 - public string DevMinor { get; set; } -#else public string? DevMinor { get; set; } -#endif /// /// Filename prefix /// -#if NET48 - public string Prefix { get; set; } -#else public string? Prefix { get; set; } -#endif } } \ No newline at end of file diff --git a/VBSP/File.cs b/VBSP/File.cs index a630094..edd1bfd 100644 --- a/VBSP/File.cs +++ b/VBSP/File.cs @@ -9,10 +9,6 @@ namespace SabreTools.Models.VBSP /// /// Directory header data /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif } } \ No newline at end of file diff --git a/VBSP/Header.cs b/VBSP/Header.cs index 3031122..9376d3c 100644 --- a/VBSP/Header.cs +++ b/VBSP/Header.cs @@ -6,11 +6,7 @@ namespace SabreTools.Models.VBSP /// /// BSP file signature. /// -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif /// /// BSP file version. @@ -25,11 +21,7 @@ namespace SabreTools.Models.VBSP /// /// Lumps. /// -#if NET48 - public Lump[] Lumps { get; set; } -#else public Lump?[]? Lumps { get; set; } -#endif /// /// The map's revision (iteration, version) number. diff --git a/VBSP/Lump.cs b/VBSP/Lump.cs index deb250c..745fa95 100644 --- a/VBSP/Lump.cs +++ b/VBSP/Lump.cs @@ -15,10 +15,6 @@ namespace SabreTools.Models.VBSP /// /// Default to (char)0, (char)0, (char)0, (char)0. /// -#if NET48 - public char[] FourCC { get; set; } -#else public char[]? FourCC { get; set; } -#endif } } diff --git a/VPK/ArchiveHash.cs b/VPK/ArchiveHash.cs index 3b11c8e..9253d1f 100644 --- a/VPK/ArchiveHash.cs +++ b/VPK/ArchiveHash.cs @@ -12,10 +12,6 @@ namespace SabreTools.Models.VPK /// /// MD5 /// -#if NET48 - public byte[] Hash { get; set; } -#else public byte[]? Hash { get; set; } -#endif } } diff --git a/VPK/DirectoryItem.cs b/VPK/DirectoryItem.cs index cf46d98..3d12235 100644 --- a/VPK/DirectoryItem.cs +++ b/VPK/DirectoryItem.cs @@ -3,34 +3,14 @@ namespace SabreTools.Models.VPK /// public sealed class DirectoryItem { -#if NET48 - public string Extension { get; set; } -#else public string? Extension { get; set; } -#endif -#if NET48 - public string Path { get; set; } -#else public string? Path { get; set; } -#endif -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif -#if NET48 - public DirectoryEntry DirectoryEntry { get; set; } -#else public DirectoryEntry? DirectoryEntry { get; set; } -#endif -#if NET48 - public byte[] PreloadData { get; set; } -#else public byte[]? PreloadData { get; set; } -#endif } } diff --git a/VPK/File.cs b/VPK/File.cs index fd2f714..9342301 100644 --- a/VPK/File.cs +++ b/VPK/File.cs @@ -9,37 +9,21 @@ namespace SabreTools.Models.VPK /// /// Header data /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Extended header data /// -#if NET48 - public ExtendedHeader ExtendedHeader { get; set; } -#else public ExtendedHeader? ExtendedHeader { get; set; } -#endif /// /// Archive hashes data /// -#if NET48 - public ArchiveHash[] ArchiveHashes { get; set; } -#else public ArchiveHash?[]? ArchiveHashes { get; set; } -#endif /// /// Directory items data /// -#if NET48 - public DirectoryItem[] DirectoryItems { get; set; } -#else public DirectoryItem?[]? DirectoryItems { get; set; } -#endif } } diff --git a/WAD/File.cs b/WAD/File.cs index cc3d77c..c21f361 100644 --- a/WAD/File.cs +++ b/WAD/File.cs @@ -9,28 +9,16 @@ namespace SabreTools.Models.WAD /// /// Deserialized header data /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Deserialized lumps data /// -#if NET48 - public Lump[] Lumps { get; set; } -#else public Lump?[]? Lumps { get; set; } -#endif /// /// Deserialized lump infos data /// -#if NET48 - public LumpInfo[] LumpInfos { get; set; } -#else public LumpInfo?[]? LumpInfos { get; set; } -#endif } } diff --git a/WAD/Header.cs b/WAD/Header.cs index 6217298..f544587 100644 --- a/WAD/Header.cs +++ b/WAD/Header.cs @@ -3,11 +3,7 @@ namespace SabreTools.Models.WAD /// public sealed class Header { -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif public uint LumpCount { get; set; } diff --git a/WAD/Lump.cs b/WAD/Lump.cs index 8bad1e6..a184507 100644 --- a/WAD/Lump.cs +++ b/WAD/Lump.cs @@ -17,10 +17,6 @@ namespace SabreTools.Models.WAD public byte Padding1 { get; set; } -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif } } diff --git a/WAD/LumpInfo.cs b/WAD/LumpInfo.cs index b62f093..4caeb5e 100644 --- a/WAD/LumpInfo.cs +++ b/WAD/LumpInfo.cs @@ -3,11 +3,7 @@ namespace SabreTools.Models.WAD /// public sealed class LumpInfo { -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif public uint Width { get; set; } @@ -17,18 +13,10 @@ namespace SabreTools.Models.WAD // 12 bytes of unknown data -#if NET48 - public byte[] PixelData { get; set; } -#else public byte[]? PixelData { get; set; } -#endif public uint PaletteSize { get; set; } -#if NET48 - public byte[] PaletteData { get; set; } -#else public byte[]? PaletteData { get; set; } -#endif } } diff --git a/XZP/DirectoryItem.cs b/XZP/DirectoryItem.cs index d2aa181..f50d6c8 100644 --- a/XZP/DirectoryItem.cs +++ b/XZP/DirectoryItem.cs @@ -7,11 +7,7 @@ namespace SabreTools.Models.XZP public uint NameOffset { get; set; } -#if NET48 - public string Name { get; set; } -#else public string? Name { get; set; } -#endif public uint TimeCreated { get; set; } } diff --git a/XZP/File.cs b/XZP/File.cs index 3cb0dfb..2c4f49f 100644 --- a/XZP/File.cs +++ b/XZP/File.cs @@ -9,55 +9,31 @@ namespace SabreTools.Models.XZP /// /// Header data /// -#if NET48 - public Header Header { get; set; } -#else public Header? Header { get; set; } -#endif /// /// Directory entries data /// -#if NET48 - public DirectoryEntry[] DirectoryEntries { get; set; } -#else public DirectoryEntry?[]? DirectoryEntries { get; set; } -#endif /// /// Preload directory entries data /// -#if NET48 - public DirectoryEntry[] PreloadDirectoryEntries { get; set; } -#else public DirectoryEntry?[]? PreloadDirectoryEntries { get; set; } -#endif /// /// Preload directory mappings data /// -#if NET48 - public DirectoryMapping[] PreloadDirectoryMappings { get; set; } -#else public DirectoryMapping?[]? PreloadDirectoryMappings { get; set; } -#endif /// /// Directory items data /// -#if NET48 - public DirectoryItem[] DirectoryItems { get; set; } -#else public DirectoryItem?[]? DirectoryItems { get; set; } -#endif /// /// Footer data /// -#if NET48 - public Footer Footer { get; set; } -#else public Footer? Footer { get; set; } -#endif } } diff --git a/XZP/Footer.cs b/XZP/Footer.cs index aef8ac5..5282a76 100644 --- a/XZP/Footer.cs +++ b/XZP/Footer.cs @@ -5,10 +5,6 @@ namespace SabreTools.Models.XZP { public uint FileLength { get; set; } -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif } } diff --git a/XZP/Header.cs b/XZP/Header.cs index c364278..89caa70 100644 --- a/XZP/Header.cs +++ b/XZP/Header.cs @@ -3,11 +3,7 @@ namespace SabreTools.Models.XZP /// public sealed class Header { -#if NET48 - public string Signature { get; set; } -#else public string? Signature { get; set; } -#endif public uint Version { get; set; } diff --git a/Xbox/XMID.cs b/Xbox/XMID.cs index 81eda57..312dc32 100644 --- a/Xbox/XMID.cs +++ b/Xbox/XMID.cs @@ -17,29 +17,17 @@ namespace SabreTools.Models.Xbox /// /// 2-character publisher identifier /// -#if NET48 - public string PublisherIdentifier { get; set; } -#else public string? PublisherIdentifier { get; set; } -#endif /// /// 3-character Game ID /// -#if NET48 - public string GameID { get; set; } -#else public string? GameID { get; set; } -#endif /// /// 2-character Internal version number /// -#if NET48 - public string VersionNumber { get; set; } -#else public string? VersionNumber { get; set; } -#endif /// /// 1-character Region identifier character diff --git a/Xbox/XeMID.cs b/Xbox/XeMID.cs index 6b2695b..87bff9a 100644 --- a/Xbox/XeMID.cs +++ b/Xbox/XeMID.cs @@ -22,11 +22,7 @@ namespace SabreTools.Models.Xbox /// /// 2-character publisher identifier /// -#if NET48 - public string PublisherIdentifier { get; set; } -#else public string? PublisherIdentifier { get; set; } -#endif /// /// 1-character Platform disc is made for, 2 indicates Xbox 360 @@ -36,20 +32,12 @@ namespace SabreTools.Models.Xbox /// /// 3-character Game ID /// -#if NET48 - public string GameID { get; set; } -#else public string? GameID { get; set; } -#endif /// /// 2-character Title-specific SKU /// -#if NET48 - public string SKU { get; set; } -#else public string? SKU { get; set; } -#endif /// /// 1-character Region identifier character @@ -59,11 +47,7 @@ namespace SabreTools.Models.Xbox /// /// 2-character Base version of executables, usually starts at 01 /// -#if NET48 - public string BaseVersion { get; set; } -#else public string? BaseVersion { get; set; } -#endif /// /// 1-character Media subtype identifier @@ -73,19 +57,11 @@ namespace SabreTools.Models.Xbox /// /// 2-character Disc number stored in [disc number][total discs] format /// -#if NET48 - public string DiscNumberIdentifier { get; set; } -#else public string? DiscNumberIdentifier { get; set; } -#endif /// /// 8-hex-digit certification submission identifier; usually on test discs only /// -#if NET48 - public string CertificationSubmissionIdentifier { get; set; } -#else public string? CertificationSubmissionIdentifier { get; set; } -#endif } }