コード例 #1
0
        private static List <string> AddProvisioners(VagrantProvisionerSettings settings,
                                                     IEnumerable <string> provisioners)
        {
            var l = settings.Provisioners.ToList();

            l.AddRange(provisioners);
            settings.RunProvisioners = l.Any();
            return(l);
        }
コード例 #2
0
 /// <summary>
 ///     Adds the given provisioners to run during the operation
 /// </summary>
 /// <param name="settings">The settings</param>
 /// <param name="provisioners">List of provisioner names to run</param>
 /// <returns>The updated settings object</returns>
 public static VagrantProvisionerSettings WithProvisioners(this VagrantProvisionerSettings settings,
                                                           IEnumerable <string> provisioners)
 {
     settings.Provisioners = AddProvisioners(settings, provisioners);
     return(settings);
 }
コード例 #3
0
 /// <summary>
 ///     Adds the given provisioners to run during the operation
 /// </summary>
 /// <param name="settings">The settings</param>
 /// <param name="provisioners">Collection of provisioner names to run</param>
 /// <returns>The updated settings object</returns>
 public static VagrantProvisionerSettings WithProvisioners(this VagrantProvisionerSettings settings,
                                                           params string[] provisioners)
 {
     settings.Provisioners = AddProvisioners(settings, provisioners);
     return(settings);
 }
コード例 #4
0
 /// <summary>
 ///     Force the provisioners to run during the operation
 /// </summary>
 /// <param name="settings">The settings</param>
 /// <param name="run"><c>true</c> to run provisioners, <c>false</c> to skip</param>
 /// <returns>The updated settings object</returns>
 public static VagrantProvisionerSettings RunProvisioners(this VagrantProvisionerSettings settings,
                                                          bool run = true)
 {
     settings.RunProvisioners = run;
     return(settings);
 }