@@ -329,25 +329,25 @@ public static Job WithEnvironmentVariable(this Job job, [NotNull] string key, [N
329
329
/// </summary>
330
330
/// <param name="job"></param>
331
331
/// <param name="packageName">The NuGet package name</param>
332
- /// <param name="packageVersion">The NuGet package version</param>
332
+ /// <param name="packageVersion">(optional)The NuGet package version</param>
333
+ /// <param name="source">(optional)Indicate the URI of the NuGet package source to use during the restore operation.</param>
334
+ /// <param name="prerelease">(optional)Allows prerelease packages to be installed.</param>
333
335
/// <returns></returns>
334
- public static Job WithNuGet ( this Job job , string packageName , string packageVersion ) => job . WithCore ( j => j . Infrastructure . NuGetReferences = new NuGetReferenceList ( j . Infrastructure . NuGetReferences ?? Array . Empty < NuGetReference > ( ) ) { new NuGetReference ( packageName , packageVersion ) } ) ;
335
-
336
- /// <summary>
337
- /// Runs the job with a specific NuGet dependency which will be resolved during the Job build process
338
- /// </summary>
339
- /// <param name="job"></param>
340
- /// <param name="packageName">The NuGet package name, the latest version will be resolved</param>
341
- /// <returns></returns>
342
- public static Job WithNuGet ( this Job job , string packageName ) => job . WithNuGet ( packageName , string . Empty ) ;
336
+ public static Job WithNuGet ( this Job job , string packageName , string packageVersion = null , Uri source = null , bool prerelease = false ) =>
337
+ job . WithCore ( j => j . Infrastructure . NuGetReferences =
338
+ new NuGetReferenceList ( j . Infrastructure . NuGetReferences ?? Array . Empty < NuGetReference > ( ) )
339
+ {
340
+ new NuGetReference ( packageName , packageVersion , source , prerelease )
341
+ } ) ;
343
342
344
343
/// <summary>
345
344
/// Runs the job with a specific NuGet dependencies which will be resolved during the Job build process
346
345
/// </summary>
347
346
/// <param name="job"></param>
348
347
/// <param name="nuGetReferences">A collection of NuGet dependencies</param>
349
348
/// <returns></returns>
350
- public static Job WithNuGet ( this Job job , NuGetReferenceList nuGetReferences ) => job . WithCore ( j => j . Infrastructure . NuGetReferences = nuGetReferences ) ;
349
+ public static Job WithNuGet ( this Job job , NuGetReferenceList nuGetReferences ) =>
350
+ job . WithCore ( j => j . Infrastructure . NuGetReferences = nuGetReferences ) ;
351
351
352
352
// Accuracy
353
353
/// <summary>
0 commit comments