General code cleanup and style refactor.

This commit is contained in:
2022-11-15 15:58:40 +00:00
parent 2c62b0cc70
commit c4fa4e8674
60 changed files with 453 additions and 716 deletions

View File

@@ -33,13 +33,13 @@
// ReSharper disable UnusedMember.Global
namespace Aaru.CommonTypes.Interfaces;
using System;
using System.Collections.Generic;
using System.IO;
using Aaru.CommonTypes.Enums;
namespace Aaru.CommonTypes.Interfaces;
/// <summary>Supported archive features</summary>
[Flags]
public enum ArchiveSupportedFeature : uint

View File

@@ -36,14 +36,14 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System;
using System.Collections.Generic;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
using Schemas;
namespace Aaru.CommonTypes.Interfaces;
/// <summary>Base interface for all images</summary>
public interface IBaseImage
{

View File

@@ -36,14 +36,14 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System;
using System.Collections.Generic;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
using Schemas;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc />
/// <summary>Base interface for all writable images</summary>
public interface IBaseWritableImage : IBaseImage

View File

@@ -36,12 +36,12 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System.Collections.Generic;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc />
/// <summary>Interface defining linear media (chips, game carts, etc) images</summary>
public interface IByteAddressableImage : IBaseWritableImage

View File

@@ -36,12 +36,12 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System;
using System.Text;
using Schemas;
namespace Aaru.CommonTypes.Interfaces;
/// <summary>Interface to implement filesystem plugins.</summary>
public interface IFilesystem
{

View File

@@ -36,12 +36,12 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System;
using System.IO;
using Aaru.CommonTypes.Enums;
namespace Aaru.CommonTypes.Interfaces;
/// <summary>
/// Defines a filter, that is, a transformation of the data from a file, like, for example, a compressor (e.g.
/// GZIP), or a container (e.g. AppleDouble)
@@ -96,8 +96,8 @@ public interface IFilter
/// <summary>
/// Gets path to parent folder to the file referenced by this filter. If it's an archive, it's the full path to
/// the archive itself.<br /> UNIX: /path/to/archive.zip/path/to/file.bin =&gt; /path/to/archive.zip <br /> Windows:
/// C:\path\to\archive.zip\path\to\file.bin =&gt; C:\path\to\archive.zip
/// the archive itself. <br /> UNIX: /path/to/archive.zip/path/to/file.bin =&gt; /path/to/archive.zip <br /> Windows:
/// C:\path\to\archive.zip\path\to\file.bin = &gt; C:\path\to\archive.zip
/// </summary>
/// <returns>The parent folder.</returns>
string ParentFolder { get; }

View File

@@ -36,15 +36,15 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc />
/// <summary>
/// Abstract class to implement disk image reading plugins that can contain floppy images. This interface is
/// needed because floppy formatting characteristics are not necesarily compatible with the whole. LBA-oriented
/// needed because floppy formatting characteristics are not necessarily compatible with the whole. LBA-oriented
/// interface is defined by <see cref="T:Aaru.CommonTypes.Interfaces.IMediaImage" />. All data returned by these
/// methods is already decoded from its corresponding bitstream.
/// </summary>

View File

@@ -37,10 +37,10 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Enums;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc />
/// <summary>Abstract class to implement disk image reading plugins.</summary>
public interface IMediaImage : IBaseImage

View File

@@ -36,12 +36,12 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System.Collections.Generic;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc cref="IMediaImage" />
/// <summary>Abstract class to implement disk image reading plugins.</summary>
public interface IOpticalMediaImage : IMediaImage, IPartitionableMediaImage, IVerifiableSectorsImage

View File

@@ -37,11 +37,11 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System;
using System.Collections.Generic;
namespace Aaru.CommonTypes.Interfaces;
/// <summary>Abstract class to implement partitioning schemes interpreting plugins.</summary>
public interface IPartition
{

View File

@@ -37,10 +37,10 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System.Collections.Generic;
namespace Aaru.CommonTypes.Interfaces;
/// <summary>Defines an image that can contain partitions</summary>
public interface IPartitionableMediaImage
{

View File

@@ -36,11 +36,11 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System;
using System.Collections.Generic;
namespace Aaru.CommonTypes.Interfaces;
/// <summary>Defines a register of all known plugins</summary>
public interface IPluginRegister
{

View File

@@ -37,14 +37,14 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc />
/// <summary>Defines the interface to implement reading the contents of a filesystem</summary>
public interface IReadOnlyFilesystem : IFilesystem

View File

@@ -37,11 +37,11 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System.Collections.Generic;
using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc />
/// <summary>Defines an image that can store the information from streaming, digital, tapes</summary>
public interface ITapeImage : IMediaImage

View File

@@ -37,10 +37,10 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System.Collections.Generic;
namespace Aaru.CommonTypes.Interfaces;
/// <summary>Defines an image that can verify the integrity of the sectors it contains</summary>
public interface IVerifiableSectorsImage
{

View File

@@ -36,11 +36,11 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc cref="IWritableImage" />
/// <summary>
/// Abstract class to implement disk image reading plugins that can contain floppy images. This interface is

View File

@@ -36,10 +36,10 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Enums;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc cref="Aaru.CommonTypes.Interfaces.IMediaImage" />
/// <summary>
/// Abstract class to implement disk image writing plugins. TODO: This interface is subject to change until

View File

@@ -36,12 +36,12 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using System.Collections.Generic;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc cref="Aaru.CommonTypes.Interfaces.IOpticalMediaImage" />
/// <summary>Defines an image that is writable and can store an optical disc (CD, DVD, etc)</summary>
public interface IWritableOpticalImage : IWritableImage, IOpticalMediaImage

View File

@@ -37,10 +37,10 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc cref="Aaru.CommonTypes.Interfaces.ITapeImage" />
/// <summary>Defines an image that is writable and can store information about a streaming, digital, tape</summary>
public interface IWritableTapeImage : ITapeImage, IWritableImage