本文整理汇总了C#中Db4objects.Db4o.Internal.StatefulBuffer.Transaction方法的典型用法代码示例。如果您正苦于以下问题:C# StatefulBuffer.Transaction方法的具体用法?C# StatefulBuffer.Transaction怎么用?C# StatefulBuffer.Transaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Internal.StatefulBuffer
的用法示例。
在下文中一共展示了StatefulBuffer.Transaction方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetWriter
public sealed override MsgD GetWriter(StatefulBuffer bytes)
{
MsgD message = GetWriterForLength(bytes.Transaction(), bytes.Length() + Const4.IntLength
);
message._payLoad.WriteInt(bytes.GetAddress());
message._payLoad.Append(bytes._buffer);
return message;
}
示例2: GetWriter
public virtual Db4objects.Db4o.CS.Internal.Messages.MsgD GetWriter(StatefulBuffer
bytes)
{
Db4objects.Db4o.CS.Internal.Messages.MsgD message = GetWriterForLength(bytes.Transaction
(), bytes.Length());
message._payLoad.Append(bytes._buffer);
return message;
}
示例3: ArrayTypeFor
private ArrayType ArrayTypeFor(StatefulBuffer buffer, object obj)
{
return buffer.Transaction().Container()._handlers.ArrayType(obj);
}
示例4: ReadIndexEntryFromObjectSlot
/// <exception cref="Db4objects.Db4o.CorruptionException"></exception>
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
public override object ReadIndexEntryFromObjectSlot(MarshallerFamily mf, StatefulBuffer
buffer)
{
return buffer.Container().ReadWriterByAddress(buffer.Transaction(), buffer.ReadInt
(), buffer.ReadInt());
}
示例5: AddFieldIndices
public void AddFieldIndices(StatefulBuffer buffer)
{
if (!StandardReferenceTypeHandlerIsUsed())
{
return;
}
if (HasClassIndex() || HasVirtualAttributes())
{
var oh = new ObjectHeader(this, buffer);
var context = new ObjectIdContextImpl(buffer.Transaction(), buffer
, oh, buffer.GetID());
Handlers4.FieldAwareTypeHandler(CorrectHandlerVersion(context)).AddFieldIndices(context
);
}
}
示例6: Delete
internal void Delete(StatefulBuffer buffer, object obj)
{
RemoveFromIndex(buffer.Transaction(), buffer.GetID());
CascadeDeletion(buffer, obj);
}
示例7: ReadIndexEntryFromObjectSlot
/// <exception cref="Db4objects.Db4o.CorruptionException"></exception>
public object ReadIndexEntryFromObjectSlot(MarshallerFamily mf, StatefulBuffer statefulBuffer
)
{
return ReadIndexEntry(statefulBuffer.Transaction().Context(), statefulBuffer);
}
示例8: GetWriter
public sealed override MsgD GetWriter(StatefulBuffer buffer)
{
return GetWriter(buffer.Transaction(), buffer.Pointer(), buffer, null);
}
示例9: AddIndexEntry
protected void AddIndexEntry(StatefulBuffer a_bytes, object indexEntry)
{
AddIndexEntry(a_bytes.Transaction(), a_bytes.GetID(), indexEntry);
}
示例10: ReadIndexEntryForRebuild
private object ReadIndexEntryForRebuild(StatefulBuffer writer, ObjectHeader oh)
{
ClassMetadata classMetadata = oh.ClassMetadata();
if (classMetadata == null)
{
return DefaultValueForFieldType();
}
ObjectIdContextImpl context = new ObjectIdContextImpl(writer.Transaction(), writer
, oh, writer.GetID());
if (!classMetadata.SeekToField(context, this))
{
return DefaultValueForFieldType();
}
try
{
return ReadIndexEntry(context);
}
catch (CorruptionException exc)
{
throw new FieldIndexException(exc, this);
}
}
示例11: GetWriter
public virtual MsgD GetWriter(StatefulBuffer
bytes)
{
var message = GetWriterForLength(bytes.Transaction
(), bytes.Length());
message._payLoad.Append(bytes._buffer);
return message;
}