Skip to content

Commit

Permalink
Annotate or remove unused elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
claunia committed Oct 5, 2023
1 parent acbc11a commit bb23889
Show file tree
Hide file tree
Showing 49 changed files with 104 additions and 279 deletions.
1 change: 1 addition & 0 deletions Bluray/DI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ namespace Aaru.Decoders.Bluray;
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public static class DI
{
#region BluSize enum
Expand Down
2 changes: 2 additions & 0 deletions CD/CDTextOnLeadIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ namespace Aaru.Decoders.CD;
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class CDTextOnLeadIn
{
#region PackTypeIndicator enum
Expand Down
1 change: 1 addition & 0 deletions CD/Sector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ namespace Aaru.Decoders.CD;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public static class Sector
{
public static readonly byte[] ScrambleTable =
Expand Down
2 changes: 2 additions & 0 deletions DVD/AACS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ namespace Aaru.Decoders.DVD;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class AACS
{
#region Nested type: HDLeadInCopyright
Expand Down
2 changes: 2 additions & 0 deletions DVD/ADIP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ namespace Aaru.Decoders.DVD;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class ADIP
{
#region Nested type: ADIPInformation
Expand Down
2 changes: 2 additions & 0 deletions DVD/BCA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ namespace Aaru.Decoders.DVD;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class BCA
{
#region Nested type: BurstCuttingArea
Expand Down
2 changes: 2 additions & 0 deletions DVD/CPRM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ namespace Aaru.Decoders.DVD;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class CPRM
{
#region Nested type: DiscMediaIdentifier
Expand Down
2 changes: 2 additions & 0 deletions DVD/CSS&CPRM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ namespace Aaru.Decoders.DVD;
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class CSS_CPRM
{
public static LeadInCopyright? DecodeLeadInCopyright(byte[] response)
Expand Down
2 changes: 2 additions & 0 deletions DVD/DMI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ namespace Aaru.Decoders.DVD;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class DMI
{
#region Nested type: DiscManufacturingInformation
Expand Down
16 changes: 4 additions & 12 deletions DVD/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@
// Copyright © 2011-2023 Natalia Portillo
// ****************************************************************************/

using System.Diagnostics.CodeAnalysis;

// ReSharper disable UnusedMember.Global
// ReSharper disable InconsistentNaming
// ReSharper disable UnusedType.Global

namespace Aaru.Decoders.DVD;

#region Public enumerations

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum DiskCategory : byte
{
/// <summary>DVD-ROM. Version 1 is ECMA-267 and ECMA-268.</summary>
Expand Down Expand Up @@ -69,7 +71,6 @@ public enum DiskCategory : byte
Nintendo = 15
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum MaximumRateField : byte
{
/// <summary>2.52 Mbps</summary>
Expand All @@ -85,7 +86,6 @@ public enum MaximumRateField : byte
Unspecified = 0x0F
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum LayerTypeFieldMask : byte
{
Embossed = 0x01,
Expand All @@ -94,7 +94,6 @@ public enum LayerTypeFieldMask : byte
Reserved = 0x08
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum LinearDensityField : byte
{
/// <summary>0.267 μm/bit</summary>
Expand All @@ -113,7 +112,6 @@ public enum LinearDensityField : byte
ThreeFive = 0x08
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum TrackDensityField : byte
{
/// <summary>0.74 μm/track</summary>
Expand All @@ -128,7 +126,6 @@ public enum TrackDensityField : byte
Three = 0x04
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum CopyrightType : byte
{
/// <summary>There is no copy protection</summary>
Expand All @@ -141,7 +138,6 @@ public enum CopyrightType : byte
AACS = 0x10
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum WPDiscTypes : byte
{
/// <summary>Should not write without a cartridge</summary>
Expand All @@ -152,7 +148,6 @@ public enum WPDiscTypes : byte
Reserved2 = 0x03
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum DVDSize
{
/// <summary>120 mm</summary>
Expand All @@ -161,7 +156,6 @@ public enum DVDSize
Eighty = 1
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum DVDRAMDiscType
{
/// <summary>Shall not be recorded without a case</summary>
Expand All @@ -170,7 +164,6 @@ public enum DVDRAMDiscType
Uncased = 1
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum DVDLayerStructure
{
Unspecified = 0,
Expand All @@ -179,7 +172,6 @@ public enum DVDLayerStructure
Reserved = 3
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum DVDRecordingSpeed
{
None = 0,
Expand Down
2 changes: 2 additions & 0 deletions DVD/Layers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ namespace Aaru.Decoders.DVD;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public static class Layers
{
#region Nested type: JumpIntervalSize
Expand Down
1 change: 1 addition & 0 deletions DVD/PFI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ namespace Aaru.Decoders.DVD;
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public static class PFI
{
public static PhysicalFormatInformation? Decode(byte[] response, MediaType mediaType)
Expand Down
2 changes: 2 additions & 0 deletions DVD/RMD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ namespace Aaru.Decoders.DVD;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class RMD
{
#region Nested type: HDMediumStatus
Expand Down
2 changes: 2 additions & 0 deletions DVD/Sector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Aaru.Helpers;

namespace Aaru.Decoders.DVD;

[SuppressMessage("ReSharper", "UnusedMember.Global")]
public sealed class Sector
{
static readonly ushort[] _ecma267InitialValues =
Expand Down
2 changes: 2 additions & 0 deletions DVD/UDI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ namespace Aaru.Decoders.DVD;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class UDI
{
#region Nested type: UniqueDiscIdentifier
Expand Down
2 changes: 2 additions & 0 deletions Floppy/Amiga.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ namespace Aaru.Decoders.Floppy;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class Amiga
{
#region Nested type: Sector
Expand Down
3 changes: 3 additions & 0 deletions Floppy/Apple2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ namespace Aaru.Decoders.Floppy;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "ClassCanBeSealed.Global")]
public static class Apple2
{
const string MODULE_NAME = "Apple ][ GCR Decoder";
Expand Down Expand Up @@ -559,6 +561,7 @@ public static byte[] MarshalTrack(RawTrack track)

public static List<RawTrack> MarshalDisk(byte[] data, int offset = 0) => MarshalDisk(data, out _, offset);

[SuppressMessage("ReSharper", "OutParameterValueIsAlwaysDiscarded.Global")]
public static List<RawTrack> MarshalDisk(byte[] data, out int endOffset, int offset = 0)
{
endOffset = offset;
Expand Down
11 changes: 7 additions & 4 deletions Floppy/AppleSony.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ namespace Aaru.Decoders.Floppy;
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
[SuppressMessage("ReSharper", "OutParameterValueIsAlwaysDiscarded.Global")]
public static class AppleSony
{
public static byte[] DecodeSector(RawSector sector)
Expand Down Expand Up @@ -444,7 +447,7 @@ public static bool IsAppleSonyGCR(byte[] data)
#region Nested type: RawAddressField

/// <summary>GCR-encoded Apple Sony GCR floppy sector address field</summary>
public class RawAddressField
public sealed class RawAddressField
{
/// <summary>Checksum</summary>
public byte checksum;
Expand All @@ -469,7 +472,7 @@ public class RawAddressField
#region Nested type: RawDataField

/// <summary>GCR-encoded Apple ][ GCR floppy sector data field</summary>
public class RawDataField
public sealed class RawDataField
{
/// <summary>Checksum</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
Expand All @@ -492,7 +495,7 @@ public class RawDataField
#region Nested type: RawSector

/// <summary>GCR-encoded Apple Sony GCR floppy sector</summary>
public class RawSector
public sealed class RawSector
{
/// <summary>Address field</summary>
public RawAddressField addressField;
Expand All @@ -509,7 +512,7 @@ public class RawSector
#region Nested type: RawTrack

/// <summary>GCR-encoded Apple Sony GCR floppy track</summary>
public class RawTrack
public sealed class RawTrack
{
/// <summary>Track preamble, set to self-sync 0xFF, 36 bytes</summary>
public byte[] gap;
Expand Down
2 changes: 2 additions & 0 deletions Floppy/Commodore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ namespace Aaru.Decoders.Floppy;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class Commodore
{
#region Nested type: SectorData
Expand Down
2 changes: 2 additions & 0 deletions Floppy/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public enum IBMSectorSizeCode : byte
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public enum IBMIdType : byte
{
IndexMark = 0xFC,
Expand All @@ -66,6 +67,7 @@ public enum IBMIdType : byte
}

[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public enum AppleEncodedFormat : byte
{
/// <summary>Disk is an Apple II 3.5" disk</summary>
Expand Down
2 changes: 2 additions & 0 deletions Floppy/ISO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ namespace Aaru.Decoders.Floppy;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class ISO
{
#region Nested type: AddressMark
Expand Down
2 changes: 2 additions & 0 deletions Floppy/Perpendicular.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ namespace Aaru.Decoders.Floppy;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class Perpendicular
{
#region Nested type: AddressMark
Expand Down
3 changes: 3 additions & 0 deletions Floppy/System34.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ namespace Aaru.Decoders.Floppy;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class System34
{
#region Nested type: AddressMark
Expand Down
2 changes: 2 additions & 0 deletions Floppy/System3740.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ namespace Aaru.Decoders.Floppy;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
[SuppressMessage("ReSharper", "UnusedType.Global")]
public static class System3740
{
#region Nested type: AddressMark
Expand Down
1 change: 1 addition & 0 deletions MMC/CID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class CID
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public static partial class Decoders
{
public static CID DecodeCID(uint[] response)
Expand Down
1 change: 1 addition & 0 deletions MMC/CSD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public class CSD
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public static partial class Decoders
{
public static CSD DecodeCSD(uint[] response)
Expand Down
2 changes: 2 additions & 0 deletions MMC/ExtendedCSD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ namespace Aaru.Decoders.MMC;
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnassignedField.Global")]
[StructLayout(LayoutKind.Sequential, Pack = 1)]
[SuppressMessage("ReSharper", "NotAccessedField.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public class ExtendedCSD
{
public byte AccessSize;
Expand Down
1 change: 1 addition & 0 deletions MMC/OCR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class OCR
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public static partial class Decoders
{
public static OCR DecodeOCR(uint response)
Expand Down
Loading

0 comments on commit bb23889

Please sign in to comment.