mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 11:14:25 +00:00
[Refactor] Use collection expression.
This commit is contained in:
@@ -62,11 +62,7 @@ public static class Version
|
||||
{
|
||||
Assembly assembly = typeof(GCSettings).Assembly;
|
||||
|
||||
string[] assemblyPath = assembly.CodeBase?.Split(new[]
|
||||
{
|
||||
'/', '\\'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] assemblyPath = assembly.CodeBase?.Split(['/', '\\'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(assemblyPath is null) return null;
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ public partial class LzdStream : Stream
|
||||
if(buffer == null) throw new ArgumentNullException(nameof(buffer));
|
||||
if(offset < 0 || count < 0 || offset + count > buffer.Length) throw new ArgumentOutOfRangeException();
|
||||
|
||||
int totalRead = 0;
|
||||
int totalOut = 0;
|
||||
int iter = 0;
|
||||
var totalRead = 0;
|
||||
var totalOut = 0;
|
||||
var iter = 0;
|
||||
|
||||
while(totalRead < count)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ public partial class LzdStream : Stream
|
||||
if(!_flushed)
|
||||
{
|
||||
Debug.WriteLine($"[FEED] size=0 flushed={_flushed} (final empty feed)");
|
||||
var f = (LZDStatus)LZD_FeedNative(_ctx, Array.Empty<byte>(), UIntPtr.Zero);
|
||||
var f = (LZDStatus)LZD_FeedNative(_ctx, [], UIntPtr.Zero);
|
||||
if(f == LZDStatus.ERROR) ThrowDecoderError();
|
||||
_flushed = true;
|
||||
Debug.WriteLine(">>> SET _flushed=true");
|
||||
|
||||
@@ -53,6 +53,13 @@ public sealed partial class AppleDOS : IReadOnlyFilesystem
|
||||
uint _usedSectors;
|
||||
Vtoc _vtoc;
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
#region IReadOnlyFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -68,21 +75,13 @@ public sealed partial class AppleDOS : IReadOnlyFilesystem
|
||||
public string Author => Authors.NataliaPortillo;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description)>();
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => null;
|
||||
|
||||
#endregion
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
#region Caches
|
||||
|
||||
/// <summary>Caches track/sector lists</summary>
|
||||
|
||||
@@ -42,11 +42,7 @@ public sealed partial class AppleDOS
|
||||
{
|
||||
ErrorNumber CacheFile(string path)
|
||||
{
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -148,11 +144,7 @@ public sealed partial class AppleDOS
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -180,11 +172,7 @@ public sealed partial class AppleDOS
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -269,11 +257,7 @@ public sealed partial class AppleDOS
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
|
||||
@@ -47,11 +47,7 @@ public sealed partial class AppleDOS
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -82,11 +78,7 @@ public sealed partial class AppleDOS
|
||||
{
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
|
||||
@@ -60,6 +60,13 @@ public sealed partial class AppleMFS : IReadOnlyFilesystem
|
||||
int _sectorsPerBlock;
|
||||
MasterDirectoryBlock _volMdb;
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
#region IReadOnlyFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -76,18 +83,10 @@ public sealed partial class AppleMFS : IReadOnlyFilesystem
|
||||
|
||||
// TODO: Implement Finder namespace (requires decoding Desktop database)
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description)>();
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => null;
|
||||
|
||||
#endregion
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -46,11 +46,7 @@ public sealed partial class AppleMFS
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -157,11 +153,7 @@ public sealed partial class AppleMFS
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -292,11 +284,7 @@ public sealed partial class AppleMFS
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
|
||||
@@ -50,11 +50,7 @@ public sealed partial class AppleMFS
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -103,11 +99,7 @@ public sealed partial class AppleMFS
|
||||
{
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
|
||||
@@ -48,6 +48,22 @@ public sealed partial class CBM : IReadOnlyFilesystem
|
||||
byte[] _root;
|
||||
FileSystemInfo _statfs;
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
ulong CbmChsToLba(byte track, byte sector, bool is1581)
|
||||
{
|
||||
if(track is 0 or > 40) return 0;
|
||||
|
||||
if(is1581) return (ulong)((track - 1) * 40 + sector - 1);
|
||||
|
||||
return trackStartingLbas[track - 1] + sector;
|
||||
}
|
||||
|
||||
#region IReadOnlyFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -82,27 +98,10 @@ public sealed partial class CBM : IReadOnlyFilesystem
|
||||
public FileSystem Metadata { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description)>();
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => null;
|
||||
|
||||
#endregion
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
ulong CbmChsToLba(byte track, byte sector, bool is1581)
|
||||
{
|
||||
if(track is 0 or > 40) return 0;
|
||||
|
||||
if(is1581) return (ulong)((track - 1) * 40 + sector - 1);
|
||||
|
||||
return trackStartingLbas[track - 1] + sector;
|
||||
}
|
||||
}
|
||||
@@ -47,11 +47,7 @@ public sealed partial class CBM
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -71,11 +67,7 @@ public sealed partial class CBM
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -105,11 +97,7 @@ public sealed partial class CBM
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
|
||||
@@ -99,8 +99,7 @@ public sealed partial class CPM : IReadOnlyFilesystem
|
||||
public string Author => Authors.NataliaPortillo;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description)>();
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => null;
|
||||
|
||||
@@ -46,11 +46,7 @@ public sealed partial class CPM
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -78,11 +74,7 @@ public sealed partial class CPM
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -148,11 +140,7 @@ public sealed partial class CPM
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
|
||||
@@ -45,19 +45,16 @@ public sealed partial class CPM
|
||||
{
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
if(!_fileCache.ContainsKey(pathElements[0].ToUpperInvariant())) return ErrorNumber.NoSuchFile;
|
||||
|
||||
if(string.Compare(xattr, "com.caldera.cpm.password", StringComparison.InvariantCulture) == 0)
|
||||
if(!_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf))
|
||||
return ErrorNumber.NoError;
|
||||
{
|
||||
if(!_passwordCache.TryGetValue(pathElements[0].ToUpperInvariant(), out buf)) return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
if(string.Compare(xattr, "com.caldera.cpm.password.text", StringComparison.InvariantCulture) != 0)
|
||||
return ErrorNumber.NoSuchExtendedAttribute;
|
||||
@@ -74,11 +71,7 @@ public sealed partial class CPM
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
|
||||
@@ -88,11 +88,7 @@ public sealed partial class FAT
|
||||
return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
KeyValuePair<string, CompleteDirectoryEntry> entry =
|
||||
_rootDirectoryCache.FirstOrDefault(t => t.Key.ToLower(_cultureInfo) == pieces[0]);
|
||||
|
||||
@@ -67,6 +67,13 @@ public sealed partial class FAT : IReadOnlyFilesystem
|
||||
FileSystemInfo _statfs;
|
||||
bool _useFirstFat;
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
#region IReadOnlyFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -82,8 +89,7 @@ public sealed partial class FAT : IReadOnlyFilesystem
|
||||
public string Author => Authors.NataliaPortillo;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description)>();
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => new()
|
||||
@@ -106,11 +112,4 @@ public sealed partial class FAT : IReadOnlyFilesystem
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -111,11 +111,7 @@ public sealed partial class FAT
|
||||
|
||||
string cutPath = path.StartsWith('/') ? path[1..].ToLower(_cultureInfo) : path.ToLower(_cultureInfo);
|
||||
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pieces.Length == 0) return ErrorNumber.InvalidArgument;
|
||||
|
||||
|
||||
@@ -72,11 +72,7 @@ public sealed partial class XboxFatPlugin
|
||||
return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
KeyValuePair<string, DirectoryEntry> entry =
|
||||
_rootDirectory.FirstOrDefault(t => t.Key.ToLower(_cultureInfo) == pieces[0]);
|
||||
|
||||
@@ -59,6 +59,13 @@ public sealed partial class XboxFatPlugin : IReadOnlyFilesystem
|
||||
FileSystemInfo _statfs;
|
||||
Superblock _superblock;
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
#region IReadOnlyFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -93,18 +100,10 @@ public sealed partial class XboxFatPlugin : IReadOnlyFilesystem
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description)>();
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => null;
|
||||
|
||||
#endregion
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -80,11 +80,7 @@ public sealed partial class XboxFatPlugin
|
||||
|
||||
string cutPath = path.StartsWith('/') ? path[1..].ToLower(_cultureInfo) : path.ToLower(_cultureInfo);
|
||||
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pieces.Length == 0) return ErrorNumber.InvalidArgument;
|
||||
|
||||
|
||||
@@ -951,11 +951,7 @@ public sealed partial class ISO9660
|
||||
? path[1..].ToLower(CultureInfo.CurrentUICulture)
|
||||
: path.ToLower(CultureInfo.CurrentUICulture);
|
||||
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
var currentParent = 1;
|
||||
var currentPiece = 0;
|
||||
@@ -1151,11 +1147,7 @@ public sealed partial class ISO9660
|
||||
return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
KeyValuePair<string, DecodedDirectoryEntry> entry =
|
||||
_rootDirectoryCache.FirstOrDefault(t => t.Key.Equals(pieces[0], StringComparison.CurrentCultureIgnoreCase));
|
||||
|
||||
@@ -52,11 +52,7 @@ public sealed partial class ISO9660
|
||||
? path[1..].ToLower(CultureInfo.CurrentUICulture)
|
||||
: path.ToLower(CultureInfo.CurrentUICulture);
|
||||
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pieces.Length == 0) return ErrorNumber.InvalidArgument;
|
||||
|
||||
|
||||
@@ -76,13 +76,12 @@ public sealed partial class ISO9660 : IReadOnlyFilesystem
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
new (string name, Type type, string description)[]
|
||||
{
|
||||
[
|
||||
("use_path_table", typeof(bool), "Use path table for directory traversal"),
|
||||
("use_trans_tbl", typeof(bool), "Use TRANS.TBL for filenames"),
|
||||
("use_evd", typeof(bool),
|
||||
"If present, use Enhanced Volume Descriptor with specified encoding (overrides namespace)")
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => new()
|
||||
|
||||
@@ -105,9 +105,8 @@ public sealed partial class LisaFS
|
||||
if(!_mounted || !_debug) return ErrorNumber.AccessDenied;
|
||||
|
||||
if(fileId is > 4 or <= 0)
|
||||
{
|
||||
if(fileId != FILEID_BOOT_SIGNED && fileId != FILEID_LOADER_SIGNED) return ErrorNumber.InvalidArgument;
|
||||
}
|
||||
if(fileId != FILEID_BOOT_SIGNED && fileId != FILEID_LOADER_SIGNED)
|
||||
return ErrorNumber.InvalidArgument;
|
||||
|
||||
if(_systemFileCache.TryGetValue(fileId, out buf) && !tags) return ErrorNumber.NoError;
|
||||
|
||||
@@ -330,9 +329,8 @@ public sealed partial class LisaFS
|
||||
if(!tags)
|
||||
{
|
||||
if(_fileSizeCache.TryGetValue(fileId, out int realSize))
|
||||
{
|
||||
if(realSize > temp.Length) AaruLogging.Error(Localization.File_0_gets_truncated, fileId);
|
||||
}
|
||||
if(realSize > temp.Length)
|
||||
AaruLogging.Error(Localization.File_0_gets_truncated, fileId);
|
||||
|
||||
buf = temp;
|
||||
|
||||
@@ -351,11 +349,7 @@ public sealed partial class LisaFS
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
switch(pathElements.Length)
|
||||
{
|
||||
|
||||
@@ -50,6 +50,13 @@ public sealed partial class LisaFS : IReadOnlyFilesystem
|
||||
SRecord[] _srecords;
|
||||
ulong _volumePrefix;
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
#region IReadOnlyFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -66,8 +73,7 @@ public sealed partial class LisaFS : IReadOnlyFilesystem
|
||||
|
||||
// TODO: Implement Lisa 7/7 namespace (needs decoding {!CATALOG} file)
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description)>();
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => new()
|
||||
@@ -82,13 +88,6 @@ public sealed partial class LisaFS : IReadOnlyFilesystem
|
||||
|
||||
#endregion
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
#region Caches
|
||||
|
||||
/// <summary>Caches Extents Files</summary>
|
||||
|
||||
@@ -132,11 +132,7 @@ public sealed partial class OperaFS
|
||||
return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
KeyValuePair<string, DirectoryEntryWithPointers> entry =
|
||||
_rootDirectoryCache.FirstOrDefault(t => t.Key.Equals(pieces[0], StringComparison.CurrentCultureIgnoreCase));
|
||||
|
||||
@@ -47,11 +47,7 @@ public sealed partial class OperaFS
|
||||
? path[1..].ToLower(CultureInfo.CurrentUICulture)
|
||||
: path.ToLower(CultureInfo.CurrentUICulture);
|
||||
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pieces.Length == 0) return ErrorNumber.InvalidArgument;
|
||||
|
||||
|
||||
@@ -49,6 +49,13 @@ public sealed partial class OperaFS : IReadOnlyFilesystem
|
||||
FileSystemInfo _statfs;
|
||||
uint _volumeBlockSizeRatio;
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
#region IReadOnlyFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -83,18 +90,10 @@ public sealed partial class OperaFS : IReadOnlyFilesystem
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description)>();
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => null;
|
||||
|
||||
#endregion
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -68,11 +68,7 @@ public sealed partial class PascalPlugin
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -92,11 +88,7 @@ public sealed partial class PascalPlugin
|
||||
|
||||
if(!_mounted) return ErrorNumber.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
@@ -175,11 +167,7 @@ public sealed partial class PascalPlugin
|
||||
{
|
||||
stat = null;
|
||||
|
||||
string[] pathElements = path.Split(new[]
|
||||
{
|
||||
'/'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(['/'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pathElements.Length != 1) return ErrorNumber.NotSupported;
|
||||
|
||||
|
||||
@@ -56,6 +56,13 @@ public sealed partial class PascalPlugin : IReadOnlyFilesystem
|
||||
/// <summary>Apple II disks use 256 bytes / sector, but filesystem assumes it's 512 bytes / sector</summary>
|
||||
uint _multiplier;
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
#region IReadOnlyFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -90,18 +97,10 @@ public sealed partial class PascalPlugin : IReadOnlyFilesystem
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description)>();
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => null;
|
||||
|
||||
#endregion
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -299,7 +299,7 @@ public class HexViewPanel : UserControl
|
||||
|
||||
private void OnDataChanged()
|
||||
{
|
||||
_data = Data ?? Array.Empty<byte>();
|
||||
_data = Data ?? [];
|
||||
UpdateDisplay();
|
||||
}
|
||||
|
||||
@@ -329,9 +329,8 @@ public class HexViewPanel : UserControl
|
||||
foreach(ColorRange range in ColorRanges)
|
||||
{
|
||||
for(int i = range.Start; i <= range.End && i < _data.Length; i++)
|
||||
{
|
||||
if(!colorLookup.ContainsKey(i)) colorLookup[i] = range.Color;
|
||||
}
|
||||
if(!colorLookup.ContainsKey(i))
|
||||
colorLookup[i] = range.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public sealed partial class MediaScanViewModel : ViewModelBase
|
||||
{
|
||||
readonly Device _device;
|
||||
readonly string _devicePath;
|
||||
readonly List<(ulong startingSector, double duration)> _pendingSectorData = new();
|
||||
readonly List<(ulong startingSector, double duration)> _pendingSectorData = [];
|
||||
readonly object _pendingSectorDataLock = new();
|
||||
readonly Window _view;
|
||||
[ObservableProperty]
|
||||
|
||||
@@ -75,28 +75,24 @@ public sealed partial class A2R
|
||||
#region IWritableImage Members
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".a2r"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".a2r"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
// TODO: A2R supports a lot more formats, please add more whence tested.
|
||||
MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_HD, MediaType.DOS_525_DS_DD_9, MediaType.DOS_525_HD,
|
||||
MediaType.Apple32SS, MediaType.AppleSonyDS, MediaType.Unknown
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -159,46 +159,43 @@ public sealed partial class Alcohol120
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => new[]
|
||||
{
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags =>
|
||||
[
|
||||
MediaTagType.CD_FullTOC, MediaTagType.DVD_BCA, MediaTagType.DVD_DMI, MediaTagType.DVD_PFI
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => new[]
|
||||
{
|
||||
SectorTagType.CdSectorEcc, SectorTagType.CdSectorEccP, SectorTagType.CdSectorEccQ, SectorTagType.CdSectorEdc,
|
||||
SectorTagType.CdSectorHeader, SectorTagType.CdSectorSubHeader, SectorTagType.CdSectorSync,
|
||||
SectorTagType.CdTrackFlags, SectorTagType.CdSectorSubchannel
|
||||
};
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags =>
|
||||
[
|
||||
SectorTagType.CdSectorEcc, SectorTagType.CdSectorEccP, SectorTagType.CdSectorEccQ,
|
||||
SectorTagType.CdSectorEdc, SectorTagType.CdSectorHeader, SectorTagType.CdSectorSubHeader,
|
||||
SectorTagType.CdSectorSync, SectorTagType.CdTrackFlags, SectorTagType.CdSectorSubchannel
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.BDR, MediaType.BDRE, MediaType.BDREXL, MediaType.BDROM, MediaType.UHDBD, MediaType.BDRXL,
|
||||
MediaType.CBHD, MediaType.CD, MediaType.CDDA, MediaType.CDEG, MediaType.CDG, MediaType.CDI, MediaType.CDMIDI,
|
||||
MediaType.CDMRW, MediaType.CDPLUS, MediaType.CDR, MediaType.CDROM, MediaType.CDROMXA, MediaType.CDRW,
|
||||
MediaType.CDV, MediaType.DVDDownload, MediaType.DVDPR, MediaType.DVDPRDL, MediaType.DVDPRW, MediaType.DVDPRWDL,
|
||||
MediaType.DVDR, MediaType.DVDRAM, MediaType.DVDRDL, MediaType.DVDROM, MediaType.DVDRW, MediaType.DVDRWDL,
|
||||
MediaType.EVD, MediaType.FDDVD, MediaType.DTSCD, MediaType.FVD, MediaType.HDDVDR, MediaType.HDDVDRAM,
|
||||
MediaType.HDDVDRDL, MediaType.HDDVDROM, MediaType.HDDVDRW, MediaType.HDDVDRWDL, MediaType.HDVMD, MediaType.HVD,
|
||||
MediaType.JaguarCD, MediaType.MEGACD, MediaType.PS1CD, MediaType.PS2CD, MediaType.PS2DVD, MediaType.PS3BD,
|
||||
MediaType.PS3DVD, MediaType.PS4BD, MediaType.PS5BD, MediaType.SuperCDROM2, MediaType.SVCD, MediaType.SVOD,
|
||||
MediaType.SATURNCD, MediaType.ThreeDO, MediaType.UDO, MediaType.UDO2, MediaType.UDO2_WORM, MediaType.UMD,
|
||||
MediaType.VCD, MediaType.VCDHD, MediaType.NeoGeoCD, MediaType.PCFX, MediaType.CDTV, MediaType.CD32,
|
||||
MediaType.Nuon, MediaType.Playdia, MediaType.Pippin, MediaType.FMTOWNS, MediaType.MilCD, MediaType.VideoNow,
|
||||
MediaType.VideoNowColor, MediaType.VideoNowXp, MediaType.CVD, MediaType.PCD
|
||||
};
|
||||
MediaType.CBHD, MediaType.CD, MediaType.CDDA, MediaType.CDEG, MediaType.CDG, MediaType.CDI,
|
||||
MediaType.CDMIDI, MediaType.CDMRW, MediaType.CDPLUS, MediaType.CDR, MediaType.CDROM, MediaType.CDROMXA,
|
||||
MediaType.CDRW, MediaType.CDV, MediaType.DVDDownload, MediaType.DVDPR, MediaType.DVDPRDL, MediaType.DVDPRW,
|
||||
MediaType.DVDPRWDL, MediaType.DVDR, MediaType.DVDRAM, MediaType.DVDRDL, MediaType.DVDROM, MediaType.DVDRW,
|
||||
MediaType.DVDRWDL, MediaType.EVD, MediaType.FDDVD, MediaType.DTSCD, MediaType.FVD, MediaType.HDDVDR,
|
||||
MediaType.HDDVDRAM, MediaType.HDDVDRDL, MediaType.HDDVDROM, MediaType.HDDVDRW, MediaType.HDDVDRWDL,
|
||||
MediaType.HDVMD, MediaType.HVD, MediaType.JaguarCD, MediaType.MEGACD, MediaType.PS1CD, MediaType.PS2CD,
|
||||
MediaType.PS2DVD, MediaType.PS3BD, MediaType.PS3DVD, MediaType.PS4BD, MediaType.PS5BD,
|
||||
MediaType.SuperCDROM2, MediaType.SVCD, MediaType.SVOD, MediaType.SATURNCD, MediaType.ThreeDO, MediaType.UDO,
|
||||
MediaType.UDO2, MediaType.UDO2_WORM, MediaType.UMD, MediaType.VCD, MediaType.VCDHD, MediaType.NeoGeoCD,
|
||||
MediaType.PCFX, MediaType.CDTV, MediaType.CD32, MediaType.Nuon, MediaType.Playdia, MediaType.Pippin,
|
||||
MediaType.FMTOWNS, MediaType.MilCD, MediaType.VideoNow, MediaType.VideoNowColor, MediaType.VideoNowXp,
|
||||
MediaType.CVD, MediaType.PCD
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".mds"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".mds"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,15 +67,15 @@ public sealed partial class Anex86
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
// TODO: Test with real hardware to see real supported media
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.IBM23FD, MediaType.ECMA_66, MediaType.DOS_525_SS_DD_8, MediaType.DOS_525_SS_DD_9,
|
||||
MediaType.ACORN_525_SS_SD_40, MediaType.ACORN_525_SS_DD_40, MediaType.ATARI_525_SD, MediaType.ATARI_525_DD,
|
||||
MediaType.ATARI_525_ED, MediaType.DOS_525_DS_DD_8, MediaType.DOS_525_DS_DD_9, MediaType.ECMA_70,
|
||||
@@ -85,20 +85,17 @@ public sealed partial class Anex86
|
||||
MediaType.ACORN_35_DS_DD, MediaType.DOS_35_DS_DD_8, MediaType.DOS_35_DS_DD_9, MediaType.ACORN_35_DS_HD,
|
||||
MediaType.DOS_525_HD, MediaType.ACORN_525_DS_DD, MediaType.DOS_35_HD, MediaType.XDF_525, MediaType.DMF,
|
||||
MediaType.XDF_35, MediaType.DOS_35_ED, MediaType.FDFORMAT_35_DD, MediaType.FDFORMAT_525_HD,
|
||||
MediaType.FDFORMAT_35_HD, MediaType.NEC_35_TD, MediaType.Unknown, MediaType.GENERIC_HDD, MediaType.FlashDrive,
|
||||
MediaType.CompactFlash, MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII,
|
||||
MediaType.PCCardTypeIII, MediaType.PCCardTypeIV, MediaType.MetaFloppy_Mod_I, MediaType.MetaFloppy_Mod_II
|
||||
};
|
||||
MediaType.FDFORMAT_35_HD, MediaType.NEC_35_TD, MediaType.Unknown, MediaType.GENERIC_HDD,
|
||||
MediaType.FlashDrive, MediaType.CompactFlash, MediaType.CompactFlashType2, MediaType.PCCardTypeI,
|
||||
MediaType.PCCardTypeII, MediaType.PCCardTypeIII, MediaType.PCCardTypeIV, MediaType.MetaFloppy_Mod_I,
|
||||
MediaType.MetaFloppy_Mod_II
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".fdi", ".hdi"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".fdi", ".hdi"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,29 +67,25 @@ public sealed partial class Apple2Mg
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.Apple32SS, MediaType.Apple33SS, MediaType.AppleSonySS, MediaType.AppleSonyDS, MediaType.DOS_35_HD,
|
||||
MediaType.Unknown, MediaType.GENERIC_HDD, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".2mg"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".2mg"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -69,26 +69,19 @@ public sealed partial class AppleDos
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.Apple33SS
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => [MediaType.Apple33SS];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".do", ".po"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".do", ".po"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,35 +67,32 @@ public sealed partial class Apridisk
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
// TODO: Test with real hardware to see real supported media
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.ACORN_35_DS_DD, MediaType.ACORN_35_DS_HD, MediaType.Apricot_35, MediaType.ATARI_35_DS_DD,
|
||||
MediaType.ATARI_35_DS_DD_11, MediaType.ATARI_35_SS_DD, MediaType.ATARI_35_SS_DD_11, MediaType.DMF,
|
||||
MediaType.DMF_82, MediaType.DOS_35_DS_DD_8, MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_ED, MediaType.DOS_35_HD,
|
||||
MediaType.DOS_35_SS_DD_8, MediaType.DOS_35_SS_DD_9, MediaType.DOS_525_DS_DD_8, MediaType.DOS_525_DS_DD_9,
|
||||
MediaType.DOS_525_HD, MediaType.DOS_525_SS_DD_8, MediaType.DOS_525_SS_DD_9, MediaType.FDFORMAT_35_DD,
|
||||
MediaType.FDFORMAT_35_HD, MediaType.FDFORMAT_525_DD, MediaType.FDFORMAT_525_HD, MediaType.RX50,
|
||||
MediaType.XDF_35, MediaType.XDF_525, MediaType.MetaFloppy_Mod_I, MediaType.MetaFloppy_Mod_II
|
||||
};
|
||||
MediaType.DMF_82, MediaType.DOS_35_DS_DD_8, MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_ED,
|
||||
MediaType.DOS_35_HD, MediaType.DOS_35_SS_DD_8, MediaType.DOS_35_SS_DD_9, MediaType.DOS_525_DS_DD_8,
|
||||
MediaType.DOS_525_DS_DD_9, MediaType.DOS_525_HD, MediaType.DOS_525_SS_DD_8, MediaType.DOS_525_SS_DD_9,
|
||||
MediaType.FDFORMAT_35_DD, MediaType.FDFORMAT_35_HD, MediaType.FDFORMAT_525_DD, MediaType.FDFORMAT_525_HD,
|
||||
MediaType.RX50, MediaType.XDF_35, MediaType.XDF_525, MediaType.MetaFloppy_Mod_I, MediaType.MetaFloppy_Mod_II
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => new[]
|
||||
{
|
||||
("compress", typeof(bool), Localization.Enable_Apridisk_compression, (object)false)
|
||||
};
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
[
|
||||
("compress", typeof(bool), Localization.Enable_Apridisk_compression, false)
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".dsk"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".dsk"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -69,31 +69,24 @@ public sealed partial class Blu
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => new[]
|
||||
{
|
||||
SectorTagType.AppleSonyTag
|
||||
};
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [SectorTagType.AppleSonyTag];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.AppleProfile, MediaType.AppleWidget, MediaType.PriamDataTower, MediaType.GENERIC_HDD,
|
||||
MediaType.Unknown, MediaType.FlashDrive, MediaType.CompactFlash, MediaType.CompactFlashType2,
|
||||
MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII, MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".blu"
|
||||
}; // Just invented
|
||||
public IEnumerable<string> KnownExtensions => [".blu"]; // Just invented
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -407,10 +407,8 @@ public sealed partial class BlindWrite4
|
||||
if(_dataFilter != null) break;
|
||||
|
||||
_dataFilter = PluginRegister.Singleton.GetFilter(Path.Combine(imageFilter.ParentFolder,
|
||||
_header.DataFile.Split(new[]
|
||||
{
|
||||
'\\'
|
||||
},
|
||||
_header.DataFile
|
||||
.Split(['\\'],
|
||||
StringSplitOptions
|
||||
.RemoveEmptyEntries)
|
||||
.Last()));
|
||||
@@ -418,10 +416,8 @@ public sealed partial class BlindWrite4
|
||||
if(_dataFilter != null) break;
|
||||
|
||||
_dataFilter = PluginRegister.Singleton.GetFilter(Path.Combine(imageFilter.ParentFolder,
|
||||
_header.DataFile.Split(new[]
|
||||
{
|
||||
'\\'
|
||||
},
|
||||
_header.DataFile
|
||||
.Split(['\\'],
|
||||
StringSplitOptions
|
||||
.RemoveEmptyEntries)
|
||||
.Last()
|
||||
@@ -430,10 +426,8 @@ public sealed partial class BlindWrite4
|
||||
if(_dataFilter != null) break;
|
||||
|
||||
_dataFilter = PluginRegister.Singleton.GetFilter(Path.Combine(imageFilter.ParentFolder,
|
||||
_header.DataFile.Split(new[]
|
||||
{
|
||||
'\\'
|
||||
},
|
||||
_header.DataFile
|
||||
.Split(['\\'],
|
||||
StringSplitOptions
|
||||
.RemoveEmptyEntries)
|
||||
.Last()
|
||||
@@ -465,25 +459,20 @@ public sealed partial class BlindWrite4
|
||||
_header.SubchannelFile
|
||||
.ToUpper(CultureInfo.CurrentCulture)))) ??
|
||||
PluginRegister.Singleton.GetFilter(Path.Combine(imageFilter.ParentFolder,
|
||||
_header.SubchannelFile.Split(new[]
|
||||
{
|
||||
'\\'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries)
|
||||
_header.SubchannelFile
|
||||
.Split(['\\'],
|
||||
StringSplitOptions
|
||||
.RemoveEmptyEntries)
|
||||
.Last()))) ??
|
||||
PluginRegister.Singleton.GetFilter(Path.Combine(imageFilter.ParentFolder,
|
||||
_header.SubchannelFile.Split(new[]
|
||||
{
|
||||
'\\'
|
||||
},
|
||||
_header.SubchannelFile
|
||||
.Split(['\\'],
|
||||
StringSplitOptions.RemoveEmptyEntries)
|
||||
.Last()
|
||||
.ToLower(CultureInfo.CurrentCulture)))) ??
|
||||
PluginRegister.Singleton.GetFilter(Path.Combine(imageFilter.ParentFolder,
|
||||
_header.SubchannelFile.Split(new[]
|
||||
{
|
||||
'\\'
|
||||
},
|
||||
_header.SubchannelFile
|
||||
.Split(['\\'],
|
||||
StringSplitOptions.RemoveEmptyEntries)
|
||||
.Last()
|
||||
.ToUpper(CultureInfo.CurrentCulture)));
|
||||
@@ -532,10 +521,8 @@ public sealed partial class BlindWrite4
|
||||
if(track.Filter != null) break;
|
||||
|
||||
track.Filter = PluginRegister.Singleton.GetFilter(Path.Combine(imageFilter.ParentFolder,
|
||||
bwTrack.filename.Split(new[]
|
||||
{
|
||||
'\\'
|
||||
},
|
||||
bwTrack.filename
|
||||
.Split(['\\'],
|
||||
StringSplitOptions
|
||||
.RemoveEmptyEntries)
|
||||
.Last()));
|
||||
@@ -543,10 +530,8 @@ public sealed partial class BlindWrite4
|
||||
if(track.Filter != null) break;
|
||||
|
||||
track.Filter = PluginRegister.Singleton.GetFilter(Path.Combine(imageFilter.ParentFolder,
|
||||
bwTrack.filename.Split(new[]
|
||||
{
|
||||
'\\'
|
||||
},
|
||||
bwTrack.filename
|
||||
.Split(['\\'],
|
||||
StringSplitOptions
|
||||
.RemoveEmptyEntries)
|
||||
.Last()
|
||||
@@ -556,10 +541,8 @@ public sealed partial class BlindWrite4
|
||||
if(track.Filter != null) break;
|
||||
|
||||
track.Filter = PluginRegister.Singleton.GetFilter(Path.Combine(imageFilter.ParentFolder,
|
||||
bwTrack.filename.Split(new[]
|
||||
{
|
||||
'\\'
|
||||
},
|
||||
bwTrack.filename
|
||||
.Split(['\\'],
|
||||
StringSplitOptions
|
||||
.RemoveEmptyEntries)
|
||||
.Last()
|
||||
@@ -745,9 +728,8 @@ public sealed partial class BlindWrite4
|
||||
|
||||
// As long as subchannel is written for any track, it is present for all tracks
|
||||
if(Tracks.Any(static t => t.SubchannelType == TrackSubchannelType.Packed))
|
||||
{
|
||||
foreach(Track track in Tracks) track.SubchannelType = TrackSubchannelType.Packed;
|
||||
}
|
||||
foreach(Track track in Tracks)
|
||||
track.SubchannelType = TrackSubchannelType.Packed;
|
||||
|
||||
_imageInfo.MediaType = MediaType.CD;
|
||||
|
||||
|
||||
@@ -136,26 +136,19 @@ public partial class AtariLynx : IByteAddressableImage
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".lnx"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".lnx"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.AtariLynxCard
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => [MediaType.AtariLynxCard];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Create(string path, MediaType mediaType, Dictionary<string, string> options, ulong sectors,
|
||||
|
||||
@@ -146,26 +146,19 @@ public partial class GameBoy : IByteAddressableImage
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".gb", ".gbc", ".sgb"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".gb", ".gbc", ".sgb"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.GameBoyGamePak
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => [MediaType.GameBoyGamePak];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Create(string path, MediaType mediaType, Dictionary<string, string> options, ulong sectors,
|
||||
|
||||
@@ -126,26 +126,19 @@ public partial class GameBoyAdvance : IByteAddressableImage
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".gba"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".gba"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.GameBoyAdvanceGamePak
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => [MediaType.GameBoyAdvanceGamePak];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Create(string path, MediaType mediaType, Dictionary<string, string> options, ulong sectors,
|
||||
|
||||
@@ -229,26 +229,19 @@ public partial class MasterSystem : IByteAddressableImage
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".sms", ".gg"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".sms", ".gg"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.MasterSystemCartridge, MediaType.GameGearCartridge
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => [MediaType.MasterSystemCartridge, MediaType.GameGearCartridge];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Create(string path, MediaType mediaType, Dictionary<string, string> options, ulong sectors,
|
||||
|
||||
@@ -272,26 +272,19 @@ public class Nes : IByteAddressableImage
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".nes"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".nes"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.NESGamePak, MediaType.FamicomGamePak
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => [MediaType.NESGamePak, MediaType.FamicomGamePak];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Create(string path, MediaType mediaType, Dictionary<string, string> options, ulong sectors,
|
||||
|
||||
@@ -797,26 +797,19 @@ public partial class Nintendo64 : IByteAddressableImage
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".n64", ".v64", ".z64"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".n64", ".v64", ".z64"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.N64GamePak
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => [MediaType.N64GamePak];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Create(string path, MediaType mediaType, Dictionary<string, string> options, ulong sectors,
|
||||
|
||||
@@ -361,26 +361,22 @@ public partial class SegaMegaDrive : IByteAddressableImage
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".smd", ".md", ".32x"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".smd", ".md", ".32x"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType._32XCartridge, MediaType.MegaDriveCartridge, MediaType.SegaPicoCartridge
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Create(string path, MediaType mediaType, Dictionary<string, string> options, ulong sectors,
|
||||
|
||||
@@ -249,26 +249,19 @@ public class SuperNintendo : IByteAddressableImage
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".sfc"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".sfc"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.SNESGamePak, MediaType.SNESGamePakUS
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => [MediaType.SNESGamePak, MediaType.SNESGamePakUS];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Create(string path, MediaType mediaType, Dictionary<string, string> options, ulong sectors,
|
||||
|
||||
@@ -185,42 +185,37 @@ public sealed partial class Cdrdao
|
||||
|
||||
// TODO: Decode CD-Text to text
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => new[]
|
||||
{
|
||||
MediaTagType.CD_MCN
|
||||
};
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [MediaTagType.CD_MCN];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => new[]
|
||||
{
|
||||
SectorTagType.CdSectorEcc, SectorTagType.CdSectorEccP, SectorTagType.CdSectorEccQ, SectorTagType.CdSectorEdc,
|
||||
SectorTagType.CdSectorHeader, SectorTagType.CdSectorSubchannel, SectorTagType.CdSectorSubHeader,
|
||||
SectorTagType.CdSectorSync, SectorTagType.CdTrackFlags, SectorTagType.CdTrackIsrc
|
||||
};
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags =>
|
||||
[
|
||||
SectorTagType.CdSectorEcc, SectorTagType.CdSectorEccP, SectorTagType.CdSectorEccQ,
|
||||
SectorTagType.CdSectorEdc, SectorTagType.CdSectorHeader, SectorTagType.CdSectorSubchannel,
|
||||
SectorTagType.CdSectorSubHeader, SectorTagType.CdSectorSync, SectorTagType.CdTrackFlags,
|
||||
SectorTagType.CdTrackIsrc
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.CD, MediaType.CDDA, MediaType.CDEG, MediaType.CDG, MediaType.CDI, MediaType.CDMIDI, MediaType.CDMRW,
|
||||
MediaType.CDPLUS, MediaType.CDR, MediaType.CDROM, MediaType.CDROMXA, MediaType.CDRW, MediaType.CDV,
|
||||
MediaType.DDCD, MediaType.DDCDR, MediaType.DDCDRW, MediaType.MEGACD, MediaType.PS1CD, MediaType.PS2CD,
|
||||
MediaType.SuperCDROM2, MediaType.SVCD, MediaType.SATURNCD, MediaType.ThreeDO, MediaType.VCD, MediaType.VCDHD,
|
||||
MediaType.NeoGeoCD, MediaType.PCFX, MediaType.CDTV, MediaType.CD32, MediaType.Nuon, MediaType.Playdia,
|
||||
MediaType.Pippin, MediaType.FMTOWNS, MediaType.MilCD, MediaType.VideoNow, MediaType.VideoNowColor,
|
||||
MediaType.VideoNowXp, MediaType.CVD, MediaType.PCD
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.CD, MediaType.CDDA, MediaType.CDEG, MediaType.CDG, MediaType.CDI, MediaType.CDMIDI,
|
||||
MediaType.CDMRW, MediaType.CDPLUS, MediaType.CDR, MediaType.CDROM, MediaType.CDROMXA, MediaType.CDRW,
|
||||
MediaType.CDV, MediaType.DDCD, MediaType.DDCDR, MediaType.DDCDRW, MediaType.MEGACD, MediaType.PS1CD,
|
||||
MediaType.PS2CD, MediaType.SuperCDROM2, MediaType.SVCD, MediaType.SATURNCD, MediaType.ThreeDO,
|
||||
MediaType.VCD, MediaType.VCDHD, MediaType.NeoGeoCD, MediaType.PCFX, MediaType.CDTV, MediaType.CD32,
|
||||
MediaType.Nuon, MediaType.Playdia, MediaType.Pippin, MediaType.FMTOWNS, MediaType.MilCD, MediaType.VideoNow,
|
||||
MediaType.VideoNowColor, MediaType.VideoNowXp, MediaType.CVD, MediaType.PCD
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => new[]
|
||||
{
|
||||
("separate", typeof(bool), Localization.Write_each_track_to_a_separate_file, (object)false)
|
||||
};
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
[
|
||||
("separate", typeof(bool), Localization.Write_each_track_to_a_separate_file, false)
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".toc"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".toc"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -501,8 +501,9 @@ public sealed partial class Cdrdao
|
||||
}
|
||||
|
||||
if(_writingTracks != null && _writingStreams != null)
|
||||
foreach(FileStream oldTrack in _writingStreams.Select(static t => t.Value).Distinct())
|
||||
oldTrack.Close();
|
||||
{
|
||||
foreach(FileStream oldTrack in _writingStreams.Select(static t => t.Value).Distinct()) oldTrack.Close();
|
||||
}
|
||||
|
||||
ulong currentOffset = 0;
|
||||
_writingTracks = [];
|
||||
@@ -598,11 +599,7 @@ public sealed partial class Cdrdao
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(_discimage.Comment))
|
||||
{
|
||||
string[] commentLines = _discimage.Comment.Split(new[]
|
||||
{
|
||||
'\n'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] commentLines = _discimage.Comment.Split(['\n'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach(string line in commentLines) _descriptorStream.WriteLine("// {0}", line);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public sealed partial class CdrWin
|
||||
|
||||
ulong previousStartSector = 0;
|
||||
const ulong gdRomSession2Offset = 45000;
|
||||
string previousTrackFile = "";
|
||||
var previousTrackFile = "";
|
||||
|
||||
foreach(CdrWinTrack cdrTrack in _discImage.Tracks)
|
||||
{
|
||||
@@ -178,49 +178,43 @@ public sealed partial class CdrWin
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => new[]
|
||||
{
|
||||
MediaTagType.CD_MCN, MediaTagType.CD_TEXT
|
||||
};
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [MediaTagType.CD_MCN, MediaTagType.CD_TEXT];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => new[]
|
||||
{
|
||||
SectorTagType.CdSectorEcc, SectorTagType.CdSectorEccP, SectorTagType.CdSectorEccQ, SectorTagType.CdSectorEdc,
|
||||
SectorTagType.CdSectorHeader, SectorTagType.CdSectorSubHeader, SectorTagType.CdSectorSync,
|
||||
SectorTagType.CdTrackFlags, SectorTagType.CdTrackIsrc
|
||||
};
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags =>
|
||||
[
|
||||
SectorTagType.CdSectorEcc, SectorTagType.CdSectorEccP, SectorTagType.CdSectorEccQ,
|
||||
SectorTagType.CdSectorEdc, SectorTagType.CdSectorHeader, SectorTagType.CdSectorSubHeader,
|
||||
SectorTagType.CdSectorSync, SectorTagType.CdTrackFlags, SectorTagType.CdTrackIsrc
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.BDR, MediaType.BDRE, MediaType.BDREXL, MediaType.BDROM, MediaType.UHDBD, MediaType.BDRXL,
|
||||
MediaType.CBHD, MediaType.CD, MediaType.CDDA, MediaType.CDEG, MediaType.CDG, MediaType.CDI, MediaType.CDMIDI,
|
||||
MediaType.CDMRW, MediaType.CDPLUS, MediaType.CDR, MediaType.CDROM, MediaType.CDROMXA, MediaType.CDRW,
|
||||
MediaType.CDV, MediaType.DDCD, MediaType.DDCDR, MediaType.DDCDRW, MediaType.DVDDownload, MediaType.DVDPR,
|
||||
MediaType.DVDPRDL, MediaType.DVDPRW, MediaType.DVDPRWDL, MediaType.DVDR, MediaType.DVDRAM, MediaType.DVDRDL,
|
||||
MediaType.DVDROM, MediaType.DVDRW, MediaType.DVDRWDL, MediaType.EVD, MediaType.FDDVD, MediaType.DTSCD,
|
||||
MediaType.FVD, MediaType.HDDVDR, MediaType.HDDVDRAM, MediaType.HDDVDRDL, MediaType.HDDVDROM, MediaType.HDDVDRW,
|
||||
MediaType.HDDVDRWDL, MediaType.HDVMD, MediaType.HVD, MediaType.JaguarCD, MediaType.MEGACD, MediaType.PS1CD,
|
||||
MediaType.PS2CD, MediaType.PS2DVD, MediaType.PS3BD, MediaType.PS3DVD, MediaType.PS4BD, MediaType.PS5BD,
|
||||
MediaType.SuperCDROM2, MediaType.SVCD, MediaType.SVOD, MediaType.SATURNCD, MediaType.ThreeDO, MediaType.UDO,
|
||||
MediaType.UDO2, MediaType.UDO2_WORM, MediaType.UMD, MediaType.VCD, MediaType.VCDHD, MediaType.NeoGeoCD,
|
||||
MediaType.PCFX, MediaType.CDTV, MediaType.CD32, MediaType.Nuon, MediaType.Playdia, MediaType.Pippin,
|
||||
MediaType.FMTOWNS, MediaType.MilCD, MediaType.VideoNow, MediaType.VideoNowColor, MediaType.VideoNowXp,
|
||||
MediaType.CVD, MediaType.PCD
|
||||
};
|
||||
MediaType.CBHD, MediaType.CD, MediaType.CDDA, MediaType.CDEG, MediaType.CDG, MediaType.CDI,
|
||||
MediaType.CDMIDI, MediaType.CDMRW, MediaType.CDPLUS, MediaType.CDR, MediaType.CDROM, MediaType.CDROMXA,
|
||||
MediaType.CDRW, MediaType.CDV, MediaType.DDCD, MediaType.DDCDR, MediaType.DDCDRW, MediaType.DVDDownload,
|
||||
MediaType.DVDPR, MediaType.DVDPRDL, MediaType.DVDPRW, MediaType.DVDPRWDL, MediaType.DVDR, MediaType.DVDRAM,
|
||||
MediaType.DVDRDL, MediaType.DVDROM, MediaType.DVDRW, MediaType.DVDRWDL, MediaType.EVD, MediaType.FDDVD,
|
||||
MediaType.DTSCD, MediaType.FVD, MediaType.HDDVDR, MediaType.HDDVDRAM, MediaType.HDDVDRDL,
|
||||
MediaType.HDDVDROM, MediaType.HDDVDRW, MediaType.HDDVDRWDL, MediaType.HDVMD, MediaType.HVD,
|
||||
MediaType.JaguarCD, MediaType.MEGACD, MediaType.PS1CD, MediaType.PS2CD, MediaType.PS2DVD, MediaType.PS3BD,
|
||||
MediaType.PS3DVD, MediaType.PS4BD, MediaType.PS5BD, MediaType.SuperCDROM2, MediaType.SVCD, MediaType.SVOD,
|
||||
MediaType.SATURNCD, MediaType.ThreeDO, MediaType.UDO, MediaType.UDO2, MediaType.UDO2_WORM, MediaType.UMD,
|
||||
MediaType.VCD, MediaType.VCDHD, MediaType.NeoGeoCD, MediaType.PCFX, MediaType.CDTV, MediaType.CD32,
|
||||
MediaType.Nuon, MediaType.Playdia, MediaType.Pippin, MediaType.FMTOWNS, MediaType.MilCD, MediaType.VideoNow,
|
||||
MediaType.VideoNowColor, MediaType.VideoNowXp, MediaType.CVD, MediaType.PCD
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => new[]
|
||||
{
|
||||
("separate", typeof(bool), Localization.Write_each_track_to_a_separate_file, (object)false)
|
||||
};
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
[
|
||||
("separate", typeof(bool), Localization.Write_each_track_to_a_separate_file, false)
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".cue"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".cue"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -436,8 +436,9 @@ public sealed partial class CdrWin
|
||||
}
|
||||
|
||||
if(_writingTracks != null && _writingStreams != null)
|
||||
foreach(FileStream oldTrack in _writingStreams.Select(static t => t.Value).Distinct())
|
||||
oldTrack.Close();
|
||||
{
|
||||
foreach(FileStream oldTrack in _writingStreams.Select(static t => t.Value).Distinct()) oldTrack.Close();
|
||||
}
|
||||
|
||||
_writingTracks = [];
|
||||
|
||||
@@ -505,11 +506,7 @@ public sealed partial class CdrWin
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(_discImage.Comment))
|
||||
{
|
||||
string[] commentLines = _discImage.Comment.Split(new[]
|
||||
{
|
||||
'\n'
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] commentLines = _discImage.Comment.Split(['\n'], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach(string line in commentLines) _descriptorStream.WriteLine("REM {0}", line);
|
||||
}
|
||||
|
||||
@@ -67,28 +67,24 @@ public sealed partial class CisCopy
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
// TODO: Test with real hardware to see real supported media
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_HD, MediaType.DOS_525_DS_DD_8, MediaType.DOS_525_DS_DD_9,
|
||||
MediaType.DOS_525_HD, MediaType.DOS_525_SS_DD_8, MediaType.DOS_525_SS_DD_9
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".dcf"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".dcf"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -93,40 +93,33 @@ public sealed partial class CloneCd
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => new[]
|
||||
{
|
||||
MediaTagType.CD_MCN, MediaTagType.CD_FullTOC
|
||||
};
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [MediaTagType.CD_MCN, MediaTagType.CD_FullTOC];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => new[]
|
||||
{
|
||||
SectorTagType.CdSectorEcc, SectorTagType.CdSectorEccP, SectorTagType.CdSectorEccQ, SectorTagType.CdSectorEdc,
|
||||
SectorTagType.CdSectorHeader, SectorTagType.CdSectorSubHeader, SectorTagType.CdSectorSync,
|
||||
SectorTagType.CdTrackFlags, SectorTagType.CdSectorSubchannel
|
||||
};
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags =>
|
||||
[
|
||||
SectorTagType.CdSectorEcc, SectorTagType.CdSectorEccP, SectorTagType.CdSectorEccQ,
|
||||
SectorTagType.CdSectorEdc, SectorTagType.CdSectorHeader, SectorTagType.CdSectorSubHeader,
|
||||
SectorTagType.CdSectorSync, SectorTagType.CdTrackFlags, SectorTagType.CdSectorSubchannel
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.CD, MediaType.CDDA, MediaType.CDEG, MediaType.CDG, MediaType.CDI, MediaType.CDMIDI, MediaType.CDMRW,
|
||||
MediaType.CDPLUS, MediaType.CDR, MediaType.CDROM, MediaType.CDROMXA, MediaType.CDRW, MediaType.CDV,
|
||||
MediaType.DTSCD, MediaType.JaguarCD, MediaType.MEGACD, MediaType.PS1CD, MediaType.PS2CD, MediaType.SuperCDROM2,
|
||||
MediaType.SVCD, MediaType.SATURNCD, MediaType.ThreeDO, MediaType.VCD, MediaType.VCDHD, MediaType.NeoGeoCD,
|
||||
MediaType.PCFX, MediaType.CDTV, MediaType.CD32, MediaType.Nuon, MediaType.Playdia, MediaType.Pippin,
|
||||
MediaType.FMTOWNS, MediaType.MilCD, MediaType.VideoNow, MediaType.VideoNowColor, MediaType.VideoNowXp,
|
||||
MediaType.CVD, MediaType.PCD
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.CD, MediaType.CDDA, MediaType.CDEG, MediaType.CDG, MediaType.CDI, MediaType.CDMIDI,
|
||||
MediaType.CDMRW, MediaType.CDPLUS, MediaType.CDR, MediaType.CDROM, MediaType.CDROMXA, MediaType.CDRW,
|
||||
MediaType.CDV, MediaType.DTSCD, MediaType.JaguarCD, MediaType.MEGACD, MediaType.PS1CD, MediaType.PS2CD,
|
||||
MediaType.SuperCDROM2, MediaType.SVCD, MediaType.SATURNCD, MediaType.ThreeDO, MediaType.VCD,
|
||||
MediaType.VCDHD, MediaType.NeoGeoCD, MediaType.PCFX, MediaType.CDTV, MediaType.CD32, MediaType.Nuon,
|
||||
MediaType.Playdia, MediaType.Pippin, MediaType.FMTOWNS, MediaType.MilCD, MediaType.VideoNow,
|
||||
MediaType.VideoNowColor, MediaType.VideoNowXp, MediaType.CVD, MediaType.PCD
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".ccd"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".ccd"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -226,11 +226,7 @@ public sealed partial class CloneCd
|
||||
AaruLogging.Debug(MODULE_NAME, Localization.Found_CD_Text_Entry_at_line_0, lineNumber);
|
||||
|
||||
string[] bytes = cdtEntMatch.Groups["value"]
|
||||
.Value.Split(new[]
|
||||
{
|
||||
' '
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
.Value.Split([' '], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach(string byt in bytes) cdtMs.WriteByte(Convert.ToByte(byt, 16));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
|
||||
@@ -16,8 +14,8 @@ public sealed partial class CopyTape : IWritableTapeImage
|
||||
|
||||
public CopyTape() => _imageInfo = new ImageInfo
|
||||
{
|
||||
ReadableSectorTags = new List<SectorTagType>(),
|
||||
ReadableMediaTags = new List<MediaTagType>(),
|
||||
ReadableSectorTags = [],
|
||||
ReadableMediaTags = [],
|
||||
HasPartitions = true,
|
||||
HasSessions = true,
|
||||
Version = null,
|
||||
|
||||
@@ -78,49 +78,46 @@ public sealed partial class CopyTape
|
||||
public bool IsTape { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.UnknownTape, MediaType.ADR2120, MediaType.ADR260, MediaType.ADR30, MediaType.ADR50, MediaType.AIT1,
|
||||
MediaType.AIT1Turbo, MediaType.AIT2, MediaType.AIT2Turbo, MediaType.AIT3, MediaType.AIT3Ex, MediaType.AIT3Turbo,
|
||||
MediaType.AIT4, MediaType.AIT5, MediaType.AITETurbo, MediaType.SAIT1, MediaType.SAIT2, MediaType.Ditto,
|
||||
MediaType.DittoMax, MediaType.DigitalAudioTape, MediaType.DAT160, MediaType.DAT320, MediaType.DAT72,
|
||||
MediaType.DDS1, MediaType.DDS2, MediaType.DDS3, MediaType.DDS4, MediaType.CompactTapeI, MediaType.CompactTapeII,
|
||||
MediaType.DECtapeII, MediaType.DLTtapeIII, MediaType.DLTtapeIIIxt, MediaType.DLTtapeIV, MediaType.DLTtapeS4,
|
||||
MediaType.SDLT1, MediaType.SDLT2, MediaType.VStapeI, MediaType.Exatape15m, MediaType.Exatape22m,
|
||||
MediaType.Exatape22mAME, MediaType.Exatape28m, MediaType.Exatape40m, MediaType.Exatape45m, MediaType.Exatape54m,
|
||||
MediaType.Exatape75m, MediaType.Exatape76m, MediaType.Exatape80m, MediaType.Exatape106m,
|
||||
MediaType.Exatape160mXL, MediaType.Exatape112m, MediaType.Exatape125m, MediaType.Exatape150m,
|
||||
MediaType.Exatape170m, MediaType.Exatape225m, MediaType.IBM3470, MediaType.IBM3480, MediaType.IBM3490,
|
||||
MediaType.IBM3490E, MediaType.IBM3592, MediaType.LTO, MediaType.LTO2, MediaType.LTO3, MediaType.LTO3WORM,
|
||||
MediaType.LTO4, MediaType.LTO4WORM, MediaType.LTO5, MediaType.LTO5WORM, MediaType.LTO6, MediaType.LTO6WORM,
|
||||
MediaType.LTO7, MediaType.LTO7WORM, MediaType.MLR1, MediaType.MLR1SL, MediaType.MLR3, MediaType.SLR1,
|
||||
MediaType.SLR2, MediaType.SLR3, MediaType.SLR32, MediaType.SLR32SL, MediaType.SLR4, MediaType.SLR5,
|
||||
MediaType.SLR5SL, MediaType.SLR6, MediaType.SLRtape7, MediaType.SLRtape7SL, MediaType.SLRtape24,
|
||||
MediaType.SLRtape24SL, MediaType.SLRtape40, MediaType.SLRtape50, MediaType.SLRtape60, MediaType.SLRtape75,
|
||||
MediaType.SLRtape100, MediaType.SLRtape140, MediaType.QIC11, MediaType.QIC120, MediaType.QIC1350,
|
||||
MediaType.QIC150, MediaType.QIC24, MediaType.QIC3010, MediaType.QIC3020, MediaType.QIC3080, MediaType.QIC3095,
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.UnknownTape, MediaType.ADR2120, MediaType.ADR260, MediaType.ADR30, MediaType.ADR50,
|
||||
MediaType.AIT1, MediaType.AIT1Turbo, MediaType.AIT2, MediaType.AIT2Turbo, MediaType.AIT3, MediaType.AIT3Ex,
|
||||
MediaType.AIT3Turbo, MediaType.AIT4, MediaType.AIT5, MediaType.AITETurbo, MediaType.SAIT1, MediaType.SAIT2,
|
||||
MediaType.Ditto, MediaType.DittoMax, MediaType.DigitalAudioTape, MediaType.DAT160, MediaType.DAT320,
|
||||
MediaType.DAT72, MediaType.DDS1, MediaType.DDS2, MediaType.DDS3, MediaType.DDS4, MediaType.CompactTapeI,
|
||||
MediaType.CompactTapeII, MediaType.DECtapeII, MediaType.DLTtapeIII, MediaType.DLTtapeIIIxt,
|
||||
MediaType.DLTtapeIV, MediaType.DLTtapeS4, MediaType.SDLT1, MediaType.SDLT2, MediaType.VStapeI,
|
||||
MediaType.Exatape15m, MediaType.Exatape22m, MediaType.Exatape22mAME, MediaType.Exatape28m,
|
||||
MediaType.Exatape40m, MediaType.Exatape45m, MediaType.Exatape54m, MediaType.Exatape75m,
|
||||
MediaType.Exatape76m, MediaType.Exatape80m, MediaType.Exatape106m, MediaType.Exatape160mXL,
|
||||
MediaType.Exatape112m, MediaType.Exatape125m, MediaType.Exatape150m, MediaType.Exatape170m,
|
||||
MediaType.Exatape225m, MediaType.IBM3470, MediaType.IBM3480, MediaType.IBM3490, MediaType.IBM3490E,
|
||||
MediaType.IBM3592, MediaType.LTO, MediaType.LTO2, MediaType.LTO3, MediaType.LTO3WORM, MediaType.LTO4,
|
||||
MediaType.LTO4WORM, MediaType.LTO5, MediaType.LTO5WORM, MediaType.LTO6, MediaType.LTO6WORM, MediaType.LTO7,
|
||||
MediaType.LTO7WORM, MediaType.MLR1, MediaType.MLR1SL, MediaType.MLR3, MediaType.SLR1, MediaType.SLR2,
|
||||
MediaType.SLR3, MediaType.SLR32, MediaType.SLR32SL, MediaType.SLR4, MediaType.SLR5, MediaType.SLR5SL,
|
||||
MediaType.SLR6, MediaType.SLRtape7, MediaType.SLRtape7SL, MediaType.SLRtape24, MediaType.SLRtape24SL,
|
||||
MediaType.SLRtape40, MediaType.SLRtape50, MediaType.SLRtape60, MediaType.SLRtape75, MediaType.SLRtape100,
|
||||
MediaType.SLRtape140, MediaType.QIC11, MediaType.QIC120, MediaType.QIC1350, MediaType.QIC150,
|
||||
MediaType.QIC24, MediaType.QIC3010, MediaType.QIC3020, MediaType.QIC3080, MediaType.QIC3095,
|
||||
MediaType.QIC320, MediaType.QIC40, MediaType.QIC525, MediaType.QIC80, MediaType.STK4480, MediaType.STK4490,
|
||||
MediaType.STK9490, MediaType.T9840A, MediaType.T9840B, MediaType.T9840C, MediaType.T9840D, MediaType.T9940A,
|
||||
MediaType.T9940B, MediaType.T10000A, MediaType.T10000B, MediaType.T10000C, MediaType.T10000D, MediaType.Travan,
|
||||
MediaType.Travan1Ex, MediaType.Travan3, MediaType.Travan3Ex, MediaType.Travan4, MediaType.Travan5,
|
||||
MediaType.Travan7, MediaType.VXA1, MediaType.VXA2, MediaType.VXA3
|
||||
};
|
||||
MediaType.T9940B, MediaType.T10000A, MediaType.T10000B, MediaType.T10000C, MediaType.T10000D,
|
||||
MediaType.Travan, MediaType.Travan1Ex, MediaType.Travan3, MediaType.Travan3Ex, MediaType.Travan4,
|
||||
MediaType.Travan5, MediaType.Travan7, MediaType.VXA1, MediaType.VXA2, MediaType.VXA3
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".cptp"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".cptp"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -65,32 +65,26 @@ public sealed partial class DiskCopy42
|
||||
public string Format => Localization.DiskCopy42_Name;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => new[]
|
||||
{
|
||||
SectorTagType.AppleSonyTag
|
||||
};
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [SectorTagType.AppleSonyTag];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.AppleFileWare, MediaType.AppleHD20, MediaType.AppleProfile, MediaType.AppleSonyDS,
|
||||
MediaType.AppleSonySS, MediaType.AppleWidget, MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_HD, MediaType.DMF
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => new[]
|
||||
{
|
||||
("macosx", typeof(bool), Localization.Use_Mac_OS_X_format_byte, (object)false)
|
||||
};
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
[
|
||||
("macosx", typeof(bool), Localization.Use_Mac_OS_X_format_byte, false)
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".dc42", ".diskcopy42", ".image"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".dc42", ".diskcopy42", ".image"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,33 +67,29 @@ public sealed partial class DriDiskCopy
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
// TODO: Test with real hardware to see real supported media
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.ACORN_35_DS_DD, MediaType.ACORN_35_DS_HD, MediaType.Apricot_35, MediaType.ATARI_35_DS_DD,
|
||||
MediaType.ATARI_35_DS_DD_11, MediaType.ATARI_35_SS_DD, MediaType.ATARI_35_SS_DD_11, MediaType.DMF,
|
||||
MediaType.DMF_82, MediaType.DOS_35_DS_DD_8, MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_ED, MediaType.DOS_35_HD,
|
||||
MediaType.DOS_35_SS_DD_8, MediaType.DOS_35_SS_DD_9, MediaType.DOS_525_DS_DD_8, MediaType.DOS_525_DS_DD_9,
|
||||
MediaType.DOS_525_HD, MediaType.DOS_525_SS_DD_8, MediaType.DOS_525_SS_DD_9, MediaType.FDFORMAT_35_DD,
|
||||
MediaType.FDFORMAT_35_HD, MediaType.FDFORMAT_525_DD, MediaType.FDFORMAT_525_HD, MediaType.RX50,
|
||||
MediaType.XDF_35, MediaType.XDF_525, MediaType.MetaFloppy_Mod_I, MediaType.MetaFloppy_Mod_II
|
||||
};
|
||||
MediaType.DMF_82, MediaType.DOS_35_DS_DD_8, MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_ED,
|
||||
MediaType.DOS_35_HD, MediaType.DOS_35_SS_DD_8, MediaType.DOS_35_SS_DD_9, MediaType.DOS_525_DS_DD_8,
|
||||
MediaType.DOS_525_DS_DD_9, MediaType.DOS_525_HD, MediaType.DOS_525_SS_DD_8, MediaType.DOS_525_SS_DD_9,
|
||||
MediaType.FDFORMAT_35_DD, MediaType.FDFORMAT_35_HD, MediaType.FDFORMAT_525_DD, MediaType.FDFORMAT_525_HD,
|
||||
MediaType.RX50, MediaType.XDF_35, MediaType.XDF_525, MediaType.MetaFloppy_Mod_I, MediaType.MetaFloppy_Mod_II
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".dsk"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".dsk"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -166,11 +166,7 @@ public sealed partial class KryoFlux
|
||||
trackStream.EnsureRead(kfinfo, 0, oobBlk.length);
|
||||
string kfinfoStr = StringHandlers.CToString(kfinfo);
|
||||
|
||||
string[] lines = kfinfoStr.Split(new[]
|
||||
{
|
||||
','
|
||||
},
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] lines = kfinfoStr.Split([','], StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
DateTime blockDate = DateTime.Now;
|
||||
DateTime blockTime = DateTime.Now;
|
||||
|
||||
@@ -67,15 +67,15 @@ public sealed partial class MaxiDisk
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
// TODO: Test with real hardware to see real supported media
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.Apricot_35, MediaType.ATARI_35_DS_DD, MediaType.ATARI_35_DS_DD_11, MediaType.ATARI_35_SS_DD,
|
||||
MediaType.ATARI_35_SS_DD_11, MediaType.DMF, MediaType.DMF_82, MediaType.DOS_35_DS_DD_8,
|
||||
MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_ED, MediaType.DOS_35_HD, MediaType.DOS_35_SS_DD_8,
|
||||
@@ -83,17 +83,13 @@ public sealed partial class MaxiDisk
|
||||
MediaType.DOS_525_SS_DD_8, MediaType.DOS_525_SS_DD_9, MediaType.FDFORMAT_35_DD, MediaType.FDFORMAT_35_HD,
|
||||
MediaType.FDFORMAT_525_DD, MediaType.FDFORMAT_525_HD, MediaType.RX50, MediaType.XDF_35, MediaType.XDF_525,
|
||||
MediaType.MetaFloppy_Mod_I, MediaType.MetaFloppy_Mod_II
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".hdk"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".hdk"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,27 +67,20 @@ public sealed partial class Nhdr0
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
MediaType.GENERIC_HDD, MediaType.Unknown
|
||||
};
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => [MediaType.GENERIC_HDD, MediaType.Unknown];
|
||||
|
||||
// TODO: Support dynamic images
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".nhd"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".nhd"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,29 +67,25 @@ public sealed partial class Parallels
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.Unknown, MediaType.GENERIC_HDD, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
// TODO: Add cluster size option
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".hdd"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".hdd"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,28 +67,24 @@ public sealed partial class Qcow
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.Unknown, MediaType.GENERIC_HDD, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".qcow", ".qc"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".qcow", ".qc"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,28 +67,24 @@ public sealed partial class Qcow2
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.Unknown, MediaType.GENERIC_HDD, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".qcow2", ".qc2", ".qcow3", ".qc3"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".qcow2", ".qc2", ".qcow3", ".qc3"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,29 +67,25 @@ public sealed partial class Qed
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.Unknown, MediaType.GENERIC_HDD, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
// TODO: Add cluster size option
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".qed"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".qed"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,15 +67,15 @@ public sealed partial class RayDim
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
// TODO: Test with real hardware to see real supported media
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.Apricot_35, MediaType.ATARI_35_DS_DD, MediaType.ATARI_35_DS_DD_11, MediaType.ATARI_35_SS_DD,
|
||||
MediaType.ATARI_35_SS_DD_11, MediaType.DMF, MediaType.DMF_82, MediaType.DOS_35_DS_DD_8,
|
||||
MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_ED, MediaType.DOS_35_HD, MediaType.DOS_35_SS_DD_8,
|
||||
@@ -83,17 +83,13 @@ public sealed partial class RayDim
|
||||
MediaType.DOS_525_SS_DD_8, MediaType.DOS_525_SS_DD_9, MediaType.FDFORMAT_35_DD, MediaType.FDFORMAT_35_HD,
|
||||
MediaType.FDFORMAT_525_DD, MediaType.FDFORMAT_525_HD, MediaType.RX50, MediaType.XDF_35, MediaType.XDF_525,
|
||||
MediaType.MetaFloppy_Mod_I, MediaType.MetaFloppy_Mod_II
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".dim"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".dim"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,31 +67,24 @@ public sealed partial class RsIde
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => new[]
|
||||
{
|
||||
MediaTagType.ATA_IDENTIFY
|
||||
};
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [MediaTagType.ATA_IDENTIFY];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.GENERIC_HDD, MediaType.Unknown, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".ide"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".ide"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,33 +67,29 @@ public sealed partial class SaveDskF
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
// TODO: Test with real hardware to see real supported media
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.ACORN_35_DS_DD, MediaType.ACORN_35_DS_HD, MediaType.Apricot_35, MediaType.ATARI_35_DS_DD,
|
||||
MediaType.ATARI_35_DS_DD_11, MediaType.ATARI_35_SS_DD, MediaType.ATARI_35_SS_DD_11, MediaType.DMF,
|
||||
MediaType.DMF_82, MediaType.DOS_35_DS_DD_8, MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_ED, MediaType.DOS_35_HD,
|
||||
MediaType.DOS_35_SS_DD_8, MediaType.DOS_35_SS_DD_9, MediaType.DOS_525_DS_DD_8, MediaType.DOS_525_DS_DD_9,
|
||||
MediaType.DOS_525_HD, MediaType.DOS_525_SS_DD_8, MediaType.DOS_525_SS_DD_9, MediaType.FDFORMAT_35_DD,
|
||||
MediaType.FDFORMAT_35_HD, MediaType.FDFORMAT_525_DD, MediaType.FDFORMAT_525_HD, MediaType.RX50,
|
||||
MediaType.XDF_35, MediaType.XDF_525, MediaType.MetaFloppy_Mod_I, MediaType.MetaFloppy_Mod_II
|
||||
};
|
||||
MediaType.DMF_82, MediaType.DOS_35_DS_DD_8, MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_ED,
|
||||
MediaType.DOS_35_HD, MediaType.DOS_35_SS_DD_8, MediaType.DOS_35_SS_DD_9, MediaType.DOS_525_DS_DD_8,
|
||||
MediaType.DOS_525_DS_DD_9, MediaType.DOS_525_HD, MediaType.DOS_525_SS_DD_8, MediaType.DOS_525_SS_DD_9,
|
||||
MediaType.FDFORMAT_35_DD, MediaType.FDFORMAT_35_HD, MediaType.FDFORMAT_525_DD, MediaType.FDFORMAT_525_HD,
|
||||
MediaType.RX50, MediaType.XDF_35, MediaType.XDF_525, MediaType.MetaFloppy_Mod_I, MediaType.MetaFloppy_Mod_II
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".dsk"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".dsk"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -86,25 +86,21 @@ public sealed partial class SuperCardPro
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
// TODO: SCP supports a lot more formats, please add more whence tested.
|
||||
MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_HD, MediaType.DOS_525_DS_DD_9, MediaType.DOS_525_HD,
|
||||
MediaType.Unknown
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".scp"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".scp"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -69,28 +69,24 @@ public sealed partial class T98
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.GENERIC_HDD, MediaType.Unknown, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".t98"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".t98"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,28 +67,24 @@ public sealed partial class Udif
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.Unknown, MediaType.GENERIC_HDD, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".dmg"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".dmg"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,29 +67,25 @@ public sealed partial class Vdi
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.Unknown, MediaType.GENERIC_HDD, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
// TODO: Add cluster size option
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".vdi"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".vdi"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -73,31 +73,28 @@ public sealed partial class Vhd
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.GENERIC_HDD, MediaType.Unknown, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => new[]
|
||||
{
|
||||
("dynamic", typeof(bool), Localization.Create_a_dynamic_image, (object)true),
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
[
|
||||
("dynamic", typeof(bool), Localization.Create_a_dynamic_image, true),
|
||||
("block_size", typeof(uint), Localization.Vhd_Block_size_Must_be_a_power_of_2, 2097152)
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".vhd"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".vhd"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,33 +67,30 @@ public sealed partial class VMware
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.GENERIC_HDD, MediaType.Unknown, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => new[]
|
||||
{
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
[
|
||||
("adapter_type", typeof(string), Localization.Name_of_adapter_type, "ide"),
|
||||
("hwversion", typeof(uint), Localization.VDMK_hardware_version, 4),
|
||||
("sparse", typeof(bool), Localization.VMware_SupportedOptions_Use_sparse_extents, false),
|
||||
("split", typeof(bool), Localization.Split_data_file_at_2GiB, (object)false)
|
||||
};
|
||||
("split", typeof(bool), Localization.Split_data_file_at_2GiB, false)
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".vmdk"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".vmdk"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -67,28 +67,24 @@ public sealed partial class Virtual98
|
||||
public Metadata AaruMetadata => null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes => new[]
|
||||
{
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
[
|
||||
MediaType.GENERIC_HDD, MediaType.Unknown, MediaType.FlashDrive, MediaType.CompactFlash,
|
||||
MediaType.CompactFlashType2, MediaType.PCCardTypeI, MediaType.PCCardTypeII, MediaType.PCCardTypeIII,
|
||||
MediaType.PCCardTypeIV
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".v98"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions => [".v98"];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -174,7 +174,7 @@ public sealed partial class ZZZRawImage
|
||||
.ToArray();
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<MediaType> SupportedMediaTypes
|
||||
@@ -217,15 +217,14 @@ public sealed partial class ZZZRawImage
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description, object @default)>();
|
||||
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => [];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<string> KnownExtensions => new[]
|
||||
{
|
||||
".adf", ".adl", ".d81", ".dsk", ".hdf", ".ima", ".img", ".iso", ".ssd", ".st", ".1kn", ".2kn", ".4kn", ".8kn",
|
||||
".16kn", ".32kn", ".64kn", ".512e", ".512", ".128", ".256"
|
||||
};
|
||||
public IEnumerable<string> KnownExtensions =>
|
||||
[
|
||||
".adf", ".adl", ".d81", ".dsk", ".hdf", ".ima", ".img", ".iso", ".ssd", ".st", ".1kn", ".2kn", ".4kn",
|
||||
".8kn", ".16kn", ".32kn", ".64kn", ".512e", ".512", ".128", ".256"
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsWriting { get; private set; }
|
||||
|
||||
@@ -327,7 +327,7 @@ public abstract class BlockMediaImageTest : BaseMediaImageTest
|
||||
while(currentLevel.Count > 0)
|
||||
{
|
||||
currentDepth++;
|
||||
List<ReadOnlyFilesystemTest.NextLevel> nextLevels = new();
|
||||
List<ReadOnlyFilesystemTest.NextLevel> nextLevels = [];
|
||||
|
||||
foreach(ReadOnlyFilesystemTest.NextLevel subLevel in currentLevel)
|
||||
{
|
||||
|
||||
@@ -333,7 +333,7 @@ public abstract class OpticalMediaImageTest : BaseMediaImageTest
|
||||
while(currentLevel.Count > 0)
|
||||
{
|
||||
currentDepth++;
|
||||
List<ReadOnlyFilesystemTest.NextLevel> nextLevels = new();
|
||||
List<ReadOnlyFilesystemTest.NextLevel> nextLevels = [];
|
||||
|
||||
foreach(ReadOnlyFilesystemTest.NextLevel subLevel in currentLevel)
|
||||
{
|
||||
|
||||
@@ -188,11 +188,7 @@ public abstract class WritableOpticalMediaImageTest : BaseWritableMediaImageTest
|
||||
inputFormat.Info.MediaType,
|
||||
testFile));
|
||||
|
||||
bool useLong = inputFormat.Info.ReadableSectorTags.Except(new[]
|
||||
{
|
||||
SectorTagType.CdTrackFlags
|
||||
})
|
||||
.Any();
|
||||
bool useLong = inputFormat.Info.ReadableSectorTags.Except([SectorTagType.CdTrackFlags]).Any();
|
||||
|
||||
// TODO: Can be done with LINQ only
|
||||
foreach(SectorTagType unused in inputFormat.Info.ReadableSectorTags
|
||||
|
||||
Reference in New Issue
Block a user