SemVer.Range.IsSatisfied C# (CSharp) Méthode

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
        public bool IsSatisfied(Version version)
        {
            return _comparatorSets.Any(s => s.IsSatisfied(version));
        }

Same methods

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

Usage Example

Exemple #1
0
        public async Task <IList <ServiceInformation> > FindServiceInstancesWithVersionAsync(string name, string version)
        {
            var instances = await FindServiceInstancesAsync(name);

            var range = new SemVer.Range(version);

            return(instances.Where(x => range.IsSatisfied(x.Version)).ToArray());
        }
All Usage Examples Of SemVer.Range::IsSatisfied