本文整理汇总了C#中ByteArrayBuffer.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# ByteArrayBuffer.ReadInt方法的具体用法?C# ByteArrayBuffer.ReadInt怎么用?C# ByteArrayBuffer.ReadInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ByteArrayBuffer
的用法示例。
在下文中一共展示了ByteArrayBuffer.ReadInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public static SerializedGraph Read(ByteArrayBuffer buffer
)
{
var id = buffer.ReadInt();
var length = buffer.ReadInt();
return new SerializedGraph(id, buffer.ReadBytes(length));
}
示例2: Read
// _key, _slot._address, _slot._length
public override object Read(ByteArrayBuffer buffer)
{
var id = buffer.ReadInt();
var slot = new Slot
(buffer.ReadInt(), buffer.ReadInt());
return new IdSlotTree(id, slot);
}
示例3: ReadBuffer
protected override void ReadBuffer(ByteArrayBuffer buffer, bool versionsAreConsistent
)
{
base.ReadBuffer(buffer, versionsAreConsistent);
var systemData = SystemData();
systemData.IdToTimestampIndexId(buffer.ReadInt());
systemData.TimestampToIdIndexId(buffer.ReadInt());
}
示例4: 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());
}
示例5: ReadSpec
public virtual RawClassSpec ReadSpec(Transaction trans, ByteArrayBuffer reader)
{
var nameBytes = ReadName(trans, reader);
var className = trans.Container().StringIO().Read(nameBytes);
ReadMetaClassID(reader);
// skip
var ancestorID = reader.ReadInt();
reader.IncrementOffset(Const4.IntLength);
// index ID
var numFields = reader.ReadInt();
return new RawClassSpec(className, ancestorID, numFields);
}
示例6: CompleteInterruptedTransaction
public override void CompleteInterruptedTransaction(int transactionId1, int transactionId2
)
{
if (!File.Exists(LockFileName(_fileName)))
{
return;
}
if (!LockFileSignalsInterruptedTransaction())
{
return;
}
var buffer = new ByteArrayBuffer(Const4.IntLength);
OpenLogFile();
Read(_logFile, buffer);
var length = buffer.ReadInt();
if (length > 0)
{
buffer = new ByteArrayBuffer(length);
Read(_logFile, buffer);
buffer.IncrementOffset(Const4.IntLength);
ReadWriteSlotChanges(buffer);
}
DeleteLockFile();
CloseLogFile();
DeleteLogFile();
}
示例7: Bytes
public virtual byte[] Bytes(ByteArrayBuffer buffer)
{
var len = buffer.ReadInt();
len = BytesPerChar()*len;
var res = new byte[len];
Array.Copy(buffer._buffer, buffer._offset, res, 0, len);
return res;
}
示例8: ReadInteger
public override object ReadInteger(ByteArrayBuffer bytes)
{
var value = bytes.ReadInt();
if (value == int.MaxValue)
{
return null;
}
return value;
}
示例9: ReadIndex
protected override void ReadIndex(ObjectContainerBase stream, ClassMetadata clazz
, ByteArrayBuffer reader)
{
var indexID = reader.ReadInt();
if (indexID == 0)
{
return;
}
clazz.Index().Read(stream, indexID);
}
示例10: Read
public void Read(ObjectContainerBase stream, ClassMetadata clazz, ByteArrayBuffer
reader)
{
clazz.SetAncestor(stream.ClassMetadataForID(reader.ReadInt()));
// if(clazz.callConstructor()){
// // The logic further down checks the ancestor YapClass, whether
// // or not it is allowed, not to call constructors. The ancestor
// // YapClass may possibly have not been loaded yet.
// clazz.createConstructor(true);
// }
clazz.CheckType();
ReadIndex(stream, clazz, reader);
clazz._aspects = ReadAspects(stream, reader, clazz);
}
示例11: Read
protected override void Read(LocalObjectContainer container, ByteArrayBuffer reader
)
{
NewTimerFileLock(container);
OldEncryptionOff(container);
CheckThreadFileLock(container, reader);
reader.Seek(BlocksizeOffset);
container.BlockSizeReadFromFile(reader.ReadInt());
var systemData = container.SystemData();
systemData.ClassCollectionID(reader.ReadInt());
container.SystemData().IdSystemType(reader.ReadByte());
_variablePart = CreateVariablePart(container);
var variablePartAddress = reader.ReadInt();
var variablePartLength = reader.ReadInt();
_variablePart.Read(variablePartAddress, variablePartLength);
_transactionPointerAddress = reader.ReadInt();
if (_transactionPointerAddress != 0)
{
var buffer = new ByteArrayBuffer(TransactionPointerLength);
buffer.Read(container, _transactionPointerAddress, 0);
systemData.TransactionPointer1(buffer.ReadInt());
systemData.TransactionPointer2(buffer.ReadInt());
}
}
示例12: ReadSpec
protected override RawFieldSpec ReadSpec(AspectType aspectType, ObjectContainerBase
stream, ByteArrayBuffer reader)
{
var spec = base.ReadSpec(aspectType, stream, reader);
if (spec == null)
{
return null;
}
if (spec.IsVirtual())
{
return spec;
}
var indexID = reader.ReadInt();
spec.IndexID(indexID);
return spec;
}
示例13: ReadIndex
protected override void ReadIndex(ObjectContainerBase stream, ClassMetadata clazz
, ByteArrayBuffer reader)
{
var indexID = reader.ReadInt();
if (!stream.MaintainsIndices() || !(stream is LocalObjectContainer))
{
return;
}
if (Btree(clazz) != null)
{
return;
}
clazz.Index().Read(stream, ValidIndexId(indexID));
if (IsOldClassIndex(indexID))
{
new ClassIndexesToBTrees_5_5().Convert((LocalObjectContainer) stream, indexID, Btree
(clazz));
stream.SetDirtyInSystemTransaction(clazz);
}
}
示例14: ReadSpec
protected override RawFieldSpec ReadSpec(AspectType aspectType, ObjectContainerBase
stream, ByteArrayBuffer reader)
{
var name = StringHandler.ReadStringNoDebug(stream.Transaction.Context(), reader
);
if (!aspectType.IsFieldMetadata())
{
return new RawFieldSpec(aspectType, name);
}
if (name.IndexOf(Const4.VirtualFieldPrefix) == 0)
{
if (stream._handlers.VirtualFieldByName(name) != null)
{
return new RawFieldSpec(aspectType, name);
}
}
var fieldTypeID = reader.ReadInt();
var attribs = reader.ReadByte();
return new RawFieldSpec(aspectType, name, fieldTypeID, attribs);
}
示例15: Read
protected override void Read(LocalObjectContainer file, ByteArrayBuffer reader)
{
NewTimerFileLock(file);
OldEncryptionOff(file);
CheckThreadFileLock(file, reader);
reader.Seek(TransactionPointerOffset);
file.SystemData().TransactionPointer1(reader.ReadInt());
file.SystemData().TransactionPointer2(reader.ReadInt());
reader.Seek(BlocksizeOffset);
file.BlockSizeReadFromFile(reader.ReadInt());
var systemData = file.SystemData();
systemData.ClassCollectionID(reader.ReadInt());
reader.ReadInt();
// was freespace ID, can no longer be read
_variablePart = CreateVariablePart(file);
var variablePartId = reader.ReadInt();
_variablePart.Read(variablePartId, 0);
}