diff --git a/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs b/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs index f0d9ff7c8..c6ed8697d 100644 --- a/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs +++ b/DiscImageChef.Filesystems/AppleDOS/AppleDOS.cs @@ -57,10 +57,8 @@ namespace DiscImageChef.Filesystems.AppleDOS public string Name => "Apple DOS File System"; public Guid Id => new Guid("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n"); - public (string name, Type type, string description)[] ListOptions() - { - return new(string name, Type type, string description)[] { }; - } + public IEnumerable<(string name, Type type, string description)> SupportedOptions => + new(string name, Type type, string description)[] { }; static Dictionary GetDefaultOptions() { diff --git a/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs b/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs index 5da78b40b..a631a819f 100644 --- a/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs +++ b/DiscImageChef.Filesystems/AppleMFS/AppleMFS.cs @@ -67,15 +67,13 @@ namespace DiscImageChef.Filesystems.AppleMFS public Guid Id => new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A"); public Encoding Encoding { get; private set; } + // TODO: Implement Finder namespace (requires decoding Desktop database) + public IEnumerable<(string name, Type type, string description)> SupportedOptions => + new(string name, Type type, string description)[] { }; + static Dictionary GetDefaultOptions() { return new Dictionary {{"debug", false.ToString()}}; } - - // TODO: Implement Finder namespace (requires decoding Desktop database) - public (string name, Type type, string description)[] ListOptions() - { - return new(string name, Type type, string description)[] { }; - } } } \ No newline at end of file diff --git a/DiscImageChef.Filesystems/CPM/CPM.cs b/DiscImageChef.Filesystems/CPM/CPM.cs index 3b1c315fb..8ee55704b 100644 --- a/DiscImageChef.Filesystems/CPM/CPM.cs +++ b/DiscImageChef.Filesystems/CPM/CPM.cs @@ -117,10 +117,8 @@ namespace DiscImageChef.Filesystems.CPM public string Name => "CP/M File System"; public Guid Id => new Guid("AA2B8585-41DF-4E3B-8A35-D1A935E2F8A1"); - public (string name, Type type, string description)[] ListOptions() - { - return new(string name, Type type, string description)[] { }; - } + public IEnumerable<(string name, Type type, string description)> SupportedOptions => + new(string name, Type type, string description)[] { }; static Dictionary GetDefaultOptions() { diff --git a/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs b/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs index ae8fa5446..530fcb949 100644 --- a/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs +++ b/DiscImageChef.Filesystems/IReadOnlyFilesystem.cs @@ -44,6 +44,11 @@ namespace DiscImageChef.Filesystems /// public interface IReadOnlyFilesystem : IFilesystem { + /// + /// Retrieves a list of options supported by the filesystem, with name, type and description + /// + IEnumerable<(string name, Type type, string description)> SupportedOptions { get; } + /// /// Initializates whatever internal structures the filesystem plugin needs to be able to read files and directories /// from the filesystem. @@ -130,10 +135,5 @@ namespace DiscImageChef.Filesystems /// Link path. /// Link destination. Errno ReadLink(string path, out string dest); - - /// - /// Retrieves a list of options supported by the filesystem, with name, type and description - /// - (string name, Type type, string description)[] ListOptions(); } } \ No newline at end of file diff --git a/DiscImageChef.Filesystems/LisaFS/LisaFS.cs b/DiscImageChef.Filesystems/LisaFS/LisaFS.cs index 451ba189b..1378a8980 100644 --- a/DiscImageChef.Filesystems/LisaFS/LisaFS.cs +++ b/DiscImageChef.Filesystems/LisaFS/LisaFS.cs @@ -57,10 +57,8 @@ namespace DiscImageChef.Filesystems.LisaFS public FileSystemType XmlFsType { get; private set; } // TODO: Implement Lisa 7/7 namespace (needs decoding {!CATALOG} file) - public (string name, Type type, string description)[] ListOptions() - { - return new(string name, Type type, string description)[] { }; - } + public IEnumerable<(string name, Type type, string description)> SupportedOptions => + new(string name, Type type, string description)[] { }; static Dictionary GetDefaultOptions() { diff --git a/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs b/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs index 32bdbfcec..4efb81436 100644 --- a/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs +++ b/DiscImageChef.Filesystems/UCSDPascal/UCSDPascal.cs @@ -73,10 +73,8 @@ namespace DiscImageChef.Filesystems.UCSDPascal return Errno.NotSupported; } - public (string name, Type type, string description)[] ListOptions() - { - return new(string name, Type type, string description)[] { }; - } + public IEnumerable<(string name, Type type, string description)> SupportedOptions => + new(string name, Type type, string description)[] { }; static Dictionary GetDefaultOptions() { diff --git a/DiscImageChef/Commands/ListOptions.cs b/DiscImageChef/Commands/ListOptions.cs index 3a3508619..608f2159b 100644 --- a/DiscImageChef/Commands/ListOptions.cs +++ b/DiscImageChef/Commands/ListOptions.cs @@ -47,7 +47,7 @@ namespace DiscImageChef.Commands foreach(KeyValuePair kvp in plugins.ReadOnlyFilesystems) { - List<(string name, Type type, string description)> options = kvp.Value.ListOptions().ToList(); + List<(string name, Type type, string description)> options = kvp.Value.SupportedOptions.ToList(); options.Add(("debug", typeof(bool), "Enables debug features if available")); DicConsole.WriteLine("Options for {0}:", kvp.Value.Name);