Satisfying() public method

Return the set of versions that satisfy this range.
public Satisfying ( IEnumerable versions ) : IEnumerable
versions IEnumerable The versions to check.
return IEnumerable
Exemplo n.º 1
0
 /// <summary>
 /// Return the set of version strings that satisfy a given range.
 /// Invalid version specifications are skipped.
 /// </summary>
 /// <param name="rangeSpec">The range specification.</param>
 /// <param name="versions">The version strings to check.</param>
 /// <param name="loose">When true, be more forgiving of some invalid version specifications.</param>
 /// <returns>An IEnumerable of satisfying version strings.</returns>
 public static IEnumerable<string> Satisfying(string rangeSpec, IEnumerable<string> versions, bool loose=false)
 {
     var range = new Range(rangeSpec);
     return range.Satisfying(versions);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Return the set of version strings that satisfy a given range.
        /// Invalid version specifications are skipped.
        /// </summary>
        /// <param name="rangeSpec">The range specification.</param>
        /// <param name="versions">The version strings to check.</param>
        /// <param name="loose">When true, be more forgiving of some invalid version specifications.</param>
        /// <returns>An IEnumerable of satisfying version strings.</returns>
        public static IEnumerable <string> Satisfying(string rangeSpec, IEnumerable <string> versions, bool loose = false)
        {
            var range = new Range(rangeSpec);

            return(range.Satisfying(versions));
        }