General cleanup and refactor.

This commit is contained in:
2022-03-07 07:36:32 +00:00
parent 27900ec144
commit 8d40f3e395
60 changed files with 1034 additions and 1156 deletions

View File

@@ -36,10 +36,10 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Aaru.CommonTypes.Metadata;
using System.ComponentModel.DataAnnotations;
/// <summary>Describes CD reading offset</summary>
public class CdOffset
{

View File

@@ -36,13 +36,7 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
using System;
using System.ComponentModel;
using System.Xml.Serialization;
using Aaru.CommonTypes.Structs.Devices.ATA;
using Aaru.CommonTypes.Structs.Devices.SCSI;
using Aaru.CommonTypes.Structs.Devices.SCSI.Modes;
using Newtonsoft.Json;
// This is obsolete
#pragma warning disable 1591
@@ -52,6 +46,14 @@ using Newtonsoft.Json;
namespace Aaru.CommonTypes.Metadata;
using System;
using System.ComponentModel;
using System.Xml.Serialization;
using Aaru.CommonTypes.Structs.Devices.ATA;
using Aaru.CommonTypes.Structs.Devices.SCSI;
using Aaru.CommonTypes.Structs.Devices.SCSI.Modes;
using Newtonsoft.Json;
[Serializable, XmlRoot("DicDeviceReport", Namespace = "", IsNullable = false)]
public class DeviceReport
{

View File

@@ -36,17 +36,7 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs.Devices.ATA;
using Aaru.CommonTypes.Structs.Devices.SCSI;
using Aaru.CommonTypes.Structs.Devices.SCSI.Modes;
using Newtonsoft.Json;
// TODO: Re-enable CS1591 in this file
#pragma warning disable 1591
@@ -59,6 +49,18 @@ using Newtonsoft.Json;
namespace Aaru.CommonTypes.Metadata;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs.Devices.ATA;
using Aaru.CommonTypes.Structs.Devices.SCSI;
using Aaru.CommonTypes.Structs.Devices.SCSI.Modes;
using Newtonsoft.Json;
public class DeviceReportV2
{
public DeviceReportV2() {}

View File

@@ -36,12 +36,12 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
using Schemas;
#pragma warning disable 612
namespace Aaru.CommonTypes.Metadata;
using Schemas;
/// <summary>Physical dimensions for media types</summary>
public static class Dimensions
{

View File

@@ -36,13 +36,13 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Metadata;
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using Schemas;
namespace Aaru.CommonTypes.Metadata;
/// <summary>Information that allows to resume a dump</summary>
[Serializable, XmlRoot("DicResume", Namespace = "", IsNullable = false)]
public class Resume

View File

@@ -36,15 +36,17 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Xml.Serialization;
// ReSharper disable ClassNeverInstantiated.Global
// ReSharper disable UnusedMember.Global
namespace Aaru.CommonTypes.Metadata;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Xml.Serialization;
/// <summary>Statistics</summary>
[XmlRoot("DicStats", Namespace = "", IsNullable = false)]
public class Stats

View File

@@ -36,17 +36,17 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.CommonTypes.Metadata;
using Aaru.CommonTypes.Interop;
using Schemas;
namespace Aaru.CommonTypes.Metadata;
/// <summary>Manages Aaru's version for metadata</summary>
public static class Version
{
/// <summary>Gets XML software type for the running version</summary>
/// <returns>XML software type</returns>
public static SoftwareType GetSoftwareType() => new SoftwareType
public static SoftwareType GetSoftwareType() => new()
{
Name = "Aaru",
OperatingSystem = DetectOS.GetRealPlatformID().ToString(),