From 5e5360441a01fc1fb55d683134a3eea294fef695 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 5 Dec 2024 00:06:24 -0500 Subject: [PATCH] Replace Aaru pre-command flags --- CHANGELIST.md | 1 + MPF.ExecutionContexts.Test/AaruTests.cs | 43 ++++ .../Aaru/ExecutionContext.cs | 195 ++++++++++++++---- MPF.ExecutionContexts/Aaru/FlagStrings.cs | 110 ---------- 4 files changed, 202 insertions(+), 147 deletions(-) create mode 100644 MPF.ExecutionContexts.Test/AaruTests.cs diff --git a/CHANGELIST.md b/CHANGELIST.md index e1ee9528..3ab18768 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -32,6 +32,7 @@ - Handle issue with old .NET - Let inputs read equal-separated values - Fix some formatting issues with Input types +- Replace Aaru pre-command flags ### 3.2.4 (2024-11-24) diff --git a/MPF.ExecutionContexts.Test/AaruTests.cs b/MPF.ExecutionContexts.Test/AaruTests.cs new file mode 100644 index 00000000..acd4bf6b --- /dev/null +++ b/MPF.ExecutionContexts.Test/AaruTests.cs @@ -0,0 +1,43 @@ +using MPF.ExecutionContexts.Aaru; +using SabreTools.RedumpLib.Data; +using Xunit; + +namespace MPF.ExecutionContexts.Test +{ + public class AaruTests + { + #region Converters.Extension + + [Theory] + [InlineData(null, ".aaruf")] + [InlineData(MediaType.CDROM, ".aaruf")] + [InlineData(MediaType.GDROM, ".aaruf")] + [InlineData(MediaType.DVD, ".aaruf")] + [InlineData(MediaType.HDDVD, ".aaruf")] + [InlineData(MediaType.BluRay, ".aaruf")] + [InlineData(MediaType.FloppyDisk, ".aaruf")] + [InlineData(MediaType.HardDisk, ".aaruf")] + [InlineData(MediaType.ApertureCard, ".aaruf")] + public void ExtensionTest(MediaType? type, string expected) + { + string actual = Converters.Extension(type); + Assert.Equal(expected, actual); + } + + #endregion + + /// + /// Ensure pre-command flags can all be set properly + /// + [Theory] + [InlineData("--debug --help --verbose --version formats")] + [InlineData("--debug true --help true --verbose true --version true formats")] + public void PreCommandFlagsTest(string parameters) + { + string? expected = "--debug true --help true --verbose true --version true formats"; + var context = new ExecutionContext(parameters); + string? actual = context.GenerateParameters(); + Assert.Equal(expected, actual); + } + } +} \ No newline at end of file diff --git a/MPF.ExecutionContexts/Aaru/ExecutionContext.cs b/MPF.ExecutionContexts/Aaru/ExecutionContext.cs index 237a16f4..a35813b6 100644 --- a/MPF.ExecutionContexts/Aaru/ExecutionContext.cs +++ b/MPF.ExecutionContexts/Aaru/ExecutionContext.cs @@ -22,7 +22,11 @@ namespace MPF.ExecutionContexts.Aaru public override int? Speed { get { return SpeedValue; } - set { SpeedValue = (sbyte?)value; } + set + { + SpeedValue = (sbyte?)value; + (_inputs[FlagStrings.SpeedLong] as Int8Input)?.SetValue((sbyte?)value); + } } #endregion @@ -109,12 +113,121 @@ namespace MPF.ExecutionContexts.Aaru public string? XMLSidecarValue { get; set; } - #endregion + /// + /// Set of all pre-command flags + /// + private readonly Dictionary _preCommandInputs = new() + { + [FlagStrings.DebugLong] = new BooleanInput(FlagStrings.DebugShort, FlagStrings.DebugLong, required: false), + [FlagStrings.HelpLong] = new BooleanInput(FlagStrings.HelpShort, FlagStrings.HelpLong, required: false), + [FlagStrings.HelpShortAlt] = new BooleanInput(FlagStrings.HelpShortAlt, FlagStrings.HelpLong, required: false), + [FlagStrings.VerboseLong] = new BooleanInput(FlagStrings.VerboseShort, FlagStrings.VerboseLong, required: false), + [FlagStrings.VersionLong] = new BooleanInput(FlagStrings.VersionLong, required: false), + }; /// - /// Set of inputs to use for this context + /// Set of all command flags /// - private readonly List _inputs = FlagStrings.GetInputs(); + private readonly Dictionary _inputs = new() + { + // Boolean flags + [FlagStrings.Adler32Long] = new BooleanInput(FlagStrings.Adler32Short, FlagStrings.Adler32Long, required: false), + [FlagStrings.ClearLong] = new BooleanInput(FlagStrings.ClearLong, required: false), + [FlagStrings.ClearAllLong] = new BooleanInput(FlagStrings.ClearAllLong, required: false), + [FlagStrings.CRC16Long] = new BooleanInput(FlagStrings.CRC16Long, required: false), + [FlagStrings.CRC32Long] = new BooleanInput(FlagStrings.CRC32Short, FlagStrings.CRC32Long, required: false), + [FlagStrings.CRC64Long] = new BooleanInput(FlagStrings.CRC64Long, required: false), + [FlagStrings.DiskTagsLong] = new BooleanInput(FlagStrings.DiskTagsShort, FlagStrings.DiskTagsLong, required: false), + [FlagStrings.DuplicatedSectorsLong] = new BooleanInput(FlagStrings.DuplicatedSectorsShort, FlagStrings.DuplicatedSectorsLong, required: false), + [FlagStrings.EjectLong] = new BooleanInput(FlagStrings.EjectLong, required: false), + [FlagStrings.ExtendedAttributesLong] = new BooleanInput(FlagStrings.ExtendedAttributesShort, FlagStrings.ExtendedAttributesLong, required: false), + [FlagStrings.FilesystemsLong] = new BooleanInput(FlagStrings.FilesystemsShort, FlagStrings.FilesystemsLong, required: false), + [FlagStrings.FirstPregapLong] = new BooleanInput(FlagStrings.FirstPregapLong, required: false), + [FlagStrings.FixOffsetLong] = new BooleanInput(FlagStrings.FixOffsetLong, required: false), + [FlagStrings.FixSubchannelLong] = new BooleanInput(FlagStrings.FixSubchannelLong, required: false), + [FlagStrings.FixSubchannelCrcLong] = new BooleanInput(FlagStrings.FixSubchannelCrcLong, required: false), + [FlagStrings.FixSubchannelPositionLong] = new BooleanInput(FlagStrings.FixSubchannelPositionLong, required: false), + [FlagStrings.Fletcher16Long] = new BooleanInput(FlagStrings.Fletcher16Long, required: false), + [FlagStrings.Fletcher32Long] = new BooleanInput(FlagStrings.Fletcher32Long, required: false), + [FlagStrings.ForceLong] = new BooleanInput(FlagStrings.ForceShort, FlagStrings.ForceLong, required: false), + [FlagStrings.GenerateSubchannelsLong] = new BooleanInput(FlagStrings.GenerateSubchannelsLong, required: false), + [FlagStrings.LongFormatLong] = new BooleanInput(FlagStrings.LongFormatShort, FlagStrings.LongFormatLong, required: false), + [FlagStrings.LongSectorsLong] = new BooleanInput(FlagStrings.LongSectorsShort, FlagStrings.LongSectorsLong, required: false), + [FlagStrings.MD5Long] = new BooleanInput(FlagStrings.MD5Short, FlagStrings.MD5Long, required: false), + [FlagStrings.MetadataLong] = new BooleanInput(FlagStrings.MetadataLong, required: false), + [FlagStrings.PartitionsLong] = new BooleanInput(FlagStrings.PartitionsShort, FlagStrings.PartitionsLong, required: false), + [FlagStrings.PauseLong] = new BooleanInput(FlagStrings.PauseLong, required: false), + [FlagStrings.PersistentLong] = new BooleanInput(FlagStrings.PersistentLong, required: false), + [FlagStrings.PrivateLong] = new BooleanInput(FlagStrings.PrivateLong, required: false), + [FlagStrings.ResumeLong] = new BooleanInput(FlagStrings.ResumeShort, FlagStrings.ResumeLong, required: false), + [FlagStrings.RetrySubchannelLong] = new BooleanInput(FlagStrings.RetrySubchannelLong, required: false), + [FlagStrings.SectorTagsLong] = new BooleanInput(FlagStrings.SectorTagsShort, FlagStrings.SectorTagsLong, required: false), + [FlagStrings.SeparatedTracksLong] = new BooleanInput(FlagStrings.SeparatedTracksShort, FlagStrings.SeparatedTracksLong, required: false), + [FlagStrings.SHA1Long] = new BooleanInput(FlagStrings.SHA1Short, FlagStrings.SHA1Long, required: false), + [FlagStrings.SHA256Long] = new BooleanInput(FlagStrings.SHA256Long, required: false), + [FlagStrings.SHA384Long] = new BooleanInput(FlagStrings.SHA384Long, required: false), + [FlagStrings.SHA512Long] = new BooleanInput(FlagStrings.SHA512Long, required: false), + [FlagStrings.SkipCdiReadyHoleLong] = new BooleanInput(FlagStrings.SkipCdiReadyHoleLong, required: false), + [FlagStrings.SpamSumLong] = new BooleanInput(FlagStrings.SpamSumShort, FlagStrings.SpamSumLong, required: false), + [FlagStrings.StopOnErrorLong] = new BooleanInput(FlagStrings.StopOnErrorShort, FlagStrings.StopOnErrorLong, required: false), + [FlagStrings.StoreEncryptedLong] = new BooleanInput(FlagStrings.StoreEncryptedLong, required: false), + [FlagStrings.TapeLong] = new BooleanInput(FlagStrings.TapeShort, FlagStrings.TapeLong, required: false), + [FlagStrings.TitleKeysLong] = new BooleanInput(FlagStrings.TitleKeysLong, required: false), + [FlagStrings.TrapDiscLong] = new BooleanInput(FlagStrings.TrapDiscShort, FlagStrings.TrapDiscLong, required: false), + [FlagStrings.TrimLong] = new BooleanInput(FlagStrings.TrimLong, required: false), + [FlagStrings.UseBufferedReadsLong] = new BooleanInput(FlagStrings.UseBufferedReadsLong, required: false), + [FlagStrings.VerifyDiscLong] = new BooleanInput(FlagStrings.VerifyDiscShort, FlagStrings.VerifyDiscLong, required: false), + [FlagStrings.VerifySectorsLong] = new BooleanInput(FlagStrings.VerifySectorsShort, FlagStrings.VerifySectorsLong, required: false), + [FlagStrings.WholeDiscLong] = new BooleanInput(FlagStrings.WholeDiscShort, FlagStrings.WholeDiscLong, required: false), + + // Int8 flags + [FlagStrings.SpeedLong] = new Int8Input(FlagStrings.SpeedLong), + + // Int16 flags + [FlagStrings.RetryPassesLong] = new Int16Input(FlagStrings.RetryPassesShort, FlagStrings.RetryPassesLong), + [FlagStrings.WidthLong] = new Int16Input(FlagStrings.WidthShort, FlagStrings.WidthLong), + + // Int32 flags + [FlagStrings.BlockSizeLong] = new Int32Input(FlagStrings.BlockSizeShort, FlagStrings.BlockSizeLong), + [FlagStrings.CountLong] = new Int32Input(FlagStrings.CountShort, FlagStrings.CountLong), + [FlagStrings.MaxBlocksLong] = new Int32Input(FlagStrings.MaxBlocksLong), + [FlagStrings.MediaLastSequenceLong] = new Int32Input(FlagStrings.MediaLastSequenceLong), + [FlagStrings.MediaSequenceLong] = new Int32Input(FlagStrings.MediaSequenceLong), + [FlagStrings.SkipLong] = new Int32Input(FlagStrings.SkipShort, FlagStrings.SkipLong), + + // Int64 flags + //[FlagStrings.LengthLong] = new Int64Input(FlagStrings.LengthShort, FlagStrings.LengthLong), + [FlagStrings.LengthLong] = new StringInput(FlagStrings.LengthShort, FlagStrings.LengthLong), + [FlagStrings.StartLong] = new Int64Input(FlagStrings.StartShort, FlagStrings.StartLong), + + // String flags + [FlagStrings.CommentsLong] = new StringInput(FlagStrings.CommentsLong), + [FlagStrings.CreatorLong] = new StringInput(FlagStrings.CreatorLong), + [FlagStrings.DriveManufacturerLong] = new StringInput(FlagStrings.DriveManufacturerLong), + [FlagStrings.DriveModelLong] = new StringInput(FlagStrings.DriveModelLong), + [FlagStrings.DriveRevisionLong] = new StringInput(FlagStrings.DriveRevisionLong), + [FlagStrings.DriveSerialLong] = new StringInput(FlagStrings.DriveSerialLong), + [FlagStrings.EncodingLong] = new StringInput(FlagStrings.EncodingShort, FlagStrings.EncodingLong), + [FlagStrings.FormatConvertLong] = new StringInput(FlagStrings.FormatConvertShort, FlagStrings.FormatConvertLong), + [FlagStrings.FormatDumpLong] = new StringInput(FlagStrings.FormatDumpShort, FlagStrings.FormatDumpLong), + [FlagStrings.GeometryLong] = new StringInput(FlagStrings.GeometryShort, FlagStrings.GeometryLong), + [FlagStrings.ImgBurnLogLong] = new StringInput(FlagStrings.ImgBurnLogShort, FlagStrings.ImgBurnLogLong), + [FlagStrings.MediaBarcodeLong] = new StringInput(FlagStrings.MediaBarcodeLong), + [FlagStrings.MediaManufacturerLong] = new StringInput(FlagStrings.MediaManufacturerLong), + [FlagStrings.MediaModelLong] = new StringInput(FlagStrings.MediaModelLong), + [FlagStrings.MediaPartNumberLong] = new StringInput(FlagStrings.MediaPartNumberLong), + [FlagStrings.MediaSerialLong] = new StringInput(FlagStrings.MediaSerialLong), + [FlagStrings.MediaTitleLong] = new StringInput(FlagStrings.MediaTitleLong), + [FlagStrings.MHDDLogLong] = new StringInput(FlagStrings.MHDDLogShort, FlagStrings.MHDDLogLong), + [FlagStrings.NamespaceLong] = new StringInput(FlagStrings.NamespaceShort, FlagStrings.NamespaceLong), + [FlagStrings.OptionsLong] = new StringInput(FlagStrings.OptionsShort, FlagStrings.OptionsLong), + [FlagStrings.OutputPrefixLong] = new StringInput(FlagStrings.OutputPrefixShort, FlagStrings.OutputPrefixLong), + [FlagStrings.ResumeFileLong] = new StringInput(FlagStrings.ResumeFileShort, FlagStrings.ResumeFileLong), + [FlagStrings.SubchannelLong] = new StringInput(FlagStrings.SubchannelLong), + [FlagStrings.XMLSidecarLong] = new StringInput(FlagStrings.XMLSidecarShort, FlagStrings.XMLSidecarLong), + }; + + #endregion /// public ExecutionContext(string? parameters) : base(parameters) { } @@ -431,30 +544,20 @@ namespace MPF.ExecutionContexts.Aaru #region Pre-command flags - // Debug - if (this[FlagStrings.DebugLong] != null) - parameters.Add($"{FlagStrings.DebugLong} {this[FlagStrings.DebugLong]}"); + foreach (var kvp in _preCommandInputs) + { + // If the value doesn't exist + string formatted = kvp.Value.Format(useEquals: false); + if (formatted.Length == 0) + continue; - // Pause - if (this[FlagStrings.PauseLong] != null) - parameters.Add($"{FlagStrings.PauseLong} {this[FlagStrings.PauseLong]}"); - - // Verbose - if (this[FlagStrings.VerboseLong] != null) - parameters.Add($"{FlagStrings.VerboseLong} {this[FlagStrings.VerboseLong]}"); - - // Version - if (this[FlagStrings.VersionLong] != null) - parameters.Add($"{FlagStrings.VersionLong} {this[FlagStrings.VersionLong]}"); - - // Help - if (this[FlagStrings.HelpLong] != null) - parameters.Add($"{FlagStrings.HelpLong} {this[FlagStrings.HelpLong]}"); + // Append the parameter + parameters.Add(formatted); + } #endregion BaseCommand ??= CommandStrings.NONE; - if (!string.IsNullOrEmpty(BaseCommand)) parameters.Add(BaseCommand); else @@ -1217,6 +1320,7 @@ namespace MPF.ExecutionContexts.Aaru { this[FlagStrings.SpeedLong] = true; SpeedValue = (sbyte?)driveSpeed; + (_inputs[FlagStrings.SpeedLong] as Int8Input)?.SetValue((sbyte)driveSpeed); } // First check to see if the combination of system and MediaType is valid @@ -1230,17 +1334,30 @@ namespace MPF.ExecutionContexts.Aaru { this[FlagStrings.RetryPassesLong] = true; RetryPassesValue = (short)rereadCount; + (_inputs[FlagStrings.RetryPassesLong] as Int16Input)?.SetValue((short)rereadCount); } // Set user-defined options if (GetBooleanSetting(options, SettingConstants.EnableDebug, SettingConstants.EnableDebugDefault)) + { this[FlagStrings.DebugLong] = true; + _preCommandInputs[FlagStrings.DebugLong].SetValue(true); + } if (GetBooleanSetting(options, SettingConstants.EnableVerbose, SettingConstants.EnableVerboseDefault)) + { this[FlagStrings.VerboseLong] = true; + _preCommandInputs[FlagStrings.VerboseLong].SetValue(true); + } if (GetBooleanSetting(options, SettingConstants.ForceDumping, SettingConstants.ForceDumpingDefault)) + { this[FlagStrings.ForceLong] = true; + (_inputs[FlagStrings.ForceLong] as BooleanInput)?.SetValue(true); + } if (GetBooleanSetting(options, SettingConstants.StripPersonalData, SettingConstants.StripPersonalDataDefault)) + { this[FlagStrings.PrivateLong] = true; + (_inputs[FlagStrings.PrivateLong] as BooleanInput)?.SetValue(true); + } // TODO: Look at dump-media formats and the like and see what options there are there to fill in defaults // Now sort based on disc type @@ -1251,21 +1368,30 @@ namespace MPF.ExecutionContexts.Aaru break; case SabreTools.RedumpLib.Data.MediaType.DVD: this[FlagStrings.StoreEncryptedLong] = true; // TODO: Make this configurable + (_inputs[FlagStrings.StoreEncryptedLong] as BooleanInput)?.SetValue(true); this[FlagStrings.TitleKeysLong] = false; // TODO: Make this configurable + (_inputs[FlagStrings.TitleKeysLong] as BooleanInput)?.SetValue(true); this[FlagStrings.TrimLong] = true; // TODO: Make this configurable + (_inputs[FlagStrings.TrimLong] as BooleanInput)?.SetValue(true); break; case SabreTools.RedumpLib.Data.MediaType.GDROM: // Currently no defaults set break; case SabreTools.RedumpLib.Data.MediaType.HDDVD: this[FlagStrings.StoreEncryptedLong] = true; // TODO: Make this configurable + (_inputs[FlagStrings.StoreEncryptedLong] as BooleanInput)?.SetValue(true); this[FlagStrings.TitleKeysLong] = false; // TODO: Make this configurable + (_inputs[FlagStrings.TitleKeysLong] as BooleanInput)?.SetValue(true); this[FlagStrings.TrimLong] = true; // TODO: Make this configurable + (_inputs[FlagStrings.TrimLong] as BooleanInput)?.SetValue(true); break; case SabreTools.RedumpLib.Data.MediaType.BluRay: this[FlagStrings.StoreEncryptedLong] = true; // TODO: Make this configurable + (_inputs[FlagStrings.StoreEncryptedLong] as BooleanInput)?.SetValue(true); this[FlagStrings.TitleKeysLong] = false; // TODO: Make this configurable + (_inputs[FlagStrings.TitleKeysLong] as BooleanInput)?.SetValue(true); this[FlagStrings.TrimLong] = true; // TODO: Make this configurable + (_inputs[FlagStrings.TrimLong] as BooleanInput)?.SetValue(true); break; // Special Formats @@ -1302,21 +1428,16 @@ namespace MPF.ExecutionContexts.Aaru // Keep a count of keys to determine if we should break out to command handling or not int keyCount = Keys.Count; - // Debug - ProcessBooleanParameter(parts, FlagStrings.DebugShort, FlagStrings.DebugLong, ref start, true); + foreach (var kvp in _preCommandInputs) + { + // If the value was not a match + if (!kvp.Value.Process(parts, ref start)) + continue; - // Pause - ProcessBooleanParameter(parts, null, FlagStrings.PauseLong, ref start, true); - - // Verbose - ProcessBooleanParameter(parts, FlagStrings.VerboseShort, FlagStrings.VerboseLong, ref start, true); - - // Version - ProcessBooleanParameter(parts, null, FlagStrings.VersionLong, ref start, true); - - // Help - ProcessBooleanParameter(parts, FlagStrings.HelpShort, FlagStrings.HelpLong, ref start, true); - ProcessBooleanParameter(parts, FlagStrings.HelpShortAlt, FlagStrings.HelpLong, ref start, true); + // Set the flag + this[kvp.Key] = true; + break; + } // If we didn't add any new flags, break out since we might be at command handling if (keyCount == Keys.Count) diff --git a/MPF.ExecutionContexts/Aaru/FlagStrings.cs b/MPF.ExecutionContexts/Aaru/FlagStrings.cs index 6bd5a284..0c27447d 100644 --- a/MPF.ExecutionContexts/Aaru/FlagStrings.cs +++ b/MPF.ExecutionContexts/Aaru/FlagStrings.cs @@ -1,6 +1,3 @@ -using System.Collections.Generic; -using MPF.ExecutionContexts.Data; - namespace MPF.ExecutionContexts.Aaru { /// @@ -8,113 +5,6 @@ namespace MPF.ExecutionContexts.Aaru /// public static class FlagStrings { - /// - /// Get all available input types - /// - public static List GetInputs() - { - return [ - // Boolean flags - new BooleanInput(Adler32Short, Adler32Long, required: false), - new BooleanInput(ClearLong, required: false), - new BooleanInput(ClearAllLong, required: false), - new BooleanInput(CRC16Long, required: false), - new BooleanInput(CRC32Short, CRC32Long, required: false), - new BooleanInput(CRC64Long, required: false), - new BooleanInput(DebugShort, DebugLong, required: false), - new BooleanInput(DiskTagsShort, DiskTagsLong, required: false), - new BooleanInput(DuplicatedSectorsShort, DuplicatedSectorsLong, required: false), - new BooleanInput(EjectLong, required: false), - new BooleanInput(ExtendedAttributesShort, ExtendedAttributesLong, required: false), - new BooleanInput(FilesystemsShort, FilesystemsLong, required: false), - new BooleanInput(FirstPregapLong, required: false), - new BooleanInput(FixOffsetLong, required: false), - new BooleanInput(FixSubchannelLong, required: false), - new BooleanInput(FixSubchannelCrcLong, required: false), - new BooleanInput(FixSubchannelPositionLong, required: false), - new BooleanInput(Fletcher16Long, required: false), - new BooleanInput(Fletcher32Long, required: false), - new BooleanInput(ForceShort, ForceLong, required: false), - new BooleanInput(GenerateSubchannelsLong, required: false), - new BooleanInput(HelpShort, HelpLong, required: false), // HelpShortAlt - new BooleanInput(LongFormatShort, LongFormatLong, required: false), - new BooleanInput(LongSectorsShort, LongSectorsLong, required: false), - new BooleanInput(MD5Short, MD5Long, required: false), - new BooleanInput(MetadataLong, required: false), - new BooleanInput(PartitionsShort, PartitionsLong, required: false), - new BooleanInput(PauseLong, required: false), - new BooleanInput(PersistentLong, required: false), - new BooleanInput(PrivateLong, required: false), - new BooleanInput(ResumeShort, ResumeLong, required: false), - new BooleanInput(RetrySubchannelLong, required: false), - new BooleanInput(SectorTagsShort, SectorTagsLong, required: false), - new BooleanInput(SeparatedTracksShort, SeparatedTracksLong, required: false), - new BooleanInput(SHA1Short, SHA1Long, required: false), - new BooleanInput(SHA256Long, required: false), - new BooleanInput(SHA384Long, required: false), - new BooleanInput(SHA512Long, required: false), - new BooleanInput(SkipCdiReadyHoleLong, required: false), - new BooleanInput(SpamSumShort, SpamSumLong, required: false), - new BooleanInput(StopOnErrorShort, StopOnErrorLong, required: false), - new BooleanInput(StoreEncryptedLong, required: false), - new BooleanInput(TapeShort, TapeLong, required: false), - new BooleanInput(TitleKeysLong, required: false), - new BooleanInput(TrapDiscShort, TrapDiscLong, required: false), - new BooleanInput(TrimLong, required: false), - new BooleanInput(UseBufferedReadsLong, required: false), - new BooleanInput(VerboseShort, VerboseLong, required: false), - new BooleanInput(VerifyDiscShort, VerifyDiscLong, required: false), - new BooleanInput(VerifySectorsShort, VerifySectorsLong, required: false), - new BooleanInput(VersionLong, required: false), - new BooleanInput(WholeDiscShort, WholeDiscLong, required: false), - - // Int8 flags - new Int8Input(SpeedLong), - - // Int16 flags - new Int16Input(RetryPassesShort, RetryPassesLong), - new Int16Input(WidthShort, WidthLong), - - // Int32 flags - new Int32Input(BlockSizeShort, BlockSizeLong), - new Int32Input(CountShort, CountLong), - new Int32Input(MaxBlocksLong), - new Int32Input(MediaLastSequenceLong), - new Int32Input(MediaSequenceLong), - new Int32Input(SkipShort, SkipLong), - - // Int64 flags - new Int64Input(LengthShort, LengthLong), - new Int64Input(StartShort, StartLong), - - // String flags - new StringInput(CommentsLong), - new StringInput(CreatorLong), - new StringInput(DriveManufacturerLong), - new StringInput(DriveModelLong), - new StringInput(DriveRevisionLong), - new StringInput(DriveSerialLong), - new StringInput(EncodingShort, EncodingLong), - new StringInput(FormatConvertShort, FormatConvertLong), - new StringInput(FormatDumpShort, FormatDumpLong), - new StringInput(GeometryShort, GeometryLong), - new StringInput(ImgBurnLogShort, ImgBurnLogLong), - new StringInput(MediaBarcodeLong), - new StringInput(MediaManufacturerLong), - new StringInput(MediaModelLong), - new StringInput(MediaPartNumberLong), - new StringInput(MediaSerialLong), - new StringInput(MediaTitleLong), - new StringInput(MHDDLogShort, MHDDLogLong), - new StringInput(NamespaceShort, NamespaceLong), - new StringInput(OptionsShort, OptionsLong), - new StringInput(OutputPrefixShort, OutputPrefixLong), - new StringInput(ResumeFileShort, ResumeFileLong), - new StringInput(SubchannelLong), - new StringInput(XMLSidecarShort, XMLSidecarLong), - ]; - } - #region Boolean flags public const string Adler32Short = "-a";