本文整理汇总了C#中IExtObjectContainer.Store方法的典型用法代码示例。如果您正苦于以下问题:C# IExtObjectContainer.Store方法的具体用法?C# IExtObjectContainer.Store怎么用?C# IExtObjectContainer.Store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IExtObjectContainer
的用法示例。
在下文中一共展示了IExtObjectContainer.Store方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConcSetRollback
public virtual void ConcSetRollback(IExtObjectContainer oc, int seq)
{
if (seq % 2 == 0)
{
// if the thread sequence is even, store something
for (int i = 0; i < 1000; i++)
{
SimpleObject c = new SimpleObject("oc " + i, i);
oc.Store(c);
}
}
else
{
// if the thread sequence is odd, rollback
for (int i = 0; i < 1000; i++)
{
SimpleObject c = new SimpleObject("oc " + i, i);
oc.Store(c);
oc.Rollback();
c = new SimpleObject("oc2.2 " + i, i);
oc.Store(c);
}
oc.Rollback();
}
}
示例2: Conc2
public virtual void Conc2(IExtObjectContainer oc)
{
oc.Store(new CreateIndexFor("d"));
TQueryB(oc);
TUpdateB(oc);
oc.Store(new CreateIndexFor("z"));
oc.Store(new CreateIndexFor("y"));
}
示例3: TwoRef
private void TwoRef(IExtObjectContainer oc, string name)
{
CascadeDeleteDeletedTestCase.Item item1 = new CascadeDeleteDeletedTestCase.Item(name
);
item1.untypedMember = new CascadeDeleteDeletedTestCase.CddMember();
item1.typedMember = new CascadeDeleteDeletedTestCase.CddMember();
CascadeDeleteDeletedTestCase.Item item2 = new CascadeDeleteDeletedTestCase.Item(name
);
item2.untypedMember = item1.untypedMember;
item2.typedMember = item1.typedMember;
oc.Store(item1);
oc.Store(item2);
}
示例4: TwoRef
private void TwoRef(IExtObjectContainer oc, string name)
{
var cdd = new CascadeDeleteDeletedTestCase
(name);
cdd.untypedMember = new CddMember();
cdd.typedMember = new CddMember();
var cdd2 = new CascadeDeleteDeletedTestCase
(name);
cdd2.untypedMember = cdd.untypedMember;
cdd2.typedMember = cdd.typedMember;
oc.Store(cdd);
oc.Store(cdd2);
}
示例5: TwoRef
private void TwoRef(IExtObjectContainer oc, string name)
{
Db4objects.Db4o.Tests.Common.Assorted.CascadeDeleteDeletedTestCase cdd = new Db4objects.Db4o.Tests.Common.Assorted.CascadeDeleteDeletedTestCase
(name);
cdd.untypedMember = new CascadeDeleteDeletedTestCase.CddMember();
cdd.typedMember = new CascadeDeleteDeletedTestCase.CddMember();
Db4objects.Db4o.Tests.Common.Assorted.CascadeDeleteDeletedTestCase cdd2 = new Db4objects.Db4o.Tests.Common.Assorted.CascadeDeleteDeletedTestCase
(name);
cdd2.untypedMember = cdd.untypedMember;
cdd2.typedMember = cdd.typedMember;
oc.Store(cdd);
oc.Store(cdd2);
}
示例6: Update
protected override void Update(IExtObjectContainer objectContainer)
{
var holder = RetrieveHolderInstance(objectContainer);
UpdateValues(holder._values);
UpdateArrays(holder._arrays);
objectContainer.Store(holder, int.MaxValue);
}
示例7: MembersFirst
private void MembersFirst(IExtObjectContainer oc, string name)
{
var item = new Item(name
);
item.untypedMember = new CddMember();
item.typedMember = new CddMember();
oc.Store(item);
}
示例8: MembersFirst
private void MembersFirst(IExtObjectContainer oc, string name)
{
CascadeDeleteDeletedTestCase.Item item = new CascadeDeleteDeletedTestCase.Item(name
);
item.untypedMember = new CascadeDeleteDeletedTestCase.CddMember();
item.typedMember = new CascadeDeleteDeletedTestCase.CddMember();
oc.Store(item);
}
示例9: ConcUpdateSameObject
/// <exception cref="System.Exception"></exception>
public virtual void ConcUpdateSameObject(IExtObjectContainer oc, int seq)
{
var query = oc.Query();
query.Descend("_s").Constrain(testString + Count/2);
var result = query.Execute();
Assert.AreEqual(1, result.Count);
var o = (SimpleObject) result.Next();
o.SetI(Count + seq);
oc.Store(o);
}
示例10: Conc
public virtual void Conc(IExtObjectContainer oc, int seq)
{
var item = (Item
) RetrieveOnlyInstance(oc, typeof (Item));
for (var i = 0; i < AtomCount; i++)
{
item.child[i].name = "updated" + seq;
item.child[i].child.name = "updated" + seq;
oc.Store(item);
}
}
示例11: ConcUpdateDifferentObject
/// <exception cref="System.Exception"></exception>
public virtual void ConcUpdateDifferentObject(IExtObjectContainer oc, int seq)
{
IQuery query = oc.Query();
query.Descend("_s").Constrain(testString + seq).And(query.Descend("_i").Constrain
(seq));
IObjectSet result = query.Execute();
Assert.AreEqual(1, result.Count);
SimpleObject o = (SimpleObject)result.Next();
o.SetI(seq + Count);
oc.Store(o);
}
示例12: Conc
public virtual void Conc(IExtObjectContainer oc, int seq)
{
CascadeOnUpdateTestCase.Item item = (CascadeOnUpdateTestCase.Item)((CascadeOnUpdateTestCase.Item
)RetrieveOnlyInstance(oc, typeof(CascadeOnUpdateTestCase.Item)));
for (int i = 0; i < AtomCount; i++)
{
item.child[i].name = "updated" + seq;
item.child[i].child.name = "updated" + seq;
oc.Store(item);
}
}
示例13: Conc
public virtual void Conc(IExtObjectContainer oc, int seq)
{
DeepSetTestCase example = new DeepSetTestCase();
example.name = "1";
DeepSetTestCase ds = (DeepSetTestCase)oc.QueryByExample(example).Next();
Assert.AreEqual("1", ds.name);
Assert.AreEqual("3", ds.child.child.name);
ds.name = "1";
ds.child.name = "12" + seq;
ds.child.child.name = "13" + seq;
oc.Store(ds, 2);
}
示例14: Conc2
public virtual void Conc2(IExtObjectContainer oc, int seq)
{
oc.Configure().ObjectClass(typeof(MultiLevelIndexTestCase)).CascadeOnUpdate(true);
IQuery q = oc.Query();
q.Constrain(typeof(MultiLevelIndexTestCase));
q.Descend("_child").Descend("_i").Constrain(seq - 102);
IObjectSet objectSet = q.Execute();
Assert.AreEqual(1, objectSet.Count);
MultiLevelIndexTestCase mli = (MultiLevelIndexTestCase)objectSet.Next();
Assert.AreEqual(102 - seq, mli._i);
mli._child._i = -(seq + 201);
oc.Store(mli);
}
示例15: ConcUpdate
/// <exception cref="System.Exception"></exception>
public virtual void ConcUpdate(IExtObjectContainer oc, int seq)
{
var q = oc.Query();
q.Constrain(typeof (IndexedByIdentityTestCase));
var os = q.Execute();
Assert.AreEqual(Count, os.Count);
while (os.HasNext())
{
var idi = (IndexedByIdentityTestCase) os.Next();
idi.atom.name = "updated" + seq;
oc.Store(idi);
Thread.Sleep(100);
}
}