本文整理汇总了C#中Dependency.IsNewer方法的典型用法代码示例。如果您正苦于以下问题:C# Dependency.IsNewer方法的具体用法?C# Dependency.IsNewer怎么用?C# Dependency.IsNewer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dependency
的用法示例。
在下文中一共展示了Dependency.IsNewer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestIsNewer
public void TestIsNewer()
{
Dependency dep09 = new Dependency("test", "artifact1", "0.9");
Dependency dep = new Dependency("test", "artifact1", "1.0");
Dependency dep2 = new Dependency("test", "artifact1", "2.0");
Dependency dep11 = new Dependency("test", "artifact1", "1.1");
Dependency dep101 = new Dependency("test", "artifact1", "1.0.1");
Dependency dep31 = new Dependency("test", "artifact1", "3.1");
Dependency dep32alpha = new Dependency("test", "artifact1", "3.2-alpha");
Dependency dep32beta = new Dependency("test", "artifact1", "3.2-beta");
Assert.False(dep09.IsNewer(dep));
Assert.False(dep.IsNewer(dep));
Assert.True(dep2.IsNewer(dep));
Assert.True(dep11.IsNewer(dep));
Assert.True(dep101.IsNewer(dep));
Assert.True(dep31.IsNewer(dep));
Assert.True(dep32alpha.IsNewer(dep31));
Assert.True(dep32alpha.IsNewer(dep));
Assert.True(dep32beta.IsNewer(dep32alpha));
}