C# Class SemVer.Range

Specifies valid versions.
Afficher le fichier Open project: Starcounter/Warehouse Class Usage Examples

Méthodes publiques

Méthode Description
IsSatisfied ( System.Version version ) : bool

Determine whether the given version satisfies this range.

IsSatisfied ( string versionString, bool loose = false ) : bool

Determine whether the given version satisfies this range. With an invalid version this method returns false.

IsSatisfied ( string rangeSpec, string versionString, bool loose = false ) : bool

Determine whether the given version satisfies a given range. With an invalid version this method returns false.

MaxSatisfying ( IEnumerable versions ) : System.Version

Return the maximum version that satisfies this range.

MaxSatisfying ( IEnumerable versionStrings, bool loose = false ) : string

Return the maximum version that satisfies this range.

MaxSatisfying ( string rangeSpec, IEnumerable versionStrings, bool loose = false ) : string

Return the maximum version that satisfies a given range.

Range ( string rangeSpec, bool loose = false ) : System

Construct a new range from a range specification.

Satisfying ( IEnumerable versions ) : IEnumerable

Return the set of versions that satisfy this range.

Satisfying ( IEnumerable versions, bool loose = false ) : IEnumerable

Return the set of version strings that satisfy this range. Invalid version specifications are skipped.

Satisfying ( string rangeSpec, IEnumerable versions, bool loose = false ) : IEnumerable

Return the set of version strings that satisfy a given range. Invalid version specifications are skipped.

Private Methods

Méthode Description
ValidVersions ( IEnumerable versionStrings, bool loose ) : IEnumerable

Method Details

IsSatisfied() public méthode

Determine whether the given version satisfies this range.
public IsSatisfied ( System.Version version ) : bool
version System.Version The version to check.
Résultat bool

IsSatisfied() public méthode

Determine whether the given version satisfies this range. With an invalid version this method returns false.
public IsSatisfied ( string versionString, bool loose = false ) : bool
versionString string The version to check.
loose bool When true, be more forgiving of some invalid version specifications.
Résultat bool

IsSatisfied() public static méthode

Determine whether the given version satisfies a given range. With an invalid version this method returns false.
public static IsSatisfied ( string rangeSpec, string versionString, bool loose = false ) : bool
rangeSpec string The range specification.
versionString string The version to check.
loose bool When true, be more forgiving of some invalid version specifications.
Résultat bool

MaxSatisfying() public méthode

Return the maximum version that satisfies this range.
public MaxSatisfying ( IEnumerable versions ) : System.Version
versions IEnumerable The versions to select from.
Résultat System.Version

MaxSatisfying() public méthode

Return the maximum version that satisfies this range.
public MaxSatisfying ( IEnumerable versionStrings, bool loose = false ) : string
versionStrings IEnumerable The version strings to select from.
loose bool When true, be more forgiving of some invalid version specifications.
Résultat string

MaxSatisfying() public static méthode

Return the maximum version that satisfies a given range.
public static MaxSatisfying ( string rangeSpec, IEnumerable versionStrings, bool loose = false ) : string
rangeSpec string The range specification.
versionStrings IEnumerable The version strings to select from.
loose bool When true, be more forgiving of some invalid version specifications.
Résultat string

Range() public méthode

Construct a new range from a range specification.
Thrown when the range specification is invalid.
public Range ( string rangeSpec, bool loose = false ) : System
rangeSpec string The range specification string.
loose bool When true, be more forgiving of some invalid version specifications.
Résultat System

Satisfying() public méthode

Return the set of versions that satisfy this range.
public Satisfying ( IEnumerable versions ) : IEnumerable
versions IEnumerable The versions to check.
Résultat IEnumerable

Satisfying() public méthode

Return the set of version strings that satisfy this range. Invalid version specifications are skipped.
public Satisfying ( IEnumerable versions, bool loose = false ) : IEnumerable
versions IEnumerable The version strings to check.
loose bool When true, be more forgiving of some invalid version specifications.
Résultat IEnumerable

Satisfying() public static méthode

Return the set of version strings that satisfy a given range. Invalid version specifications are skipped.
public static Satisfying ( string rangeSpec, IEnumerable versions, bool loose = false ) : IEnumerable
rangeSpec string The range specification.
versions IEnumerable The version strings to check.
loose bool When true, be more forgiving of some invalid version specifications.
Résultat IEnumerable