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


C# IExtObjectContainer.Store方法代码示例

本文整理汇总了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();
			}
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:25,代码来源:SetRollbackTestCase.cs

示例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"));
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:CreateIndexInheritedTestCase.cs

示例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);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:13,代码来源:CascadeDeleteDeletedTestCase.cs

示例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);
 }
开发者ID:masroore,项目名称:db4o,代码行数:13,代码来源:CascadeDeleteDeletedTestCase.cs

示例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);
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:13,代码来源:CascadeDeleteDeletedTestCase.cs

示例6: Update

 protected override void Update(IExtObjectContainer objectContainer)
 {
     var holder = RetrieveHolderInstance(objectContainer);
     UpdateValues(holder._values);
     UpdateArrays(holder._arrays);
     objectContainer.Store(holder, int.MaxValue);
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:HandlerUpdateTestCaseBase.cs

示例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);
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:CascadeDeleteDeletedTestCase.cs

示例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);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:CascadeDeleteDeletedTestCase.cs

示例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);
 }
开发者ID:masroore,项目名称:db4o,代码行数:11,代码来源:UpdateObjectTestCase.cs

示例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);
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:11,代码来源:CascadeOnUpdateTestCase.cs

示例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);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:12,代码来源:UpdateObjectTestCase.cs

示例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);
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:11,代码来源:CascadeOnUpdateTestCase.cs

示例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);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:12,代码来源:DeepSetTestCase.cs

示例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);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:13,代码来源:MultiLevelIndexTestCase.cs

示例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);
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:15,代码来源:IndexedByIdentityTestCase.cs


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