@@ -19,8 +19,8 @@ public static partial class Commands
19
19
/// <param name="path">The path of the file within the working directory.</param>
20
20
public static void Stage ( IRepository repository , string path )
21
21
{
22
- Ensure . ArgumentNotNull ( repository , " repository" ) ;
23
- Ensure . ArgumentNotNull ( path , " path" ) ;
22
+ Ensure . ArgumentNotNull ( repository , nameof ( repository ) ) ;
23
+ Ensure . ArgumentNotNull ( path , nameof ( path ) ) ;
24
24
25
25
Stage ( repository , new [ ] { path } , null ) ;
26
26
}
@@ -35,8 +35,8 @@ public static void Stage(IRepository repository, string path)
35
35
/// <param name="stageOptions">Determines how paths will be staged.</param>
36
36
public static void Stage ( IRepository repository , string path , StageOptions stageOptions )
37
37
{
38
- Ensure . ArgumentNotNull ( repository , " repository" ) ;
39
- Ensure . ArgumentNotNull ( path , " path" ) ;
38
+ Ensure . ArgumentNotNull ( repository , nameof ( repository ) ) ;
39
+ Ensure . ArgumentNotNull ( path , nameof ( path ) ) ;
40
40
41
41
Stage ( repository , new [ ] { path } , stageOptions ) ;
42
42
}
@@ -63,8 +63,8 @@ public static void Stage(IRepository repository, IEnumerable<string> paths)
63
63
/// <param name="stageOptions">Determines how paths will be staged.</param>
64
64
public static void Stage ( IRepository repository , IEnumerable < string > paths , StageOptions stageOptions )
65
65
{
66
- Ensure . ArgumentNotNull ( repository , " repository" ) ;
67
- Ensure . ArgumentNotNull ( paths , " paths" ) ;
66
+ Ensure . ArgumentNotNull ( repository , nameof ( repository ) ) ;
67
+ Ensure . ArgumentNotNull ( paths , nameof ( paths ) ) ;
68
68
69
69
DiffModifiers diffModifiers = DiffModifiers . IncludeUntracked ;
70
70
ExplicitPathsOptions explicitPathsOptions = stageOptions != null ? stageOptions . ExplicitPathsOptions : null ;
@@ -160,8 +160,8 @@ public static void Unstage(IRepository repository, string path)
160
160
/// </param>
161
161
public static void Unstage ( IRepository repository , string path , ExplicitPathsOptions explicitPathsOptions )
162
162
{
163
- Ensure . ArgumentNotNull ( repository , " repository" ) ;
164
- Ensure . ArgumentNotNull ( path , " path" ) ;
163
+ Ensure . ArgumentNotNull ( repository , nameof ( repository ) ) ;
164
+ Ensure . ArgumentNotNull ( path , nameof ( path ) ) ;
165
165
166
166
Unstage ( repository , new [ ] { path } , explicitPathsOptions ) ;
167
167
}
@@ -187,8 +187,8 @@ public static void Unstage(IRepository repository, IEnumerable<string> paths)
187
187
/// </param>
188
188
public static void Unstage ( IRepository repository , IEnumerable < string > paths , ExplicitPathsOptions explicitPathsOptions )
189
189
{
190
- Ensure . ArgumentNotNull ( repository , " repository" ) ;
191
- Ensure . ArgumentNotNull ( paths , " paths" ) ;
190
+ Ensure . ArgumentNotNull ( repository , nameof ( repository ) ) ;
191
+ Ensure . ArgumentNotNull ( paths , nameof ( paths ) ) ;
192
192
193
193
if ( repository . Info . IsHeadUnborn )
194
194
{
@@ -222,9 +222,9 @@ public static void Move(IRepository repository, string sourcePath, string destin
222
222
/// <param name="destinationPaths">The target paths of the files within the working directory.</param>
223
223
public static void Move ( IRepository repository , IEnumerable < string > sourcePaths , IEnumerable < string > destinationPaths )
224
224
{
225
- Ensure . ArgumentNotNull ( repository , " repository" ) ;
226
- Ensure . ArgumentNotNull ( sourcePaths , " sourcePaths" ) ;
227
- Ensure . ArgumentNotNull ( destinationPaths , " destinationPaths" ) ;
225
+ Ensure . ArgumentNotNull ( repository , nameof ( repository ) ) ;
226
+ Ensure . ArgumentNotNull ( sourcePaths , nameof ( sourcePaths ) ) ;
227
+ Ensure . ArgumentNotNull ( destinationPaths , nameof ( destinationPaths ) ) ;
228
228
229
229
//TODO: Move() should support following use cases:
230
230
// - Moving a file under a directory ('file' and 'dir' -> 'dir/file')
0 commit comments