diff --git a/MediaType.cs b/MediaType.cs index 635df2c92..ccd57e47a 100644 --- a/MediaType.cs +++ b/MediaType.cs @@ -34,7 +34,9 @@ // TODO: Rename contents namespace DiscImageChef.CommonTypes { - // Media (disk, cartridge, tape, cassette, etc) types + /// + /// Contains an enumeration of all known types of media. + /// public enum MediaType { /// Unknown disk type diff --git a/MediaTypeFromSCSI.cs b/MediaTypeFromSCSI.cs index 23e638e64..3f9d011f8 100644 --- a/MediaTypeFromSCSI.cs +++ b/MediaTypeFromSCSI.cs @@ -37,6 +37,17 @@ namespace DiscImageChef.CommonTypes #pragma warning disable RECS0063 // Warns when a culture-aware 'StartsWith' call is used by default. public static class MediaTypeFromScsi { + /// + /// Tries to guess, from SCSI information, the media type of a device and/or its inserted media + /// + /// The SCSI Peripheral Type as indicated in the INQUIRY response + /// The vendor string of the device + /// The model string of the device + /// The medium type byte from MODE SENSE + /// The density type byte from MODE SENSE + /// How many blocks are on the media + /// Size in bytes of each block + /// public static MediaType Get(byte scsiPeripheralType, string vendor, string model, byte mediumType, byte densityCode, ulong blocks, uint blockSize) { diff --git a/Partition.cs b/Partition.cs index e931bc710..2494d47a9 100644 --- a/Partition.cs +++ b/Partition.cs @@ -56,13 +56,15 @@ namespace DiscImageChef.CommonTypes /// Information that does not find space in this struct public string Description; /// LBA of last partition sector - public ulong End - { - get => Start + Length - 1; - } + public ulong End => Start + Length - 1; /// Name of partition scheme that contains this partition public string Scheme; + /// + /// Compares two partitions + /// + /// Partition to compare with + /// 0 if both partitions start and end at the same sector public bool Equals(Partition other) { return Start == other.Start && Length == other.Length; @@ -80,6 +82,11 @@ namespace DiscImageChef.CommonTypes return Start.GetHashCode() + End.GetHashCode(); } + /// + /// Compares this partition with another and returns an integer that indicates whether the current partition precedes, follows, or is in the same place as the other partition. + /// + /// Partition to compare with + /// A value that indicates the relative equality of the partitions being compared. public int CompareTo(Partition other) { if(Start == other.Start && End == other.End) return 0;