public static Requirements ToRequirements([NotNull] this Runner runner, [NotNull] Requirements topLevelRequirements) { #region Sanity checks if (runner == null) { throw new ArgumentNullException("runner"); } if (topLevelRequirements == null) { throw new ArgumentNullException("topLevelRequirements"); } #endregion var requirements = new Requirements(runner.InterfaceUri, runner.Command ?? Command.NameRun, topLevelRequirements.Architecture); requirements.CopyVersionRestrictions(from: runner); requirements.CopyVersionRestrictions(from: topLevelRequirements); return(requirements); }
public static Requirements ToRequirements([NotNull] this Restriction dependency, [NotNull] Requirements topLevelRequirements) { #region Sanity checks if (dependency == null) { throw new ArgumentNullException("dependency"); } if (topLevelRequirements == null) { throw new ArgumentNullException("topLevelRequirements"); } #endregion var requirements = new Requirements(dependency.InterfaceUri, "", topLevelRequirements.Architecture); requirements.Distributions.AddRange(dependency.Distributions); requirements.CopyVersionRestrictions(from: dependency); requirements.CopyVersionRestrictions(from: topLevelRequirements); return(requirements); }
public static Requirements ToRequirements([NotNull] this Runner runner, [NotNull] Requirements topLevelRequirements) { #region Sanity checks if (runner == null) throw new ArgumentNullException("runner"); if (topLevelRequirements == null) throw new ArgumentNullException("topLevelRequirements"); #endregion var requirements = new Requirements(runner.InterfaceUri, runner.Command ?? Command.NameRun, topLevelRequirements.Architecture); requirements.CopyVersionRestrictions(from: runner); requirements.CopyVersionRestrictions(from: topLevelRequirements); return requirements; }
public static Requirements ToRequirements([NotNull] this Restriction dependency, [NotNull] Requirements topLevelRequirements) { #region Sanity checks if (dependency == null) throw new ArgumentNullException("dependency"); if (topLevelRequirements == null) throw new ArgumentNullException("topLevelRequirements"); #endregion var requirements = new Requirements(dependency.InterfaceUri, "", topLevelRequirements.Architecture); requirements.Distributions.AddRange(dependency.Distributions); requirements.CopyVersionRestrictions(from: dependency); requirements.CopyVersionRestrictions(from: topLevelRequirements); return requirements; }