Skip to content

Commit

Permalink
Rename chain enumerators
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-visionaid committed Oct 20, 2024
1 parent a2ba07c commit 7391580
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions OpenMcdf3/DirectoryEntryEnumerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace OpenMcdf3;

/// <summary>
/// Enumerates <see cref="DirectoryEntry"/> instances from a <see cref="FatSectorChainEnumerator"/>.
/// Enumerates <see cref="DirectoryEntry"/> instances from a <see cref="FatChainEnumerator"/>.
/// </summary>
internal sealed class DirectoryEntryEnumerator : IEnumerator<DirectoryEntry>
{
private readonly IOContext ioContext;
private readonly Version version;
private readonly int entryCount;
private readonly FatSectorChainEnumerator chainEnumerator;
private readonly FatChainEnumerator chainEnumerator;
private int entryIndex = -1;
private DirectoryEntry? current;

Expand All @@ -19,7 +19,7 @@ public DirectoryEntryEnumerator(IOContext ioContext)
this.ioContext = ioContext;
this.version = (Version)ioContext.Header.MajorVersion;
this.entryCount = ioContext.Header.SectorSize / DirectoryEntry.Length;
this.chainEnumerator = new FatSectorChainEnumerator(ioContext, ioContext.Header.FirstDirectorySectorId);
this.chainEnumerator = new FatChainEnumerator(ioContext, ioContext.Header.FirstDirectorySectorId);
}

/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ namespace OpenMcdf3;
/// <summary>
/// Enumerates the <see cref="Sector"/>s in a FAT sector chain.
/// </summary>
internal sealed class FatSectorChainEnumerator : IEnumerator<Sector>
internal sealed class FatChainEnumerator : IEnumerator<Sector>
{
private readonly IOContext ioContext;
private readonly FatSectorEnumerator fatEnumerator;
private readonly uint startId;
private bool start = true;
private Sector current = Sector.EndOfChain;

public FatSectorChainEnumerator(IOContext ioContext, uint startSectorId)
public FatChainEnumerator(IOContext ioContext, uint startSectorId)
{
this.ioContext = ioContext;
this.startId = startSectorId;
Expand Down
2 changes: 1 addition & 1 deletion OpenMcdf3/FatStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
internal class FatStream : Stream
{
readonly IOContext ioContext;
readonly FatSectorChainEnumerator chain;
readonly FatChainEnumerator chain;
readonly long length;
long position;
bool disposed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ namespace OpenMcdf3;
/// <summary>
/// Enumerates the <see cref="MiniSector"/>s in a Mini FAT sector chain.
/// </summary>
internal sealed class MiniFatSectorChainEnumerator : IEnumerator<MiniSector>
internal sealed class MiniFatChainEnumerator : IEnumerator<MiniSector>
{
private readonly MiniFatSectorEnumerator miniFatEnumerator;
private readonly uint startId;
private bool start = true;
private MiniSector current = MiniSector.EndOfChain;

public MiniFatSectorChainEnumerator(IOContext ioContext, uint startSectorId)
public MiniFatChainEnumerator(IOContext ioContext, uint startSectorId)
{
this.startId = startSectorId;
miniFatEnumerator = new(ioContext);
Expand Down
2 changes: 1 addition & 1 deletion OpenMcdf3/MiniFatSectorEnumerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace OpenMcdf3;
internal sealed class MiniFatSectorEnumerator : IEnumerator<MiniSector>
{
private readonly IOContext ioContext;
private readonly FatSectorChainEnumerator fatChain;
private readonly FatChainEnumerator fatChain;
bool start = true;
MiniSector current = MiniSector.EndOfChain;

Expand Down
2 changes: 1 addition & 1 deletion OpenMcdf3/MiniFatStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
internal sealed class MiniFatStream : Stream
{
readonly IOContext ioContext;
readonly MiniFatSectorChainEnumerator chain;
readonly MiniFatChainEnumerator chain;
readonly FatStream fatStream;
readonly long length;
long position;
Expand Down

0 comments on commit 7391580

Please sign in to comment.