Пример #1
0
        protected override IRemoteNuget findLatest(Dependency query)
        {
            var floatedResult = GetLatest().SingleOrDefault(x => query.MatchesName(x.Name));
            if (floatedResult != null && query.Mode == UpdateMode.Fixed && floatedResult.IsUpdateFor(query))
            {
                return null;
            }

            return floatedResult;
        }
Пример #2
0
        protected override IRemoteNuget findLatest(Dependency query)
        {
            var floatedResult = GetLatest().SingleOrDefault(x => query.MatchesName(x.Name));
            RippleLog.Debug("Looking for " + query + " in " + Url + "; Found " + floatedResult);
            if (floatedResult != null && query.Mode == UpdateMode.Fixed && floatedResult.IsUpdateFor(query))
            {
                return null;
            }

            return floatedResult;
        }
Пример #3
0
        private IRemoteNuget getLatestFromFloatingFeed(INugetFeed feed, Dependency dependency)
        {
            var floatingFeed = feed as IFloatingFeed;

            if (floatingFeed == null)
            {
                return(null);
            }

            var floatedResult = floatingFeed.GetLatest().SingleOrDefault(x => dependency.MatchesName(x.Name));

            if (floatedResult != null && dependency.Mode == UpdateMode.Fixed && floatedResult.IsUpdateFor(dependency))
            {
                return(null);
            }

            return(floatedResult);
        }
Пример #4
0
 public IRemoteNuget LatestFor(Dependency dependency)
 {
     throwIfNeeded(dependency, UpdateMode.Float);
     return GetLatest().SingleOrDefault(x => dependency.MatchesName(x.Name));
 }
Пример #5
0
        protected override IRemoteNuget find(Dependency query)
        {
            throwIfNeeded(query);

            if (query.IsFloat() || query.Version.IsEmpty())
            {
                return Nugets
                    .OrderByDescending(x => x.Version)
                    .FirstOrDefault(x => query.MatchesName(x.Name));
            }

            var version = SemanticVersion.Parse(query.Version);
            var matching = Nugets.Where(x => query.MatchesName(x.Name));

            if (query.DetermineStability(_feed.Stability) == NugetStability.ReleasedOnly)
            {
                return matching.FirstOrDefault(x => x.Version.SpecialVersion.IsEmpty() && x.Version.Equals(version));
            }

            return matching.FirstOrDefault(x => x.Version.Version.Equals(version.Version));
        }
Пример #6
0
        private IRemoteNuget getLatestFromFloatingFeed(INugetFeed feed, Dependency dependency)
        {
            var floatingFeed = feed as IFloatingFeed;
            if (floatingFeed == null) return null;

            var floatedResult = floatingFeed.GetLatest().SingleOrDefault(x => dependency.MatchesName(x.Name));
            if (floatedResult != null && dependency.Mode == UpdateMode.Fixed && floatedResult.IsUpdateFor(dependency))
            {
                return null;
            }

            return floatedResult;
        }
Пример #7
0
 public virtual INugetFile Find(Dependency query)
 {
     return Dependencies.FirstOrDefault(x => query.MatchesName(x.Name) && x.Version.Equals(query.SemanticVersion()));
 }
Пример #8
0
 public bool Matches(Dependency dependency, string assembly)
 {
     return dependency.MatchesName(Package) && Assembly.Replace(".dll", "").EqualsIgnoreCase(assembly);
 }
Пример #9
0
        protected override IRemoteNuget find(Dependency query)
        {
            RippleLog.Debug("Searching for {0} in {1}".ToFormat(query, _directory));

            SemanticVersion version;
            if (!SemanticVersion.TryParse(query.Version, out version))
            {
                RippleLog.Debug("Could not find exact for " + query);
                return null;
            }

            return findMatching(nuget => query.MatchesName(nuget.Name) && nuget.Version == version);
        }
Пример #10
0
        protected override IRemoteNuget findLatest(Dependency query)
        {
            RippleLog.Debug("Searching for latest of {0} in {1}".ToFormat(query, _directory));

            var nugets = files
                .Where(x => query.MatchesName(x.Name) && (!x.IsPreRelease || (x.IsPreRelease && query.DetermineStability(_stability) == NugetStability.Anything)))
                .ToList();

            var nuget = nugets
                .OrderByDescending(x => x.Version)
                .FirstOrDefault();

            if (nuget == null)
            {
                return null;
            }

            return new FileSystemNuget(nuget);
        }
 public bool Matches(Dependency dependency, string assembly)
 {
     return(dependency.MatchesName(Package) && Assembly.Replace(".dll", "").EqualsIgnoreCase(assembly));
 }