本文整理汇总了C#中IExtObjectContainer.Refresh方法的典型用法代码示例。如果您正苦于以下问题:C# IExtObjectContainer.Refresh方法的具体用法?C# IExtObjectContainer.Refresh怎么用?C# IExtObjectContainer.Refresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IExtObjectContainer
的用法示例。
在下文中一共展示了IExtObjectContainer.Refresh方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Conc
public virtual void Conc(IExtObjectContainer oc)
{
var r11 = GetRoot(oc);
r11.name = "cc";
oc.Refresh(r11, 0);
Assert.AreEqual("cc", r11.name);
oc.Refresh(r11, 1);
Assert.AreEqual("o1", r11.name);
r11.child.name = "cc";
oc.Refresh(r11, 1);
Assert.AreEqual("cc", r11.child.name);
oc.Refresh(r11, 2);
Assert.AreEqual("o2", r11.child.name);
}
示例2: Conc
public virtual void Conc(IExtObjectContainer oc)
{
Db4objects.Db4o.Tests.Common.Concurrency.RefreshTestCase r11 = GetRoot(oc);
r11.name = "cc";
oc.Refresh(r11, 0);
Assert.AreEqual("cc", r11.name);
oc.Refresh(r11, 1);
Assert.AreEqual("o1", r11.name);
r11.child.name = "cc";
oc.Refresh(r11, 1);
Assert.AreEqual("cc", r11.child.name);
oc.Refresh(r11, 2);
Assert.AreEqual("o2", r11.child.name);
}
示例3: AssertInstanceCountAndFieldIndexes
private void AssertInstanceCountAndFieldIndexes(IExtObjectContainer client1)
{
CsCascadedDeleteReaddChildReferenceTestCase.ItemParent parent3 = ((CsCascadedDeleteReaddChildReferenceTestCase.ItemParent
)RetrieveOnlyInstance(client1, typeof(CsCascadedDeleteReaddChildReferenceTestCase.ItemParent
)));
RetrieveOnlyInstance(client1, typeof(CsCascadedDeleteReaddChildReferenceTestCase.Item
));
client1.Refresh(parent3, int.MaxValue);
long parentIdAfterUpdate = client1.GetID(parent3);
long childIdAfterUpdate = client1.GetID(parent3.child);
new FieldIndexAssert(typeof(CsCascadedDeleteReaddChildReferenceTestCase.ItemParent
), "child").AssertSingleEntry(FileSession(), parentIdAfterUpdate);
new FieldIndexAssert(typeof(CsCascadedDeleteReaddChildReferenceTestCase.Item), "name"
).AssertSingleEntry(FileSession(), childIdAfterUpdate);
}
示例4: AssertInstanceCountAndFieldIndexes
private void AssertInstanceCountAndFieldIndexes(IExtObjectContainer client1)
{
var parent3 = ((ItemParent
) RetrieveOnlyInstance(client1, typeof (ItemParent
)));
RetrieveOnlyInstance(client1, typeof (Item
));
client1.Refresh(parent3, int.MaxValue);
var parentIdAfterUpdate = client1.GetID(parent3);
var childIdAfterUpdate = client1.GetID(parent3.child);
new FieldIndexAssert(typeof (ItemParent
), "child").AssertSingleEntry(FileSession(), parentIdAfterUpdate);
new FieldIndexAssert(typeof (Item), "name"
).AssertSingleEntry(FileSession(), childIdAfterUpdate);
}