C# Класс SemVer.Range

Specifies valid versions.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
ValidVersions ( IEnumerable versionStrings, bool loose ) : IEnumerable

Описание методов

IsSatisfied() публичный Метод

Determine whether the given version satisfies this range.
public IsSatisfied ( System.Version version ) : bool
version System.Version The version to check.
Результат bool

IsSatisfied() публичный Метод

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.
Результат bool

IsSatisfied() публичный статический Метод

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.
Результат bool

MaxSatisfying() публичный Метод

Return the maximum version that satisfies this range.
public MaxSatisfying ( IEnumerable versions ) : System.Version
versions IEnumerable The versions to select from.
Результат System.Version

MaxSatisfying() публичный Метод

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.
Результат string

MaxSatisfying() публичный статический Метод

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.
Результат string

Range() публичный Метод

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.
Результат System

Satisfying() публичный Метод

Return the set of versions that satisfy this range.
public Satisfying ( IEnumerable versions ) : IEnumerable
versions IEnumerable The versions to check.
Результат IEnumerable

Satisfying() публичный Метод

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.
Результат IEnumerable

Satisfying() публичный статический Метод

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.
Результат IEnumerable