本文整理汇总了C#中Db4objects.Db4o.Internal.ByteArrayBuffer.WriteInt方法的典型用法代码示例。如果您正苦于以下问题:C# ByteArrayBuffer.WriteInt方法的具体用法?C# ByteArrayBuffer.WriteInt怎么用?C# ByteArrayBuffer.WriteInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Internal.ByteArrayBuffer
的用法示例。
在下文中一共展示了ByteArrayBuffer.WriteInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteIds
private void WriteIds(ByteArrayBuffer buffer, IList ids)
{
buffer.WriteInt(ids.Count);
for (IEnumerator idIter = ids.GetEnumerator(); idIter.MoveNext(); )
{
int id = ((int)idIter.Current);
buffer.WriteInt(id);
}
}
示例2: WriteIndexEntry
public virtual void WriteIndexEntry(IContext context, ByteArrayBuffer writer, object
obj)
{
Slot slot = (Slot)obj;
writer.WriteInt(slot.Address());
writer.WriteInt(slot.Length());
}
示例3: WriteBuffer
protected override void WriteBuffer(ByteArrayBuffer buffer, bool shuttingDown)
{
base.WriteBuffer(buffer, shuttingDown);
SystemData systemData = SystemData();
buffer.WriteInt(systemData.IdToTimestampIndexId());
buffer.WriteInt(systemData.TimestampToIdIndexId());
}
示例4: WriteThis
public override void WriteThis(Transaction trans, ByteArrayBuffer writer)
{
writer.WriteInt(Size());
for (int i = 0; i < _ints.Length; i++)
{
writer.WriteInt(_ints[i]);
}
}
示例5: Write
public virtual void Write(Transaction trans, ClassMetadata clazz, ByteArrayBuffer
writer)
{
writer.WriteShortString(trans, clazz.NameToWrite());
int intFormerlyKnownAsMetaClassID = 0;
writer.WriteInt(intFormerlyKnownAsMetaClassID);
writer.WriteIDOf(trans, clazz._ancestor);
WriteIndex(trans, clazz, writer);
writer.WriteInt(clazz.DeclaredAspectCount());
clazz.TraverseDeclaredAspects(new _IProcedure4_39(this, trans, clazz, writer));
}
示例6: Marshall
public virtual ByteArrayBuffer Marshall(LocalTransaction transaction, IIntIterator4
ids, int count)
{
ByteArrayBuffer buffer = new ByteArrayBuffer(Const4.IntLength + count * Const4.IntLength
);
int sizeOffset = buffer.Offset();
buffer.WriteInt(0);
int written = 0;
while (count > 0 && ids.MoveNext())
{
buffer.WriteInt(ids.CurrentInt());
++written;
--count;
}
buffer.Seek(sizeOffset);
buffer.WriteInt(written);
return buffer;
}
示例7: WriteIndexEntry
public void WriteIndexEntry(IContext context, ByteArrayBuffer writer, object obj)
{
var indexEntry = obj as IndexEntry;
if (indexEntry == null)
{
indexEntry = new IndexEntry(ClassMetadataIdFor(context, obj), Convert.ToInt64(obj));
}
writer.WriteInt(indexEntry.ClassMetadataId);
writer.WriteLong(indexEntry.EnumValue);
}
示例8: Write
public override void Write(ByteArrayBuffer a_writer)
{
a_writer.WriteInt(_key);
if (_object == null)
{
a_writer.WriteInt(0);
}
else
{
if (_object is TreeInt)
{
TreeInt.Write(a_writer, (TreeInt)_object);
}
else
{
((IReadWriteable)_object).Write(a_writer);
}
}
}
示例9: WriteIdSlotPairsTo
private void WriteIdSlotPairsTo(IList slots, ByteArrayBuffer buffer)
{
buffer.WriteInt(slots.Count);
for (IEnumerator idSlotPairIter = slots.GetEnumerator(); idSlotPairIter.MoveNext(
); )
{
Pair idSlotPair = ((Pair)idSlotPairIter.Current);
int id = (((int)idSlotPair.first));
Slot slot = ((Slot)idSlotPair.second);
if (Slot.IsNull(slot))
{
buffer.WriteInt(id);
buffer.WriteInt(0);
continue;
}
ByteArrayBuffer slotBuffer = _transaction.LocalContainer().ReadBufferBySlot(slot);
buffer.WriteInt(id);
buffer.WriteInt(slot.Length());
buffer.WriteBytes(slotBuffer._buffer);
}
}
示例10: Test
public void Test()
{
int[] ints = new int[]{
int.MinValue,
-1,
0,
1,
int.MaxValue};
int bufferLength = Const4.IntLength * ints.Length;
ByteArrayBuffer buffer = new ByteArrayBuffer(bufferLength);
for (int i = 0; i < ints.Length; i++)
{
buffer.WriteInt(ints[i]);
}
long checkSum = CRC32.CheckSum(buffer._buffer, 0, buffer._buffer.Length);
_expectedJavaOutput = checkSum.ToString();
RunTest();
}
示例11: Write
public virtual void Write(ByteArrayBuffer buffer)
{
buffer.WriteInt(_id);
buffer.WriteInt(_address);
buffer.WriteInt(_length);
}
示例12: WriteThis
public override void WriteThis(Transaction trans, ByteArrayBuffer buffer)
{
buffer.WriteInt(_classes.Size());
IEnumerator i = _classes.GetEnumerator();
while (i.MoveNext())
{
buffer.WriteIDOf(trans, i.Current);
}
}
示例13: WriteInt
public static void WriteInt(int a_int, ByteArrayBuffer a_bytes)
{
a_bytes.WriteInt(a_int);
}
示例14: WriteObjectClassID
private void WriteObjectClassID(ByteArrayBuffer reader, int id)
{
reader.WriteInt(-id);
}
示例15: Write
public virtual void Write(ByteArrayBuffer buffer)
{
buffer.WriteInt(PersistentGeneratorValue());
}