本文整理汇总了C#中SystemId类的典型用法代码示例。如果您正苦于以下问题:C# SystemId类的具体用法?C# SystemId怎么用?C# SystemId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SystemId类属于命名空间,在下文中一共展示了SystemId类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SystemIdEmptyConstructorTest
public void SystemIdEmptyConstructorTest()
{
var _SystemId1 = new SystemId();
var _SystemId2 = new SystemId();
Assert.IsTrue(_SystemId1.Length > 0);
Assert.IsTrue(_SystemId2.Length > 0);
Assert.AreNotEqual(_SystemId1, _SystemId2);
}
示例2: op_Bigger_Bigger2_Test
public void op_Bigger_Bigger2_Test()
{
var _SystemId1 = new SystemId(23);
var _SystemId2 = new SystemId(5);
Assert.IsTrue(_SystemId1 > _SystemId2);
}
示例3: SystemIdUriConstructorTest
public void SystemIdUriConstructorTest()
{
var _SystemId = new SystemId(new Uri("http://example.org"));
Assert.AreEqual("http://example.org/", _SystemId.ToString());
Assert.AreEqual(19, _SystemId.Length);
}
示例4: SystemIdUInt32ConstructorTest
public void SystemIdUInt32ConstructorTest()
{
var _SystemId = new SystemId(23U);
Assert.AreEqual("23", _SystemId.ToString());
Assert.AreEqual(2, _SystemId.Length);
}
示例5: SystemIdsInHashSetTest
public void SystemIdsInHashSetTest()
{
var a = new SystemId(1);
var b = new SystemId(2);
var c = new SystemId(1);
var _HashSet = new HashSet<SystemId>();
Assert.AreEqual(0, _HashSet.Count);
_HashSet.Add(a);
Assert.AreEqual(1, _HashSet.Count);
_HashSet.Add(b);
Assert.AreEqual(2, _HashSet.Count);
_HashSet.Add(c);
Assert.AreEqual(2, _HashSet.Count);
}
示例6: SystemIdInt64ConstructorTest
public void SystemIdInt64ConstructorTest()
{
var _SystemId = new SystemId(42L);
Assert.AreEqual("42", _SystemId.ToString());
Assert.AreEqual(2, _SystemId.Length);
}
示例7: op_Smaller_Smaller2_Test
public void op_Smaller_Smaller2_Test()
{
var _SystemId1 = new SystemId(5);
var _SystemId2 = new SystemId(23);
Assert.IsTrue(_SystemId1 < _SystemId2);
}
示例8: op_Smaller_Null_Test2
public void op_Smaller_Null_Test2()
{
SystemId _SystemId1 = null;
var _SystemId2 = new SystemId();
Assert.IsTrue(_SystemId1 < _SystemId2);
}
示例9: CompareToEqualsTest
public void CompareToEqualsTest()
{
var _SystemId1 = new SystemId(1);
var _SystemId2 = new SystemId(1);
Assert.IsTrue(_SystemId1.CompareTo(_SystemId2) == 0);
}
示例10: op_Inequality_Equals_Test
public void op_Inequality_Equals_Test()
{
var _SystemId1 = new SystemId(1);
var _SystemId2 = new SystemId(1);
Assert.IsFalse(_SystemId1 != _SystemId2);
}
示例11: op_Equality_Null_Test2
public void op_Equality_Null_Test2()
{
SystemId _SystemId1 = null;
var _SystemId2 = new SystemId();
Assert.IsFalse(_SystemId1 == _SystemId2);
}
示例12: op_Equality_Equals_Test
public void op_Equality_Equals_Test()
{
var _SystemId1 = new SystemId(1);
var _SystemId2 = new SystemId(1);
Assert.IsTrue(_SystemId1 == _SystemId2);
}
示例13: CompareToBiggerTest
public void CompareToBiggerTest()
{
var _SystemId1 = new SystemId(2);
var _SystemId2 = new SystemId(1);
Assert.IsTrue(_SystemId1.CompareTo(_SystemId2) > 0);
}
示例14: op_Bigger_Smaller1_Test
public void op_Bigger_Smaller1_Test()
{
var _SystemId1 = new SystemId(1);
var _SystemId2 = new SystemId(2);
Assert.IsFalse(_SystemId1 > _SystemId2);
}
示例15: op_Bigger_Null_Test1
public void op_Bigger_Null_Test1()
{
var _SystemId1 = new SystemId();
SystemId _SystemId2 = null;
Assert.IsTrue(_SystemId1 > _SystemId2);
}