當前位置: 首頁>>代碼示例>>C#>>正文


C# Dependency.IsFloat方法代碼示例

本文整理匯總了C#中ripple.Model.Dependency.IsFloat方法的典型用法代碼示例。如果您正苦於以下問題:C# Dependency.IsFloat方法的具體用法?C# Dependency.IsFloat怎麽用?C# Dependency.IsFloat使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ripple.Model.Dependency的用法示例。


在下文中一共展示了Dependency.IsFloat方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: make_float

        public void make_float()
        {
            var dependency = new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed);
            dependency.Float();

            dependency.IsFloat().ShouldBeTrue();
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:7,代碼來源:DependencyTester.cs

示例2: NugetFor

        public virtual IRemoteNuget NugetFor(Solution solution, Dependency dependency)
        {
            IRemoteNuget nuget = null;
            var feeds = feedsFor(solution);
            foreach (var feed in feeds)
            {
                nuget = getLatestFromFloatingFeed(feed, dependency);
                if (nuget != null) break;

                if (dependency.IsFloat() || dependency.Version.IsEmpty())
                {
                    nuget = feed.FindLatest(dependency);
                    if (nuget != null) break;
                }

                nuget = feed.Find(dependency);
                if (nuget != null) break;
            }

            if (nuget == null)
            {
                RippleAssert.Fail("Could not find " + dependency);
            }

            return remoteOrCached(solution, nuget);
        }
開發者ID:bobpace,項目名稱:ripple,代碼行數:26,代碼來源:FeedService.cs

示例3: Find

        public IRemoteNuget Find(Dependency query)
        {
            if (query.IsFloat() || query.Version.IsEmpty())
            {
                return _nugets.FirstOrDefault(x => x.Name == query.Name);
            }

            var version = SemanticVersion.Parse(query.Version);
            return _nugets.FirstOrDefault(x => x.Name == query.Name && x.Version.Equals(version));
        }
開發者ID:bobpace,項目名稱:ripple,代碼行數:10,代碼來源:StubFeed.cs

示例4: Find

        public IRemoteNuget Find(Dependency query)
        {
            var feed = GetNugetFeed();
            if (Mode == UpdateMode.Float || query.IsFloat())
            {
                return feed.FindLatest(query);
            }

            return feed.Find(query);
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:10,代碼來源:Feed.cs

示例5: Filter

        public void Filter(Solution solution, Dependency dependency, NugetResult result)
        {
            if (!dependency.IsFloat() || !result.Found) return;

            var latest = NugetSearch.FindLatestByName(solution, dependency.Name);
            if (!latest.Found)
            {
                return;
            }

            if (latest.Nuget.Version > result.Nuget.Version)
            {
                result.Import(latest);
            }
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:15,代碼來源:EnsureLatestNuget.cs

示例6: find

        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));
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:21,代碼來源:StubFeed.cs

示例7: nugetFor

        private IRemoteNuget nugetFor(Dependency dependency, bool retrying = false)
        {
            IRemoteNuget nuget = null;
            var feeds = _connectivity.FeedsFor(_solution);
            foreach (var feed in feeds)
            {
                _connectivity.IfOnline(feed, x => nuget = getLatestFromFloatingFeed(x, dependency));
                if (nuget != null) break;

                if (dependency.IsFloat() || dependency.Version.IsEmpty())
                {
                    _connectivity.IfOnline(feed, x => nuget = x.FindLatest(dependency));
                    if (nuget != null) break;
                }

                _connectivity.IfOnline(feed, x => nuget = x.Find(dependency));
                if (nuget != null) break;
            }

            if (nuget == null)
            {
                if (_connectivity.AllOffline(feeds) && !retrying)
                {
                    return nugetFor(dependency, true);
                }

                feeds.OfType<FloatingFileSystemNugetFeed>()
                    .Each(files => files.DumpLatest());

                RippleAssert.Fail("Could not find " + dependency);
            }

            return remoteOrCached(nuget);
        }
開發者ID:4lexm,項目名稱:ripple,代碼行數:34,代碼來源:FeedService.cs

示例8: isUpdate

        private bool isUpdate(IRemoteNuget latest, Dependency dependency)
        {
            if (latest == null) return false;

            var localDependencies = _solution.LocalDependencies();
            if (localDependencies.Has(dependency))
            {
                var local = localDependencies.Get(dependency);
                return latest.IsUpdateFor(local);
            }

            if (dependency.IsFloat())
            {
                return true;
            }

            return latest.IsUpdateFor(dependency);
        }
開發者ID:4lexm,項目名稱:ripple,代碼行數:18,代碼來源:FeedService.cs

示例9: ShouldUpdate

 public bool ShouldUpdate(Dependency configured)
 {
     return (IsTransitive() || Operation == OperationType.Update) && (ShouldForce(configured) || configured.IsFloat());
 }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:4,代碼來源:NugetPlanRequest.cs

示例10: Matches

 public bool Matches(Dependency dependency)
 {
     return dependency.IsFloat();
 }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:4,代碼來源:FloatingFinder.cs

示例11: AddDependency

        public void AddDependency(Dependency dependency)
        {
            var dependencies = _document.DocumentElement.SelectSingleNode("//nuspec:dependencies", _xmlNamespaceManager);

            var element = _document.CreateElement("dependency");
            element.SetAttribute("id", dependency.Name);

            if (!dependency.IsFloat())
            {
                element.SetAttribute("version", dependency.Version);
            }

            dependencies.AppendChild(element);
        }
開發者ID:bobpace,項目名稱:ripple,代碼行數:14,代碼來源:NuspecDocument.cs

示例12: ShouldRestore

        public bool ShouldRestore(Dependency dependency, bool force = false)
        {
            if (!Has(dependency))
            {
                return true;
            }

            if (!force) return false;

            if (dependency.IsFloat()) return true;

            var local = Get(dependency);
            return local.Version != dependency.SemanticVersion();
        }
開發者ID:bobpace,項目名稱:ripple,代碼行數:14,代碼來源:LocalDependencies.cs


注:本文中的ripple.Model.Dependency.IsFloat方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。