本文整理汇总了C#中Db4objects.Db4o.Internal.ByteArrayBuffer类的典型用法代码示例。如果您正苦于以下问题:C# ByteArrayBuffer类的具体用法?C# ByteArrayBuffer怎么用?C# ByteArrayBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ByteArrayBuffer类属于Db4objects.Db4o.Internal命名空间,在下文中一共展示了ByteArrayBuffer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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());
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:MappedIDPairHandler.cs
示例2: MockMarshallingContext
public MockMarshallingContext(IObjectContainer objectContainer)
{
_objectContainer = objectContainer;
_header = new ByteArrayBuffer(1000);
_payLoad = new ByteArrayBuffer(1000);
_current = _header;
}
开发者ID:erdincay,项目名称:db4o,代码行数:7,代码来源:MockMarshallingContext.cs
示例3: _IRunnable_65
public _IRunnable_65(FileHeaderVariablePart2 _enclosing, int length, ByteArrayBuffer
buffer)
{
this._enclosing = _enclosing;
this.length = length;
this.buffer = buffer;
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:FileHeaderVariablePart2.cs
示例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;
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:TreeReader.cs
示例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);
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:27,代码来源:MReadReaderById.cs
示例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));
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:SerializedGraph.cs
示例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());
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:FileHeaderVariablePart3.cs
示例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;
}
开发者ID:superyfwy,项目名称:db4o,代码行数:8,代码来源:NetTypeHandler.cs
示例9: UnmarshallingContext
public UnmarshallingContext(Transaction transaction, ByteArrayBuffer buffer, ObjectReference
@ref, int addToIDTree, bool checkIDTree) : base(transaction, buffer, null, @ref
)
{
_addToIDTree = addToIDTree;
_checkIDTree = checkIDTree;
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:UnmarshallingContext.cs
示例10: ReadName
private byte[] ReadName(LatinStringIO sio, ByteArrayBuffer reader)
{
byte[] nameBytes = sio.Bytes(reader);
reader.IncrementOffset(nameBytes.Length);
nameBytes = Platform4.UpdateClassName(nameBytes);
return nameBytes;
}
开发者ID:superyfwy,项目名称:db4o,代码行数:7,代码来源:ClassMarshaller.cs
示例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);
}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:IdSlotTree.cs
示例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();
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:26,代码来源:FileBasedTransactionLogHandler.cs
示例13: CacheContributingObjectReader
public CacheContributingObjectReader(ClientTransaction transaction, IClientSlotCache
slotCache, ByteArrayBuffer reader)
{
_reader = reader;
_transaction = transaction;
_slotCache = slotCache;
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:CacheContributingObjectReader.cs
示例14: WriteIndexEntry
public virtual void WriteIndexEntry(IContext context, ByteArrayBuffer writer, object
obj)
{
Slot slot = (Slot)obj;
writer.WriteInt(slot.Address());
writer.WriteInt(slot.Length());
}
开发者ID:superyfwy,项目名称:db4o,代码行数:7,代码来源:SlotHandler.cs
示例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;
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:8,代码来源:CharHandler.cs
示例16: ReadBuffer
protected override void ReadBuffer(ByteArrayBuffer buffer, bool versionsAreConsistent
)
{
base.ReadBuffer(buffer, versionsAreConsistent);
SystemData systemData = SystemData();
systemData.IdToTimestampIndexId(buffer.ReadInt());
systemData.TimestampToIdIndexId(buffer.ReadInt());
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:8,代码来源:FileHeaderVariablePart3.cs
示例17: WriteShort
internal static void WriteShort(int a_short, ByteArrayBuffer a_bytes)
{
for (int i = 0; i < Const4.ShortBytes; i++)
{
a_bytes._buffer[a_bytes._offset++] = (byte)(a_short >> ((Const4.ShortBytes - 1 -
i) * 8));
}
}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:ShortHandler.cs
示例18: GetWriter
public MsgD GetWriter(Transaction trans, Pointer4 pointer, ClassMetadata classMetadata
, int param, ByteArrayBuffer buffer)
{
return GetWriter(trans, pointer, buffer, new[]
{
classMetadata.GetID(), param
});
}
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:MsgObject.cs
示例19: 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;
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:LatinStringIO.cs
示例20: AppendPayLoad
private void AppendPayLoad(StatefulBuffer target, Pointer4 pointer, ByteArrayBuffer
payLoad)
{
target.WriteInt(payLoad.Length());
target.WriteInt(pointer.Id());
target.WriteInt(pointer.Address());
target.Append(payLoad._buffer);
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:8,代码来源:MsgObject.cs
注:本文中的Db4objects.Db4o.Internal.ByteArrayBuffer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论