File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
src/GitVersion.LibGit2Sharp/Git Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change
1
+ using GitVersion . Extensions ;
2
+
1
3
namespace GitVersion ;
2
4
3
5
internal sealed class RemoteCollection : IRemoteCollection
4
6
{
5
7
private readonly LibGit2Sharp . RemoteCollection innerCollection ;
6
- internal RemoteCollection ( LibGit2Sharp . RemoteCollection collection ) => this . innerCollection = collection ;
7
8
8
- public IEnumerator < IRemote > GetEnumerator ( ) => this . innerCollection . Select ( reference => new Remote ( reference ) ) . GetEnumerator ( ) ;
9
+ internal RemoteCollection ( LibGit2Sharp . RemoteCollection collection )
10
+ => this . innerCollection = collection . NotNull ( ) ;
11
+
12
+ public IEnumerator < IRemote > GetEnumerator ( )
13
+ => this . innerCollection . Select ( reference => new Remote ( reference ) ) . GetEnumerator ( ) ;
14
+
9
15
IEnumerator IEnumerable . GetEnumerator ( ) => GetEnumerator ( ) ;
10
16
11
17
public IRemote ? this [ string name ]
@@ -18,5 +24,7 @@ public IRemote? this[string name]
18
24
}
19
25
20
26
public void Remove ( string remoteName ) => this . innerCollection . Remove ( remoteName ) ;
21
- public void Update ( string remoteName , string refSpec ) => this . innerCollection . Update ( remoteName , r => r . FetchRefSpecs . Add ( refSpec ) ) ;
27
+
28
+ public void Update ( string remoteName , string refSpec )
29
+ => this . innerCollection . Update ( remoteName , r => r . FetchRefSpecs . Add ( refSpec ) ) ;
22
30
}
You can’t perform that action at this time.
0 commit comments