当前位置: 首页>>代码示例>>C#>>正文


C# Collection4.IsEmpty方法代码示例

本文整理汇总了C#中Db4objects.Db4o.Foundation.Collection4.IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C# Collection4.IsEmpty方法的具体用法?C# Collection4.IsEmpty怎么用?C# Collection4.IsEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Db4objects.Db4o.Foundation.Collection4的用法示例。


在下文中一共展示了Collection4.IsEmpty方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestMultiThread

		public virtual void TestMultiThread()
		{
			DynamicVariable variable = new DynamicVariable();
			Collection4 failures = new Collection4();
			variable.With("mine", new _IRunnable_23(this, variable, failures));
			Assert.IsNull(variable.Value);
			Assert.IsTrue(failures.IsEmpty(), failures.ToString());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:DynamicVariableTestCase.cs

示例2: TestFieldTraversal

		public virtual void TestFieldTraversal()
		{
			Collection4 expectedNames = new Collection4(new ArrayIterator4(new string[] { "_id"
				, "_name", "_age" }));
			ClassMetadata classMetadata = ClassMetadataFor(typeof(ClassMetadataIntegrationTestCase.SubClazz
				));
			classMetadata.TraverseAllAspects(new _TraverseFieldCommand_31(expectedNames));
			Assert.IsTrue(expectedNames.IsEmpty());
		}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:ClassMetadataIntegrationTestCase.cs

示例3: SameContent

 public static void SameContent(IEnumerator expected, IEnumerator actual)
 {
     var allExpected = new Collection4(expected);
     while (actual.MoveNext())
     {
         var current = actual.Current;
         var removed = allExpected.Remove(current);
         if (!removed)
         {
             Unexpected(current);
         }
     }
     Assert.IsTrue(allExpected.IsEmpty(), "Still missing: " + allExpected);
 }
开发者ID:masroore,项目名称:db4o,代码行数:14,代码来源:Iterator4Assert.cs

示例4: SameContent

		public static void SameContent(IEnumerator expected, IEnumerator actual)
		{
			Collection4 allExpected = new Collection4();
			while (expected.MoveNext())
			{
				allExpected.Add(expected.Current);
			}
			while (actual.MoveNext())
			{
				object current = actual.Current;
				bool removed = allExpected.Remove(current);
				if (!removed)
				{
					Unexpected(current);
				}
			}
			Assert.IsTrue(allExpected.IsEmpty(), allExpected.ToString());
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:18,代码来源:IteratorAssert.cs

示例5: Expect

			private bool Expect(IObjectContainer container, string[] names)
			{
				Collection4 expected = new Collection4(names);
				IObjectSet actual = container.Query(typeof(CrashSimulatingTestSuite.CrashData));
				while (actual.HasNext())
				{
					CrashSimulatingTestSuite.CrashData current = (CrashSimulatingTestSuite.CrashData)
						actual.Next();
					if (!expected.Remove(current._name))
					{
						return false;
					}
				}
				return expected.IsEmpty();
			}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:15,代码来源:CrashSimulatingTestSuite.cs

示例6: AssertEntries

		private void AssertEntries(PersistentEntry[] expected, IEnumerator actual)
		{
			Collection4 checklist = new Collection4(actual);
			Assert.AreEqual(expected.Length, checklist.Size());
			for (int i = 0; i < expected.Length; ++i)
			{
				PersistentEntry e = expected[i];
				PersistentEntry a = EntryByUid(checklist.GetEnumerator(), e.uid);
				if (a != null)
				{
					AssertEqualEntries(e, a);
					checklist.Remove(a);
				}
			}
			Assert.IsTrue(checklist.IsEmpty(), checklist.ToString());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:16,代码来源:CustomReflectorTestCase.cs

示例7: AssertIterator

 private void AssertIterator(Hashtable4 table, object[] keys)
 {
     var iter = table.Iterator();
     var expected = new Collection4(keys);
     while (iter.MoveNext())
     {
         var entry = (IEntry4) iter.Current;
         var removedOK = expected.Remove(entry.Key());
         Assert.IsTrue(removedOK);
     }
     Assert.IsTrue(expected.IsEmpty(), expected.ToString());
 }
开发者ID:masroore,项目名称:db4o,代码行数:12,代码来源:Hashtable4TestCase.cs


注:本文中的Db4objects.Db4o.Foundation.Collection4.IsEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。