Improve parameter documentation in interface files

This commit is contained in:
2025-10-23 04:07:52 +01:00
parent 46baa53e62
commit 23873fb2f5
5 changed files with 45 additions and 41 deletions

View File

@@ -77,7 +77,7 @@ public interface IBaseWritableImage : IBaseImage
/// <param name="mediaType"><see cref="MediaType" /> that will be written in the image</param>
/// <param name="options">Options to be used when creating new image</param>
/// <param name="sectors">How many sectors the media has.</param>
/// <param name="sectorSize"></param>
/// <param name="sectorSize">Size of each sector in bytes.</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool Create(string path, MediaType mediaType, Dictionary<string, string> options, ulong sectors, uint sectorSize);

View File

@@ -54,53 +54,53 @@ public interface IMediaImage : IBaseImage
/// <summary>Reads a sector's user data.</summary>
/// <returns>The sector's user data.</returns>
/// <param name="sectorAddress">Sector address (LBA).</param>
/// <param name="negative"></param>
/// <param name="buffer"></param>
/// <param name="sectorStatus"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="buffer">The sector's user data.</param>
/// <param name="sectorStatus">The status of the sector.</param>
ErrorNumber ReadSector(ulong sectorAddress, bool negative, out byte[] buffer, out SectorStatus sectorStatus);
/// <summary>Reads a complete sector (user data + all tags).</summary>
/// <returns>The complete sector. Format depends on disk type.</returns>
/// <param name="sectorAddress">Sector address (LBA).</param>
/// <param name="negative"></param>
/// <param name="buffer"></param>
/// <param name="sectorStatus"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="buffer">The complete sector.</param>
/// <param name="sectorStatus">The status of the sector.</param>
ErrorNumber ReadSectorLong(ulong sectorAddress, bool negative, out byte[] buffer, out SectorStatus sectorStatus);
/// <summary>Reads user data from several sectors.</summary>
/// <returns>The sectors user data.</returns>
/// <param name="sectorAddress">Starting sector address (LBA).</param>
/// <param name="negative"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="length">How many sectors to read.</param>
/// <param name="buffer"></param>
/// <param name="sectorStatus"></param>
/// <param name="buffer">The sectors user data.</param>
/// <param name="sectorStatus">The status of each sector.</param>
ErrorNumber ReadSectors(ulong sectorAddress, bool negative, uint length, out byte[] buffer,
out SectorStatus[] sectorStatus);
/// <summary>Reads several complete sector (user data + all tags).</summary>
/// <returns>The complete sectors. Format depends on disk type.</returns>
/// <param name="sectorAddress">Starting sector address (LBA).</param>
/// <param name="negative"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="length">How many sectors to read.</param>
/// <param name="buffer"></param>
/// <param name="sectorStatus"></param>
/// <param name="buffer">The complete sectors.</param>
/// <param name="sectorStatus">The status of each sector.</param>
ErrorNumber ReadSectorsLong(ulong sectorAddress, bool negative, uint length, out byte[] buffer,
out SectorStatus[] sectorStatus);
/// <summary>Reads tag from several sectors.</summary>
/// <returns>The sectors tag.</returns>
/// <param name="sectorAddress">Starting sector address (LBA).</param>
/// <param name="negative"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="length">How many sectors to read.</param>
/// <param name="tag">Tag type.</param>
/// <param name="buffer"></param>
/// <param name="buffer">The sectors tag.</param>
ErrorNumber ReadSectorsTag(ulong sectorAddress, bool negative, uint length, SectorTagType tag, out byte[] buffer);
/// <summary>Reads a sector's tag.</summary>
/// <returns>The sector's tag.</returns>
/// <param name="sectorAddress">Sector address (LBA).</param>
/// <param name="negative"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="tag">Tag type.</param>
/// <param name="buffer"></param>
/// <param name="buffer">The sector's tag.</param>
ErrorNumber ReadSectorTag(ulong sectorAddress, bool negative, SectorTagType tag, out byte[] buffer);
}

View File

@@ -62,8 +62,8 @@ public interface IOpticalMediaImage : IMediaImage, IPartitionableMediaImage, IVe
/// <returns>The sector's user data.</returns>
/// <param name="sectorAddress">Sector address (relative LBA).</param>
/// <param name="track">Track.</param>
/// <param name="buffer"></param>
/// <param name="sectorStatus"></param>
/// <param name="buffer">The sector's user data.</param>
/// <param name="sectorStatus">The status of the sector.</param>
ErrorNumber ReadSector(ulong sectorAddress, uint track, out byte[] buffer, out SectorStatus sectorStatus);
/// <summary>Reads a sector's tag, relative to track.</summary>
@@ -71,7 +71,7 @@ public interface IOpticalMediaImage : IMediaImage, IPartitionableMediaImage, IVe
/// <param name="sectorAddress">Sector address (relative LBA).</param>
/// <param name="track">Track.</param>
/// <param name="tag">Tag type.</param>
/// <param name="buffer"></param>
/// <param name="buffer">The sector's tag.</param>
ErrorNumber ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag, out byte[] buffer);
/// <summary>Reads user data from several sectors, relative to track.</summary>
@@ -79,8 +79,8 @@ public interface IOpticalMediaImage : IMediaImage, IPartitionableMediaImage, IVe
/// <param name="sectorAddress">Starting sector address (relative LBA).</param>
/// <param name="length">How many sectors to read.</param>
/// <param name="track">Track.</param>
/// <param name="buffer"></param>
/// <param name="sectorStatus"></param>
/// <param name="buffer">The sectors user data.</param>
/// <param name="sectorStatus">The status of each sector.</param>
ErrorNumber ReadSectors(ulong sectorAddress, uint length, uint track, out byte[] buffer,
out SectorStatus[] sectorStatus);
@@ -90,15 +90,15 @@ public interface IOpticalMediaImage : IMediaImage, IPartitionableMediaImage, IVe
/// <param name="length">How many sectors to read.</param>
/// <param name="track">Track.</param>
/// <param name="tag">Tag type.</param>
/// <param name="buffer"></param>
/// <param name="buffer">The sectors tag.</param>
ErrorNumber ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag, out byte[] buffer);
/// <summary>Reads a complete sector (user data + all tags), relative to track.</summary>
/// <returns>The complete sector. Format depends on disk type.</returns>
/// <param name="sectorAddress">Sector address (relative LBA).</param>
/// <param name="track">Track.</param>
/// <param name="buffer"></param>
/// <param name="sectorStatus"></param>
/// <param name="buffer">The complete sector.</param>
/// <param name="sectorStatus">The status of the sector.</param>
ErrorNumber ReadSectorLong(ulong sectorAddress, uint track, out byte[] buffer, out SectorStatus sectorStatus);
/// <summary>Reads several complete sector (user data + all tags), relative to track.</summary>
@@ -106,8 +106,8 @@ public interface IOpticalMediaImage : IMediaImage, IPartitionableMediaImage, IVe
/// <param name="sectorAddress">Starting sector address (relative LBA).</param>
/// <param name="length">How many sectors to read.</param>
/// <param name="track">Track.</param>
/// <param name="buffer"></param>
/// <param name="sectorStatus"></param>
/// <param name="buffer">The complete sectors.</param>
/// <param name="sectorStatus">The status of each sector.</param>
ErrorNumber ReadSectorsLong(ulong sectorAddress, uint length, uint track, out byte[] buffer,
out SectorStatus[] sectorStatus);
@@ -126,8 +126,8 @@ public interface IOpticalMediaImage : IMediaImage, IPartitionableMediaImage, IVe
/// <param name="sectorAddress">Starting sector address (relative LBA).</param>
/// <param name="length">How many sectors to read.</param>
/// <param name="track">Track.</param>
/// <param name="failingLbas">List of incorrect sectors</param>
/// <param name="unknownLbas">List of uncheckable sectors</param>
/// <param name="failingLbas">List of incorrect sectors.</param>
/// <param name="unknownLbas">List of uncheckable sectors.</param>
bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List<ulong> failingLbas,
out List<ulong> unknownLbas);
}

View File

@@ -70,8 +70,8 @@ public interface IReadOnlyFilesystem : IFilesystem
/// Initializes whatever internal structures the filesystem plugin needs to be able to read files and directories
/// from the filesystem.
/// </summary>
/// <param name="imagePlugin"></param>
/// <param name="partition"></param>
/// <param name="imagePlugin">The image plugin containing the filesystem.</param>
/// <param name="partition">The partition containing the filesystem.</param>
/// <param name="encoding">Which encoding to use for this filesystem.</param>
/// <param name="options">Dictionary of key=value pairs containing options to pass to the filesystem</param>
/// <param name="namespace">Filename namespace</param>
@@ -102,16 +102,19 @@ public interface IReadOnlyFilesystem : IFilesystem
/// <summary>Gets information about the mounted volume.</summary>
/// <param name="stat">Information about the mounted volume.</param>
/// <returns>Error number.</returns>
ErrorNumber StatFs(out FileSystemInfo stat);
/// <summary>Gets information about a file or directory.</summary>
/// <param name="path">File path.</param>
/// <param name="stat">File information.</param>
/// <returns>Error number.</returns>
ErrorNumber Stat(string path, out FileEntryInfo stat);
/// <summary>Solves a symbolic link.</summary>
/// <param name="path">Link path.</param>
/// <param name="dest">Link destination.</param>
/// <returns>Error number.</returns>
ErrorNumber ReadLink(string path, out string dest);
/// <summary>Opens a file for reading.</summary>
@@ -155,6 +158,7 @@ public interface IReadOnlyFilesystem : IFilesystem
/// <param name="length">Bytes to read.</param>
/// <param name="buffer">Buffer. Must exist and be of size equal or bigger than <see cref="length" /></param>
/// <param name="read">How many bytes were read into the buffer</param>
/// <returns>Error number.</returns>
ErrorNumber ReadFile(IFileNode node, long length, byte[] buffer, out long read);
/// <summary>Opens a directory for listing.</summary>

View File

@@ -65,41 +65,41 @@ public interface IWritableImage : IMediaImage, IBaseWritableImage
/// <summary>Writes a sector to the image</summary>
/// <param name="data">Sector data</param>
/// <param name="sectorAddress">Sector address</param>
/// <param name="negative"></param>
/// <param name="sectorStatus"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="sectorStatus">The status of the sector.</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteSector(byte[] data, ulong sectorAddress, bool negative, SectorStatus sectorStatus);
/// <summary>Writes a sector to the image with main channel tags attached</summary>
/// <param name="data">Sector data with its main channel tags attached</param>
/// <param name="sectorAddress">Sector address</param>
/// <param name="negative"></param>
/// <param name="sectorStatus"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="sectorStatus">The status of the sector.</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteSectorLong(byte[] data, ulong sectorAddress, bool negative, SectorStatus sectorStatus);
/// <summary>Writes several sectors to the image</summary>
/// <param name="data">Sectors data</param>
/// <param name="sectorAddress">Sector starting address</param>
/// <param name="negative"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="length">How many sectors to write</param>
/// <param name="sectorStatus"></param>
/// <param name="sectorStatus">The status of each sector.</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteSectors(byte[] data, ulong sectorAddress, bool negative, uint length, SectorStatus[] sectorStatus);
/// <summary>Writes several sectors to the image</summary>
/// <param name="data">Sector data with their main channel tags attached</param>
/// <param name="sectorAddress">Sector starting address</param>
/// <param name="negative"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="length">How many sectors to write</param>
/// <param name="sectorStatus"></param>
/// <param name="sectorStatus">The status of each sector.</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteSectorsLong(byte[] data, ulong sectorAddress, bool negative, uint length, SectorStatus[] sectorStatus);
/// <summary>Writes parallel or subchannel sector tag for several sector</summary>
/// <param name="data">Tag data to write</param>
/// <param name="sectorAddress">Starting sector address</param>
/// <param name="negative"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="length">How many sectors to write</param>
/// <param name="tag">Tag type</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
@@ -108,7 +108,7 @@ public interface IWritableImage : IMediaImage, IBaseWritableImage
/// <summary>Writes parallel or subchannel sector tag for one sector</summary>
/// <param name="data">Tag data to write</param>
/// <param name="sectorAddress">Sector address</param>
/// <param name="negative"></param>
/// <param name="negative">If the sector address is a negative LBA.</param>
/// <param name="tag">Tag type</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteSectorTag(byte[] data, ulong sectorAddress, bool negative, SectorTagType tag);