本文整理汇总了C#中Db4objects.Db4o.Internal.ByteArrayBuffer类的典型用法代码示例。如果您正苦于以下问题:C# ByteArrayBuffer类的具体用法?C# ByteArrayBuffer怎么用?C# ByteArrayBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ByteArrayBuffer类属于Db4objects.Db4o.Internal命名空间,在下文中一共展示了ByteArrayBuffer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteIndexEntry
public virtual void WriteIndexEntry(IContext context, ByteArrayBuffer reader, object
obj)
{
MappedIDPair mappedIDs = (MappedIDPair)obj;
_origHandler.WriteIndexEntry(context, reader, mappedIDs.Orig());
_mappedHandler.WriteIndexEntry(context, reader, mappedIDs.Mapped());
}
示例2: MockMarshallingContext
public MockMarshallingContext(IObjectContainer objectContainer)
{
_objectContainer = objectContainer;
_header = new ByteArrayBuffer(1000);
_payLoad = new ByteArrayBuffer(1000);
_current = _header;
}
示例3: _IRunnable_65
public _IRunnable_65(FileHeaderVariablePart2 _enclosing, int length, ByteArrayBuffer
buffer)
{
this._enclosing = _enclosing;
this.length = length;
this.buffer = buffer;
}
示例4: TreeReader
public TreeReader(ByteArrayBuffer a_bytes, IReadable a_template, bool a_orderOnRead
)
{
i_template = a_template;
i_bytes = a_bytes;
i_orderOnRead = a_orderOnRead;
}
示例5: ReplyFromServer
public Msg ReplyFromServer()
{
ByteArrayBuffer bytes = null;
// readWriterByID may fail in certain cases, for instance if
// and object was deleted by another client
try
{
lock (ContainerLock())
{
bytes = Container().ReadBufferById(Transaction(), _payLoad.ReadInt(), _payLoad.ReadInt
() == 1);
}
if (bytes == null)
{
bytes = new ByteArrayBuffer(0);
}
}
catch (Db4oRecoverableException exc)
{
throw;
}
catch (Exception exc)
{
throw new Db4oRecoverableException(exc);
}
return Msg.ReadBytes.GetWriter(Transaction(), bytes);
}
示例6: 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));
}
示例7: WriteBuffer
protected override void WriteBuffer(ByteArrayBuffer buffer, bool shuttingDown)
{
base.WriteBuffer(buffer, shuttingDown);
SystemData systemData = SystemData();
buffer.WriteInt(systemData.IdToTimestampIndexId());
buffer.WriteInt(systemData.TimestampToIdIndexId());
}
示例8: Read1
/// <exception cref="Db4objects.Db4o.CorruptionException"></exception>
internal override object Read1(ByteArrayBuffer a_bytes)
{
int offset = a_bytes._offset;
object ret = Read(a_bytes._buffer, a_bytes._offset);
a_bytes._offset = offset + LinkLength();
return ret;
}
示例9: UnmarshallingContext
public UnmarshallingContext(Transaction transaction, ByteArrayBuffer buffer, ObjectReference
@ref, int addToIDTree, bool checkIDTree) : base(transaction, buffer, null, @ref
)
{
_addToIDTree = addToIDTree;
_checkIDTree = checkIDTree;
}
示例10: ReadName
private byte[] ReadName(LatinStringIO sio, ByteArrayBuffer reader)
{
byte[] nameBytes = sio.Bytes(reader);
reader.IncrementOffset(nameBytes.Length);
nameBytes = Platform4.UpdateClassName(nameBytes);
return nameBytes;
}
示例11: 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);
}
示例12: 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();
}
示例13: CacheContributingObjectReader
public CacheContributingObjectReader(ClientTransaction transaction, IClientSlotCache
slotCache, ByteArrayBuffer reader)
{
_reader = reader;
_transaction = transaction;
_slotCache = slotCache;
}
示例14: WriteIndexEntry
public virtual void WriteIndexEntry(IContext context, ByteArrayBuffer writer, object
obj)
{
Slot slot = (Slot)obj;
writer.WriteInt(slot.Address());
writer.WriteInt(slot.Length());
}
示例15: Read1
internal override object Read1(ByteArrayBuffer a_bytes)
{
byte b1 = a_bytes.ReadByte();
byte b2 = a_bytes.ReadByte();
char ret = (char)((b1 & unchecked((int)(0xff))) | ((b2 & unchecked((int)(0xff)))
<< 8));
return ret;
}