本文整理汇总了C#中Db4objects.Db4o.Internal.ByteArrayBuffer.WriteLong方法的典型用法代码示例。如果您正苦于以下问题:C# ByteArrayBuffer.WriteLong方法的具体用法?C# ByteArrayBuffer.WriteLong怎么用?C# ByteArrayBuffer.WriteLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Internal.ByteArrayBuffer
的用法示例。
在下文中一共展示了ByteArrayBuffer.WriteLong方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
public override void Write(object a_object, ByteArrayBuffer a_bytes)
{
// TODO: This is a temporary fix to prevent exceptions with
// Marshaller.LEGACY.
if (a_object == null)
{
a_object = new DateTime(0);
}
a_bytes.WriteLong(((DateTime)a_object).Ticks);
}
示例2: 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);
}
示例3: Write
public override void Write(object a_object, ByteArrayBuffer a_bytes)
{
a_bytes.WriteLong(Platform4.DoubleToLong(((double)a_object)));
}
示例4: WriteIndexEntry
public virtual void WriteIndexEntry(IContext context, ByteArrayBuffer writer, object
obj)
{
writer.WriteInt(((CommitTimestampSupport.TimestampEntry)obj).ParentID());
writer.WriteLong(((CommitTimestampSupport.TimestampEntry)obj).GetCommitTimestamp(
));
}
示例5: WriteBuffer
protected virtual void WriteBuffer(ByteArrayBuffer buffer, bool shuttingDown)
{
SystemData systemData = SystemData();
WriteSlot(buffer, systemData.IdSystemSlot(), false);
WriteSlot(buffer, systemData.InMemoryFreespaceSlot(), !shuttingDown);
buffer.WriteInt(systemData.BTreeFreespaceId());
buffer.WriteInt(systemData.ConverterVersion());
buffer.WriteInt(systemData.UuidIndexId());
Db4oDatabase identity = systemData.Identity();
buffer.WriteInt(identity == null ? 0 : identity.GetID(_container.SystemTransaction
()));
buffer.WriteLong(systemData.LastTimeStampID());
buffer.WriteByte(systemData.FreespaceSystem());
}
示例6: Marshall
private void Marshall(ByteArrayBuffer buffer, bool shuttingDown)
{
int checkSumOffset = buffer.Offset();
buffer.IncrementOffset(ChecksumLength);
int checkSumBeginOffset = buffer.Offset();
WriteBuffer(buffer, shuttingDown);
int checkSumEndOffSet = buffer.Offset();
byte[] bytes = buffer._buffer;
int length = checkSumEndOffSet - checkSumBeginOffset;
long checkSum = CRC32.CheckSum(bytes, checkSumBeginOffset, length);
buffer.Seek(checkSumOffset);
buffer.WriteLong(checkSum);
buffer.Seek(checkSumEndOffSet);
}