Use Array.Empty

This commit is contained in:
2022-03-16 23:43:36 +00:00
parent ff65da6c48
commit d686e59cb7
41 changed files with 87 additions and 173 deletions

View File

@@ -66,8 +66,7 @@ public sealed partial class AppleDOS : IReadOnlyFilesystem
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
Array.Empty<(string name, Type type, string description)>();
/// <inheritdoc />
public Dictionary<string, string> Namespaces => null;

View File

@@ -76,8 +76,7 @@ public sealed partial class AppleMFS : IReadOnlyFilesystem
// TODO: Implement Finder namespace (requires decoding Desktop database)
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
Array.Empty<(string name, Type type, string description)>();
/// <inheritdoc />
public Dictionary<string, string> Namespaces => null;

View File

@@ -94,8 +94,7 @@ public sealed partial class CPM : IReadOnlyFilesystem
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
Array.Empty<(string name, Type type, string description)>();
/// <inheritdoc />
public Dictionary<string, string> Namespaces => null;

View File

@@ -80,8 +80,7 @@ public sealed partial class FAT : IReadOnlyFilesystem
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
Array.Empty<(string name, Type type, string description)>();
/// <inheritdoc />
public Dictionary<string, string> Namespaces => new()

View File

@@ -93,8 +93,7 @@ public sealed partial class XboxFatPlugin : IReadOnlyFilesystem
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
Array.Empty<(string name, Type type, string description)>();
/// <inheritdoc />
public Dictionary<string, string> Namespaces => null;

View File

@@ -66,8 +66,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 =>
new (string name, Type type, string description)[]
{};
Array.Empty<(string name, Type type, string description)>();
/// <inheritdoc />
public Dictionary<string, string> Namespaces => new()

View File

@@ -84,8 +84,7 @@ public sealed partial class OperaFS : IReadOnlyFilesystem
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
Array.Empty<(string name, Type type, string description)>();
/// <inheritdoc />
public Dictionary<string, string> Namespaces => null;

View File

@@ -86,8 +86,7 @@ public sealed partial class PascalPlugin : IReadOnlyFilesystem
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
new (string name, Type type, string description)[]
{};
Array.Empty<(string name, Type type, string description)>();
/// <inheritdoc />
public Dictionary<string, string> Namespaces => null;

View File

@@ -186,8 +186,7 @@ public sealed partial class Alcohol120
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -59,11 +59,9 @@ public sealed partial class Anex86
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
// TODO: Test with real hardware to see real supported media
/// <inheritdoc />
@@ -84,8 +82,7 @@ public sealed partial class Anex86
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -59,11 +59,9 @@ public sealed partial class Apple2Mg
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -74,8 +72,7 @@ public sealed partial class Apple2Mg
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -59,11 +59,9 @@ public sealed partial class AppleDos
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -71,8 +69,7 @@ public sealed partial class AppleDos
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -59,11 +59,9 @@ public sealed partial class Apridisk
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
// TODO: Test with real hardware to see real supported media
/// <inheritdoc />

View File

@@ -56,8 +56,7 @@ public sealed partial class Blu
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new[]
{
@@ -72,8 +71,7 @@ public sealed partial class Blu
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -56,11 +56,9 @@ public sealed partial class CisCopy
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
// TODO: Test with real hardware to see real supported media
/// <inheritdoc />
@@ -71,8 +69,7 @@ public sealed partial class CisCopy
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -100,8 +100,7 @@ public sealed partial class CloneCd
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -63,11 +63,9 @@ public sealed partial class CopyTape
public bool IsTape { get; set; }
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -98,8 +96,7 @@ public sealed partial class CopyTape
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -56,8 +56,7 @@ public sealed partial class DiskCopy42
/// <inheritdoc />
public string Format => "Apple DiskCopy 4.2";
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new[]
{

View File

@@ -57,11 +57,9 @@ public sealed partial class DriDiskCopy
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
// TODO: Test with real hardware to see real supported media
/// <inheritdoc />
@@ -77,8 +75,7 @@ public sealed partial class DriDiskCopy
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -56,11 +56,9 @@ public sealed partial class MaxiDisk
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
// TODO: Test with real hardware to see real supported media
/// <inheritdoc />
@@ -76,8 +74,7 @@ public sealed partial class MaxiDisk
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -56,11 +56,9 @@ public sealed partial class Nhdr0
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -70,8 +68,7 @@ public sealed partial class Nhdr0
// TODO: Support dynamic images
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -56,11 +56,9 @@ public sealed partial class Parallels
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -72,8 +70,7 @@ public sealed partial class Parallels
// TODO: Add cluster size option
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -57,11 +57,9 @@ public sealed partial class Qcow
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -71,8 +69,7 @@ public sealed partial class Qcow
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -57,11 +57,9 @@ public sealed partial class Qcow2
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -71,8 +69,7 @@ public sealed partial class Qcow2
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -58,11 +58,9 @@ public sealed partial class Qed
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -74,8 +72,7 @@ public sealed partial class Qed
// TODO: Add cluster size option
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -56,11 +56,9 @@ public sealed partial class RayDim
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
// TODO: Test with real hardware to see real supported media
/// <inheritdoc />
@@ -76,8 +74,7 @@ public sealed partial class RayDim
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -61,8 +61,7 @@ public sealed partial class RsIde
MediaTagType.ATA_IDENTIFY
};
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -72,8 +71,7 @@ public sealed partial class RsIde
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -56,11 +56,9 @@ public sealed partial class SaveDskF
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
// TODO: Test with real hardware to see real supported media
/// <inheritdoc />
@@ -76,8 +74,7 @@ public sealed partial class SaveDskF
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -56,11 +56,9 @@ public sealed partial class T98
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -70,8 +68,7 @@ public sealed partial class T98
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -57,11 +57,9 @@ public sealed partial class Udif
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -71,8 +69,7 @@ public sealed partial class Udif
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -57,11 +57,9 @@ public sealed partial class Vdi
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -73,8 +71,7 @@ public sealed partial class Vdi
// TODO: Add cluster size option
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -71,11 +71,9 @@ public sealed partial class Vhd
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -87,8 +85,7 @@ public sealed partial class Vhd
// TODO: Support dynamic images
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -57,11 +57,9 @@ public sealed partial class VMware
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{

View File

@@ -56,11 +56,9 @@ public sealed partial class Virtual98
/// <inheritdoc />
public CICMMetadataType CicmMetadata => null;
/// <inheritdoc />
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[]
{};
public IEnumerable<MediaTagType> SupportedMediaTags => Array.Empty<MediaTagType>();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes => new[]
{
@@ -70,8 +68,7 @@ public sealed partial class Virtual98
};
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -173,8 +173,7 @@ public sealed partial class ZZZRawImage
ToArray();
/// <inheritdoc />
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[]
{};
public IEnumerable<SectorTagType> SupportedSectorTags => Array.Empty<SectorTagType>();
/// <inheritdoc />
public IEnumerable<MediaType> SupportedMediaTypes
@@ -215,8 +214,7 @@ public sealed partial class ZZZRawImage
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions =>
new (string name, Type type, string description, object @default)[]
{};
Array.Empty<(string name, Type type, string description, object @default)>();
/// <inheritdoc />
public IEnumerable<string> KnownExtensions => new[]
{

View File

@@ -270,8 +270,7 @@ public abstract class BlockMediaImageTest : BaseMediaImageTest
Assert.IsNotNull(plugin, "Could not instantiate filesystem plugin");
var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.
Invoke(new object[]
{});
Invoke(Array.Empty<object>());
Assert.IsNotNull(fs, $"Could not instantiate filesystem {pluginName} in {testFile}");

View File

@@ -119,8 +119,7 @@ public abstract class FsExtractHashIssueTest
Assert.IsNotNull(plugin, "Could not instantiate filesystem plugin");
var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
{});
var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(Array.Empty<object>());
Assert.IsNotNull(fs, $"Could not instantiate filesystem {pluginName}");

View File

@@ -85,8 +85,7 @@ public abstract class FsExtractIssueTest
Assert.IsNotNull(plugin, "Could not instantiate filesystem plugin");
var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.
Invoke(new object[]
{});
Invoke(Array.Empty<object>());
Assert.IsNotNull(fs, $"Could not instantiate filesystem {pluginName}");
@@ -106,8 +105,7 @@ public abstract class FsExtractIssueTest
if(plugin is null)
continue;
var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
{});
var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(Array.Empty<object>());
Assert.IsNotNull(fs, $"Could not instantiate filesystem {plugin.Name}");

View File

@@ -335,8 +335,7 @@ sealed class ExtractFilesCommand : Command
AaruConsole.WriteLine($"[bold]As identified by {plugin.Name}.[/]");
var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.
Invoke(new object[]
{});
Invoke(Array.Empty<object>());
Spectre.ProgressSingleSpinner(ctx =>
{
@@ -369,8 +368,7 @@ sealed class ExtractFilesCommand : Command
AaruConsole.WriteLine($"[bold]Identified by {plugin.Name}.[/]");
var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.
Invoke(new object[]
{});
Invoke(Array.Empty<object>());
Spectre.ProgressSingleSpinner(ctx =>
{

View File

@@ -307,8 +307,7 @@ sealed class LsCommand : Command
AaruConsole.WriteLine($"[bold]As identified by {plugin.Name}.[/]");
var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.
Invoke(new object[]
{});
Invoke(Array.Empty<object>());
if(fs == null)
continue;
@@ -341,8 +340,7 @@ sealed class LsCommand : Command
AaruConsole.WriteLine($"[bold]Identified by {plugin.Name}.[/]");
var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.
Invoke(new object[]
{});
Invoke(Array.Empty<object>());
if(fs == null)
continue;