当前位置: 首页>>代码示例>>C#>>正文


C# ByteArrayBuffer.WriteLong方法代码示例

本文整理汇总了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);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:10,代码来源:DateHandlerBase.cs

示例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);
 }
开发者ID:masroore,项目名称:db4o,代码行数:10,代码来源:EnumTypeHandler.cs

示例3: Write

		public override void Write(object a_object, ByteArrayBuffer a_bytes)
		{
			a_bytes.WriteLong(Platform4.DoubleToLong(((double)a_object)));
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:4,代码来源:DoubleHandler.cs

示例4: WriteIndexEntry

			public virtual void WriteIndexEntry(IContext context, ByteArrayBuffer writer, object
				 obj)
			{
				writer.WriteInt(((CommitTimestampSupport.TimestampEntry)obj).ParentID());
				writer.WriteLong(((CommitTimestampSupport.TimestampEntry)obj).GetCommitTimestamp(
					));
			}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:CommitTimestampSupport.cs

示例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());
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:14,代码来源:FileHeaderVariablePart2.cs

示例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);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:14,代码来源:FileHeaderVariablePart2.cs


注:本文中的Db4objects.Db4o.Internal.ByteArrayBuffer.WriteLong方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。