示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GitHubActionsProvider"/> class.
 /// </summary>
 /// <param name="environment">The environment.</param>
 public GitHubActionsProvider(ICakeEnvironment environment)
 {
     if (environment == null)
     {
         throw new ArgumentNullException(nameof(environment));
     }
     _environment = environment;
     Environment  = new GitHubActionsEnvironmentInfo(environment);
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GitHubActionsCommands"/> class.
 /// </summary>
 /// <param name="environment">The environment.</param>
 /// <param name="actionsEnvironment">The actions environment.</param>
 /// <param name="fileSystem">The file system.</param>
 /// <param name="createHttpClient">The http client factory.</param>
 public GitHubActionsCommands(
     ICakeEnvironment environment,
     IFileSystem fileSystem,
     GitHubActionsEnvironmentInfo actionsEnvironment,
     Func <string, HttpClient> createHttpClient)
 {
     _environment        = environment ?? throw new ArgumentNullException(nameof(environment));
     _fileSystem         = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
     _actionsEnvironment = actionsEnvironment ?? throw new ArgumentNullException(nameof(actionsEnvironment));
     _createHttpClient   = createHttpClient ?? throw new ArgumentNullException(nameof(createHttpClient));
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GitHubActionsProvider"/> class.
 /// </summary>
 /// <param name="environment">The environment.</param>
 /// <param name="fileSystem">The file system.</param>
 public GitHubActionsProvider(ICakeEnvironment environment, IFileSystem fileSystem)
 {
     _environment = environment ?? throw new ArgumentNullException(nameof(environment));
     Environment  = new GitHubActionsEnvironmentInfo(environment);
     Commands     = new GitHubActionsCommands(environment, fileSystem, Environment, _ => new System.Net.Http.HttpClient());
 }