本文整理汇总了C#中Db4objects.Db4o.Internal.ByteArrayBuffer.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# ByteArrayBuffer.ReadInt方法的具体用法?C# ByteArrayBuffer.ReadInt怎么用?C# ByteArrayBuffer.ReadInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Internal.ByteArrayBuffer
的用法示例。
在下文中一共展示了ByteArrayBuffer.ReadInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public static Db4objects.Db4o.Internal.SerializedGraph Read(ByteArrayBuffer buffer
)
{
int id = buffer.ReadInt();
int length = buffer.ReadInt();
return new Db4objects.Db4o.Internal.SerializedGraph(id, buffer.ReadBytes(length));
}
示例2: Read
// _key, _slot._address, _slot._length
public override object Read(ByteArrayBuffer buffer)
{
int id = buffer.ReadInt();
Db4objects.Db4o.Internal.Slots.Slot slot = new Db4objects.Db4o.Internal.Slots.Slot
(buffer.ReadInt(), buffer.ReadInt());
return new Db4objects.Db4o.Internal.Ids.IdSlotTree(id, slot);
}
示例3: ReadBuffer
protected override void ReadBuffer(ByteArrayBuffer buffer, bool versionsAreConsistent
)
{
base.ReadBuffer(buffer, versionsAreConsistent);
SystemData systemData = SystemData();
systemData.IdToTimestampIndexId(buffer.ReadInt());
systemData.TimestampToIdIndexId(buffer.ReadInt());
}
示例4: ReadThis
public override void ReadThis(Transaction trans, ByteArrayBuffer reader)
{
int length = reader.ReadInt();
_ints = new int[length];
for (int i = 0; i < length; i++)
{
_ints[i] = reader.ReadInt();
}
}
示例5: ReadThis
public virtual void ReadThis(ByteArrayBuffer buffer)
{
SystemData().ConverterVersion(buffer.ReadInt());
SystemData().FreespaceSystem(buffer.ReadByte());
buffer.ReadInt();
// was BTreeFreespaceId, converted to slot, can no longer be used
SystemData().IdentityId(buffer.ReadInt());
SystemData().LastTimeStampID(buffer.ReadLong());
SystemData().UuidIndexId(buffer.ReadInt());
}
示例6: ReadSpec
public virtual RawClassSpec ReadSpec(Transaction trans, ByteArrayBuffer reader)
{
byte[] nameBytes = ReadName(trans, reader);
string className = trans.Container().StringIO().Read(nameBytes);
ReadMetaClassID(reader);
// skip
int ancestorID = reader.ReadInt();
reader.IncrementOffset(Const4.IntLength);
// index ID
int numFields = reader.ReadInt();
return new RawClassSpec(className, ancestorID, numFields);
}
示例7: CompleteInterruptedTransaction
public override void CompleteInterruptedTransaction(int transactionId1, int transactionId2
)
{
if (!System.IO.File.Exists(LockFileName(_fileName)))
{
return;
}
if (!LockFileSignalsInterruptedTransaction())
{
return;
}
ByteArrayBuffer buffer = new ByteArrayBuffer(Const4.IntLength);
OpenLogFile();
Read(_logFile, buffer);
int length = buffer.ReadInt();
if (length > 0)
{
buffer = new ByteArrayBuffer(length);
Read(_logFile, buffer);
buffer.IncrementOffset(Const4.IntLength);
ReadWriteSlotChanges(buffer);
}
DeleteLockFile();
CloseLogFile();
DeleteLogFile();
}
示例8: Bytes
public virtual byte[] Bytes(ByteArrayBuffer buffer)
{
int len = buffer.ReadInt();
len = BytesPerChar() * len;
byte[] res = new byte[len];
System.Array.Copy(buffer._buffer, buffer._offset, res, 0, len);
return res;
}
示例9: Read
public override object Read(ByteArrayBuffer buffer)
{
int size = buffer.ReadInt();
int address = buffer.ReadInt();
if (size > sizeLimit)
{
Db4objects.Db4o.Internal.Freespace.FreeSlotNode node = new Db4objects.Db4o.Internal.Freespace.FreeSlotNode
(size);
node.CreatePeer(address);
if (Deploy.debug && Debug4.xbytes)
{
DebugCheckBuffer(buffer, node);
}
return node;
}
return null;
}
示例10: ReadInteger
public override object ReadInteger(ByteArrayBuffer bytes)
{
int value = bytes.ReadInt();
if (value == int.MaxValue)
{
return null;
}
return value;
}
示例11: ReadIndex
protected override void ReadIndex(ObjectContainerBase stream, ClassMetadata clazz
, ByteArrayBuffer reader)
{
int indexID = reader.ReadInt();
if (indexID == 0)
{
return;
}
clazz.Index().Read(stream, indexID);
}
示例12: ReadIndexEntry
public virtual object ReadIndexEntry(IContext context, ByteArrayBuffer buffer)
{
int parentID = buffer.ReadInt();
object objPart = _valueHandler.ReadIndexEntry(context, buffer);
if (parentID < 0)
{
objPart = null;
parentID = -parentID;
}
return new FieldIndexKeyImpl(parentID, objPart);
}
示例13: Read
public override object Read(ByteArrayBuffer a_bytes)
{
int key = a_bytes.ReadInt();
object obj = null;
if (_object is TreeInt)
{
obj = new TreeReader(a_bytes, (IReadable)_object).Read();
}
else
{
obj = ((IReadable)_object).Read(a_bytes);
}
return new Db4objects.Db4o.Internal.TreeIntObject(key, obj);
}
示例14: Read
protected override void Read(LocalObjectContainer container, ByteArrayBuffer reader
)
{
NewTimerFileLock(container);
OldEncryptionOff(container);
CheckThreadFileLock(container, reader);
reader.Seek(BlocksizeOffset);
container.BlockSizeReadFromFile(reader.ReadInt());
SystemData systemData = container.SystemData();
systemData.ClassCollectionID(reader.ReadInt());
container.SystemData().IdSystemType(reader.ReadByte());
_variablePart = CreateVariablePart(container);
int variablePartAddress = reader.ReadInt();
int variablePartLength = reader.ReadInt();
_variablePart.Read(variablePartAddress, variablePartLength);
_transactionPointerAddress = reader.ReadInt();
if (_transactionPointerAddress != 0)
{
ByteArrayBuffer buffer = new ByteArrayBuffer(TransactionPointerLength);
buffer.Read(container, _transactionPointerAddress, 0);
systemData.TransactionPointer1(buffer.ReadInt());
systemData.TransactionPointer2(buffer.ReadInt());
}
}
示例15: ReadSpec
protected override RawFieldSpec ReadSpec(AspectType aspectType, ObjectContainerBase
stream, ByteArrayBuffer reader)
{
RawFieldSpec spec = base.ReadSpec(aspectType, stream, reader);
if (spec == null)
{
return null;
}
if (spec.IsVirtual())
{
return spec;
}
int indexID = reader.ReadInt();
spec.IndexID(indexID);
return spec;
}