From a579a09170faf014eade423ac324ca8337eb6247 Mon Sep 17 00:00:00 2001 From: Keith Dahlby Date: Wed, 21 Oct 2015 05:11:52 -0500 Subject: [PATCH 1/2] Hide PackBuilder.Dispose() --- LibGit2Sharp/PackBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibGit2Sharp/PackBuilder.cs b/LibGit2Sharp/PackBuilder.cs index 02ea76dc7..ac105be64 100644 --- a/LibGit2Sharp/PackBuilder.cs +++ b/LibGit2Sharp/PackBuilder.cs @@ -79,7 +79,7 @@ public void AddRecursively(ObjectId id) /// /// Disposes the PackBuilder object. /// - public void Dispose() + void IDisposable.Dispose() { packBuilderHandle.SafeDispose(); } From e9db9e8fd0e95c7753005ad377e13b6a54d3f1cc Mon Sep 17 00:00:00 2001 From: Keith Dahlby Date: Wed, 21 Oct 2015 05:15:15 -0500 Subject: [PATCH 2/2] Misc PackBuilder cleanup --- LibGit2Sharp/PackBuilder.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/LibGit2Sharp/PackBuilder.cs b/LibGit2Sharp/PackBuilder.cs index ac105be64..1f797c9bf 100644 --- a/LibGit2Sharp/PackBuilder.cs +++ b/LibGit2Sharp/PackBuilder.cs @@ -11,7 +11,6 @@ namespace LibGit2Sharp public sealed class PackBuilder : IDisposable { private readonly PackBuilderSafeHandle packBuilderHandle; - private readonly Repository repo; /// /// Constructs a PackBuilder for a . @@ -20,8 +19,7 @@ internal PackBuilder(Repository repository) { Ensure.ArgumentNotNull(repository, "repository"); - repo = repository; - packBuilderHandle = Proxy.git_packbuilder_new(repo.Handle); + packBuilderHandle = Proxy.git_packbuilder_new(repository.Handle); } /// @@ -143,6 +141,9 @@ public struct PackBuilderResults /// public sealed class PackBuilderOptions { + private string path; + private int nThreads; + /// /// Constructor /// @@ -188,7 +189,7 @@ public int MaximumNumberOfThreads { if (value < 0) { - throw new ArgumentException("Argument can not be negative", "MaximumNumberOfThreads"); + throw new ArgumentException("Argument can not be negative", "value"); } nThreads = value; @@ -197,10 +198,6 @@ public int MaximumNumberOfThreads { return nThreads; } - } - - private string path; - private int nThreads; } }