本文整理汇总了C#中ripple.Model.Dependency.SemanticVersion方法的典型用法代码示例。如果您正苦于以下问题:C# Dependency.SemanticVersion方法的具体用法?C# Dependency.SemanticVersion怎么用?C# Dependency.SemanticVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ripple.Model.Dependency
的用法示例。
在下文中一共展示了Dependency.SemanticVersion方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsUpdateFor
public static bool IsUpdateFor(this IRemoteNuget nuget, Dependency dependency)
{
var version = dependency.SemanticVersion();
if (version == null) return false;
return nuget.Version > version;
}
示例2: Find
public virtual INugetFile Find(Dependency query)
{
return Dependencies.FirstOrDefault(x => query.MatchesName(x.Name) && x.Version.Equals(query.SemanticVersion()));
}
示例3: IsUpdateFor
public static bool IsUpdateFor(this IRemoteNuget nuget, Dependency dependency)
{
return nuget.Version > dependency.SemanticVersion();
}
示例4: Equals
public bool Equals(Dependency other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return Equals(other.Name, Name) && Equals(other.SemanticVersion(), SemanticVersion());
}
示例5: 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 && dependency.Version.IsNotEmpty() && nuget.Version < dependency.SemanticVersion())
{
nuget = null;
continue;
}
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);
}
示例6: 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();
}