Skip to content

Commit 907d222

Browse files
committed
make SubmoduleCollection.GetEnumerator virtual
This is so it can be faked in unit tests.
1 parent 0e94aa5 commit 907d222

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LibGit2Sharp/SubmoduleCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public virtual Submodule this[string name]
5252
/// Returns an enumerator that iterates through the collection.
5353
/// </summary>
5454
/// <returns>An <see cref="IEnumerator{T}"/> object that can be used to iterate through the collection.</returns>
55-
public IEnumerator<Submodule> GetEnumerator()
55+
public virtual IEnumerator<Submodule> GetEnumerator()
5656
{
5757
return Proxy.git_submodule_foreach(repo.Handle, (h, n) => LaxUtf8Marshaler.FromNative(n))
5858
.Select(n => this[n])

0 commit comments

Comments
 (0)