本文整理汇总了C#中Db4objects.Db4o.Foundation.Collection4.Get方法的典型用法代码示例。如果您正苦于以下问题:C# Collection4.Get方法的具体用法?C# Collection4.Get怎么用?C# Collection4.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Foundation.Collection4
的用法示例。
在下文中一共展示了Collection4.Get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssertNotContainsNull
private void AssertNotContainsNull(Collection4 c)
{
Assert.IsFalse(c.Contains(null));
Assert.IsNull(c.Get(null));
int size = c.Size();
c.Ensure(null);
Assert.AreEqual(size + 1, c.Size());
c.Remove(null);
Assert.AreEqual(size, c.Size());
}
示例2: AssertContainsNull
private void AssertContainsNull(Collection4 c)
{
Assert.IsTrue(c.Contains(null));
Assert.IsNull(c.Get(null));
var size = c.Size();
c.Ensure(null);
Assert.AreEqual(size, c.Size());
}
示例3: TestGetByIndex
public virtual void TestGetByIndex()
{
Collection4 c = new Collection4();
c.Add("one");
c.Add("two");
Assert.AreEqual("one", c.Get(0));
Assert.AreEqual("two", c.Get(1));
AssertIllegalIndex(c, -1);
AssertIllegalIndex(c, 2);
}
示例4: HasIncompatibleTranslatorAspect
private bool HasIncompatibleTranslatorAspect(Collection4 aspects)
{
bool translatorFound = false;
bool enabledAspectFound = false;
int size = aspects.Size();
IAspectVersionContext context = AspectVersionContextImpl.ForSize(size);
for (int i = 0; i < size; i++)
{
ClassAspect current = (ClassAspect)aspects.Get(i);
if (!current.IsEnabledOn(context))
{
continue;
}
if (current.IsVirtual())
{
continue;
}
if (current.AspectType() == AspectType.Translator)
{
translatorFound = true;
}
else
{
enabledAspectFound = true;
}
}
return enabledAspectFound && translatorFound;
}