Skip to content

Commit

Permalink
Align parameter order with tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-jung committed Jul 10, 2023
1 parent fafa498 commit 3e57658
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/NerdBank.GitVersioning/ManagedGit/GitPack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public Stream GetObject(long offset, string objectType)
throw;
}

return this.cache.Add(offset, objectType, objectStream);
return this.cache.Add(offset, objectStream, objectType);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/NerdBank.GitVersioning/ManagedGit/GitPackCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ public abstract class GitPackCache : IDisposable
/// <param name="offset">
/// The offset of the Git object in the Git pack.
/// </param>
/// <param name="objectType">The object type of the object to add to the cache.</param>
/// <param name="stream">
/// A <see cref="Stream"/> which represents the object to add. This stream
/// will be copied to the cache.
/// </param>
/// <param name="objectType">The object type of the object to add to the cache.</param>
/// <returns>
/// A <see cref="Stream"/> which represents the cached entry.
/// </returns>
public abstract Stream Add(long offset, string objectType, Stream stream);
public abstract Stream Add(long offset, Stream stream, string objectType);

/// <inheritdoc/>
public void Dispose()
Expand Down
4 changes: 2 additions & 2 deletions src/NerdBank.GitVersioning/ManagedGit/GitPackMemoryCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Nerdbank.GitVersioning.ManagedGit;
/// twice, it is read from the <see cref="MemoryStream"/>, rather than the underlying <see cref="Stream"/>.
/// </para>
/// <para>
/// <see cref="Add(long, string, Stream)"/> and <see cref="TryOpen(long, out ValueTuple{Stream, string}?)"/> return <see cref="Stream"/>
/// <see cref="Add(long, Stream, string)"/> and <see cref="TryOpen(long, out ValueTuple{Stream, string}?)"/> return <see cref="Stream"/>
/// objects which may operate on the same underlying <see cref="Stream"/>, but independently maintain
/// their state.
/// </para>
Expand All @@ -31,7 +31,7 @@ public class GitPackMemoryCache : GitPackCache
private readonly Dictionary<long, (GitPackMemoryCacheStream, string)> cache = new();

/// <inheritdoc/>
public override Stream Add(long offset, string objectType, Stream stream)
public override Stream Add(long offset, Stream stream, string objectType)
{
var cacheStream = new GitPackMemoryCacheStream(stream);
this.cache.Add(offset, (cacheStream, objectType));
Expand Down
2 changes: 1 addition & 1 deletion src/NerdBank.GitVersioning/ManagedGit/GitPackNullCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class GitPackNullCache : GitPackCache
public static GitPackNullCache Instance { get; } = new GitPackNullCache();

/// <inheritdoc/>
public override Stream Add(long offset, string objectType, Stream stream)
public override Stream Add(long offset, Stream stream, string objectType)
{
return stream;
}
Expand Down

0 comments on commit 3e57658

Please sign in to comment.