示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GoCDProvider"/> class.
 /// </summary>
 /// <param name="environment">The environment.</param>
 public GoCDProvider(ICakeEnvironment environment)
 {
     if (environment == null)
     {
         throw new ArgumentNullException(nameof(environment));
     }
     _environment = environment;
     Environment  = new GoCDEnvironmentInfo(environment);
 }
示例#2
0
文件: GoCDProvider.cs 项目: jnm2/cake
        /// <summary>
        /// Initializes a new instance of the <see cref="GoCDProvider" /> class.
        /// </summary>
        /// <param name="environment">The environment.</param>
        /// <param name="cakeLog">The cake log.</param>
        public GoCDProvider(ICakeEnvironment environment, ICakeLog cakeLog)
        {
            if (environment == null)
            {
                throw new ArgumentNullException(nameof(environment));
            }

            if (cakeLog == null)
            {
                throw new ArgumentNullException(nameof(cakeLog));
            }

            _environment = environment;
            _cakeLog     = cakeLog;
            Environment  = new GoCDEnvironmentInfo(environment);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="GoCDProvider" /> class.
 /// </summary>
 /// <param name="environment">The environment.</param>
 /// <param name="log">The cake log.</param>
 public GoCDProvider(ICakeEnvironment environment, ICakeLog log)
 {
     _environment = environment ?? throw new ArgumentNullException(nameof(environment));
     _log         = log ?? throw new ArgumentNullException(nameof(log));
     Environment  = new GoCDEnvironmentInfo(environment);
 }