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


C# Transaction.IdSystem方法代码示例

本文整理汇总了C#中Db4objects.Db4o.Internal.Transaction.IdSystem方法的典型用法代码示例。如果您正苦于以下问题:C# Transaction.IdSystem方法的具体用法?C# Transaction.IdSystem怎么用?C# Transaction.IdSystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Db4objects.Db4o.Internal.Transaction的用法示例。


在下文中一共展示了Transaction.IdSystem方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AllocateSlotForNewUserObject

		public Slot AllocateSlotForNewUserObject(Transaction trans, int id, int length)
		{
			Slot slot = AllocateSlot(length);
			trans.IdSystem().NotifySlotCreated(id, slot, SlotChangeFactory.UserObjects);
			return slot;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:6,代码来源:LocalObjectContainer.cs

示例2: IdSystem

		public virtual ITransactionalIdSystem IdSystem(Transaction trans)
		{
			return trans.IdSystem();
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:4,代码来源:PersistentBase.cs

示例3: ReadStatefulBufferById

		public override StatefulBuffer ReadStatefulBufferById(Transaction trans, int id, 
			bool lastCommitted)
		{
			if (id <= 0)
			{
				throw new ArgumentException("id=" + id);
			}
			Slot slot = lastCommitted ? trans.IdSystem().CommittedSlot(id) : trans.IdSystem()
				.CurrentSlot(id);
			if (DTrace.enabled)
			{
				DTrace.SlotRead.LogLength(id, slot);
			}
			return ReadStatefulBufferBySlot(trans, id, slot);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:15,代码来源:LocalObjectContainer.cs

示例4: ReadBufferById

		public sealed override ByteArrayBuffer ReadBufferById(Transaction trans, int id, 
			bool lastCommitted)
		{
			if (id <= 0)
			{
				throw new ArgumentException();
			}
			Slot slot = lastCommitted ? trans.IdSystem().CommittedSlot(id) : trans.IdSystem()
				.CurrentSlot(id);
			if (DTrace.enabled)
			{
				DTrace.SlotRead.LogLength(id, slot);
			}
			return ReadBufferBySlot(slot);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:15,代码来源:LocalObjectContainer.cs

示例5: IdForNewUserObject

		public sealed override int IdForNewUserObject(Transaction trans)
		{
			return trans.IdSystem().NewId(SlotChangeFactory.UserObjects);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:4,代码来源:LocalObjectContainer.cs

示例6: Delete4

		public sealed override bool Delete4(Transaction transaction, ObjectReference @ref
			, object obj, int cascade, bool userCall)
		{
			int id = @ref.GetID();
			StatefulBuffer reader = ReadStatefulBufferById(transaction, id);
			if (reader != null)
			{
				if (obj != null)
				{
					if ((!ShowInternalClasses()) && Const4.ClassInternal.IsAssignableFrom(obj.GetType
						()))
					{
						return false;
					}
				}
				reader.SetCascadeDeletes(cascade);
				transaction.IdSystem().NotifySlotDeleted(id, SlotChangeFactory.UserObjects);
				ClassMetadata classMetadata = @ref.ClassMetadata();
				classMetadata.Delete(reader, obj);
				return true;
			}
			return false;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:23,代码来源:LocalObjectContainer.cs

示例7: IsDeleted

		public override bool IsDeleted(Transaction trans, int id)
		{
			return trans.IdSystem().IsDeleted(id);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:4,代码来源:LocalObjectContainer.cs


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