示例#1
0
 /// <summary>
 ///     Clears all sources that have been defined so far.
 /// </summary>
 /// <param name="settings">The settings</param>
 /// <param name="clean">Whether to clean sources first.</param>
 /// <returns>The updated settings object</returns>
 public static VagrantPluginInstallSettings CleanFirst(this VagrantPluginInstallSettings settings,
                                                       bool clean = true)
 {
     settings.CleanSources = clean;
     return(settings);
 }
示例#2
0
 /// <summary>
 ///     The version of the plugin to install.
 /// </summary>
 /// <param name="settings">The settings</param>
 /// <param name="version">
 ///     The version or version constraint to use (as per
 ///     <see cref="VagrantPluginInstallSettings.Version" />)
 /// </param>
 /// <returns>The updated settings object</returns>
 public static VagrantPluginInstallSettings ConstrainVersion(this VagrantPluginInstallSettings settings,
                                                             string version)
 {
     settings.Version = version;
     return(settings);
 }
示例#3
0
 /// <summary>
 ///     Sets the <see cref="VagrantPluginInstallSettings.EntryPoint" /> for a plugin.
 /// </summary>
 /// <param name="settings">The settings</param>
 /// <param name="entryPoint">The entry point for the plugin</param>
 /// <returns>The updated settings object</returns>
 public static VagrantPluginInstallSettings SetEntryPoint(this VagrantPluginInstallSettings settings,
                                                          string entryPoint)
 {
     settings.EntryPoint = entryPoint;
     return(settings);
 }
示例#4
0
 /// <summary>
 ///     Adds a source from which to fetch a plugin.
 /// </summary>
 /// <param name="settings">The settings</param>
 /// <param name="source">The source from which to install</param>
 /// <returns>The updated settings object</returns>
 public static VagrantPluginInstallSettings FromSource(this VagrantPluginInstallSettings settings, string source)
 {
     settings.Source = source;
     return(settings);
 }