本文整理汇总了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;
}
示例2: IdSystem
public virtual ITransactionalIdSystem IdSystem(Transaction trans)
{
return trans.IdSystem();
}
示例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);
}
示例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);
}
示例5: IdForNewUserObject
public sealed override int IdForNewUserObject(Transaction trans)
{
return trans.IdSystem().NewId(SlotChangeFactory.UserObjects);
}
示例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;
}
示例7: IsDeleted
public override bool IsDeleted(Transaction trans, int id)
{
return trans.IdSystem().IsDeleted(id);
}