本文整理汇总了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());
}
示例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());
}
示例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);
}
示例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());
}
示例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();
}
示例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());
}
示例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());
}