本文整理匯總了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();
}
示例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);
}
示例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));
}
示例4: Find
public IRemoteNuget Find(Dependency query)
{
var feed = GetNugetFeed();
if (Mode == UpdateMode.Float || query.IsFloat())
{
return feed.FindLatest(query);
}
return feed.Find(query);
}
示例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);
}
}
示例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));
}
示例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);
}
示例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);
}
示例9: ShouldUpdate
public bool ShouldUpdate(Dependency configured)
{
return (IsTransitive() || Operation == OperationType.Update) && (ShouldForce(configured) || configured.IsFloat());
}
示例10: Matches
public bool Matches(Dependency dependency)
{
return dependency.IsFloat();
}
示例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);
}
示例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();
}