/// <summary> /// Initializes a new instance of the <see cref="NuGetInstaller"/> class. /// </summary> /// <param name="fileSystem">The file system.</param> /// <param name="environment">The environment.</param> /// <param name="processRunner">The process runner.</param> /// <param name="nugetToolResolver">The NuGet tool resolver.</param> public NuGetInstaller(IFileSystem fileSystem, ICakeEnvironment environment, IProcessRunner processRunner, IToolResolver nugetToolResolver) : base(fileSystem, environment, processRunner) { _environment = environment; _nugetToolResolver = nugetToolResolver; }
/// <summary> /// Initializes a new instance of the <see cref="ToolDirectiveProcessor" /> class. /// </summary> /// <param name="fileSystem">The file system.</param> /// <param name="environment">The environment.</param> /// <param name="log">The log.</param> /// <param name="nugetToolResolver">The NuGet tool resolver.</param> public ToolDirectiveProcessor(IFileSystem fileSystem, ICakeEnvironment environment, ICakeLog log, INuGetToolResolver nugetToolResolver) : base(environment) { if (fileSystem == null) { throw new ArgumentNullException("fileSystem"); } if (environment == null) { throw new ArgumentNullException("environment"); } if (log == null) { throw new ArgumentNullException("log"); } if (nugetToolResolver == null) { throw new ArgumentNullException("nugetToolResolver"); } _fileSystem = fileSystem; _environment = environment; _log = log; _nugetToolResolver = nugetToolResolver; }
/// <summary> /// Initializes a new instance of the <see cref="NuGetSetApiKey"/> class. /// </summary> /// <param name="log">The log.</param> /// <param name="fileSystem">The file system.</param> /// <param name="environment">The environment.</param> /// <param name="processRunner">The process runner.</param> /// <param name="globber">The globber.</param> /// <param name="nugetToolResolver">The NuGet tool resolver.</param> public NuGetSetApiKey(ICakeLog log, IFileSystem fileSystem, ICakeEnvironment environment, IProcessRunner processRunner, IGlobber globber, IToolResolver nugetToolResolver) : base(fileSystem, environment, processRunner, globber) { _nugetToolResolver = nugetToolResolver; _environment = environment; }
/// <summary> /// Initializes a new instance of the <see cref="NuGetPacker"/> class. /// </summary> /// <param name="fileSystem">The file system.</param> /// <param name="environment">The environment.</param> /// <param name="processRunner">The process runner.</param> /// <param name="log">The log.</param> /// <param name="nugetToolResolver">The NuGet tool resolver</param> public NuGetPacker(IFileSystem fileSystem, ICakeEnvironment environment, IProcessRunner processRunner, ICakeLog log, IToolResolver nugetToolResolver) : base(fileSystem, environment, processRunner) { _fileSystem = fileSystem; _environment = environment; _processor = new NuspecProcessor(_fileSystem, _environment, log); _nugetToolResolver = nugetToolResolver; }
public DotnetBuildService( [Tag(WorkingDirectory)] Path workingDirectory, [NotNull] IToolResolver toolResolver, [NotNull] IProcessFactory processFactory, [NotNull] IProcessListener <BuildResult> processListener, [NotNull] IResponseFile responseFile) { _workingDirectory = workingDirectory; _toolResolver = toolResolver ?? throw new ArgumentNullException(nameof(toolResolver)); _processFactory = processFactory ?? throw new ArgumentNullException(nameof(processFactory)); _processListener = processListener ?? throw new ArgumentNullException(nameof(processListener)); _responseFile = responseFile ?? throw new ArgumentNullException(nameof(responseFile)); }
protected NuGetFixture() { Environment = Substitute.For <ICakeEnvironment>(); Environment.WorkingDirectory.Returns("/Working"); Process = Substitute.For <IProcess>(); Process.GetExitCode().Returns(0); ProcessRunner = Substitute.For <IProcessRunner>(); ProcessRunner.Start(Arg.Any <FilePath>(), Arg.Any <ProcessSettings>()).Returns(Process); NuGetToolResolver = Substitute.For <IToolResolver>(); NuGetToolResolver.Name.Returns("NuGet"); Log = Substitute.For <ICakeLog>(); FileSystem = new FakeFileSystem(true); // By default, there is a default tool. NuGetToolResolver.ResolveToolPath().Returns("/Working/tools/NuGet.exe"); FileSystem.GetCreatedFile("/Working/tools/NuGet.exe"); // Set standard output. Process.GetStandardOutput().Returns(new string[0]); }
/// <summary> /// Initializes a new instance of the <see cref="NuGetSources"/> class. /// </summary> /// <param name="fileSystem">The file system.</param> /// <param name="environment">The environment.</param> /// <param name="processRunner">The process runner.</param> /// <param name="globber">The globber.</param> /// <param name="nugetToolResolver">The NuGet tool resolver.</param> public NuGetSources(IFileSystem fileSystem, ICakeEnvironment environment, IProcessRunner processRunner, IGlobber globber, IToolResolver nugetToolResolver) : base(fileSystem, environment, processRunner, globber) { _nugetToolResolver = nugetToolResolver; }