General code refactor.

This commit is contained in:
2021-08-17 21:23:22 +01:00
parent 874a3d4bcb
commit d3451f3e4d
54 changed files with 934 additions and 1349 deletions

View File

@@ -39,9 +39,7 @@ using System.IO;
namespace Aaru.CommonTypes.Interfaces
{
/// <summary>
/// Supported archive features
/// </summary>
/// <summary>Supported archive features</summary>
[Flags]
public enum ArchiveSupportedFeature : uint
{
@@ -71,9 +69,7 @@ namespace Aaru.CommonTypes.Interfaces
SupportsXAttrs = 1 << 6
}
/// <summary>
/// Defines the interface to handle an archive (e.g. ZIP, WAD, etc)
/// </summary>
/// <summary>Defines the interface to handle an archive (e.g. ZIP, WAD, etc)</summary>
public interface IArchive
{
/// <summary>Descriptive name of the plugin</summary>

View File

@@ -38,9 +38,7 @@
namespace Aaru.CommonTypes.Interfaces
{
/// <summary>
/// Defines the interface to implement a checksum or hashing algorithm
/// </summary>
/// <summary>Defines the interface to implement a checksum or hashing algorithm</summary>
public interface IChecksum
{
/// <summary>Updates the hash with data.</summary>

View File

@@ -45,9 +45,7 @@ namespace Aaru.CommonTypes.Interfaces
/// <summary>Interface to implement filesystem plugins.</summary>
public interface IFilesystem
{
/// <summary>
/// Defines the encoding used to interpret strings in the filesystem
/// </summary>
/// <summary>Defines the encoding used to interpret strings in the filesystem</summary>
Encoding Encoding { get; }
/// <summary>Plugin name.</summary>
string Name { get; }

View File

@@ -42,8 +42,8 @@ using System.IO;
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)
/// 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)
/// </summary>
public interface IFilter
{

View File

@@ -41,9 +41,7 @@ using System.Collections.Generic;
namespace Aaru.CommonTypes.Interfaces
{
/// <summary>
/// Defines an image that can contain partitions
/// </summary>
/// <summary>Defines an image that can contain partitions</summary>
public interface IPartitionableMediaImage
{
/// <summary>

View File

@@ -41,9 +41,7 @@ using System.Collections.Generic;
namespace Aaru.CommonTypes.Interfaces
{
/// <summary>
/// Defines a register of all known plugins
/// </summary>
/// <summary>Defines a register of all known plugins</summary>
public interface IPluginRegister
{
/// <summary>Gets all checksum plugins</summary>
@@ -86,4 +84,4 @@ namespace Aaru.CommonTypes.Interfaces
/// <returns>List of archive plugins</returns>
List<Type> GetAllArchivePlugins();
}
}
}

View File

@@ -45,17 +45,13 @@ using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces
{
/// <inheritdoc />
/// <summary>
/// Defines the interface to implement reading the contents of a filesystem
/// </summary>
/// <summary>Defines the interface to implement reading the contents of a filesystem</summary>
public interface IReadOnlyFilesystem : IFilesystem
{
/// <summary>Retrieves a list of options supported by the filesystem, with name, type and description</summary>
IEnumerable<(string name, Type type, string description)> SupportedOptions { get; }
/// <summary>
/// Supported namespaces
/// </summary>
/// <summary>Supported namespaces</summary>
Dictionary<string, string> Namespaces { get; }
/// <summary>

View File

@@ -43,9 +43,7 @@ using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces
{
/// <inheritdoc />
/// <summary>
/// Defines an image that can store the information from streaming, digital, tapes
/// </summary>
/// <summary>Defines an image that can store the information from streaming, digital, tapes</summary>
public interface ITapeImage : IMediaImage
{
/// <summary>Gets a list of all the files registered in the image</summary>

View File

@@ -39,9 +39,7 @@
namespace Aaru.CommonTypes.Interfaces
{
/// <summary>
/// Defines an image that can verify the integrity of the image itself, but not its contents
/// </summary>
/// <summary>Defines an image that can verify the integrity of the image itself, but not its contents</summary>
public interface IVerifiableImage
{
/// <summary>Verifies media image internal checksum.</summary>

View File

@@ -41,9 +41,7 @@ using System.Collections.Generic;
namespace Aaru.CommonTypes.Interfaces
{
/// <summary>
/// Defines an image that can verify the integrity of the sectors it contains
/// </summary>
/// <summary>Defines an image that can verify the integrity of the sectors it contains</summary>
public interface IVerifiableSectorsImage
{
/// <summary>Verifies a sector.</summary>

View File

@@ -62,13 +62,9 @@ namespace Aaru.CommonTypes.Interfaces
/// <summary>Gets a list of known extensions for format auto-choosing</summary>
IEnumerable<string> KnownExtensions { get; }
/// <summary>
/// If set to <c>true</c> means the image is opened for writing
/// </summary>
bool IsWriting { get; }
/// <summary>
/// Contains a description of the last error
/// </summary>
/// <summary>If set to <c>true</c> means the image is opened for writing</summary>
bool IsWriting { get; }
/// <summary>Contains a description of the last error</summary>
string ErrorMessage { get; }
/// <summary>

View File

@@ -42,14 +42,10 @@ using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces
{
/// <summary>
/// Defines an image that is writable and can store an optical disc (CD, DVD, etc)
/// </summary>
/// <summary>Defines an image that is writable and can store an optical disc (CD, DVD, etc)</summary>
public interface IWritableOpticalImage : IWritableImage, IOpticalMediaImage
{
/// <summary>
/// Image format capabilities
/// </summary>
/// <summary>Image format capabilities</summary>
OpticalImageCapabilities OpticalCapabilities { get; }
/// <summary>Sets tracks for optical media</summary>

View File

@@ -41,9 +41,7 @@ using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces
{
/// <summary>
/// Defines an image that is writable and can store information about a streaming, digital, tape
/// </summary>
/// <summary>Defines an image that is writable and can store information about a streaming, digital, tape</summary>
public interface IWritableTapeImage : ITapeImage, IWritableImage
{
/// <summary>Registers a new file in the image</summary>