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


C# ByteArrayBuffer.WriteInt方法代码示例

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

示例2: 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

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

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

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

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

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

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

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

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

示例11: Write

		public virtual void Write(ByteArrayBuffer buffer)
		{
			buffer.WriteInt(_id);
			buffer.WriteInt(_address);
			buffer.WriteInt(_length);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:6,代码来源:IdSlotMapping.cs

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

示例13: WriteInt

		public static void WriteInt(int a_int, ByteArrayBuffer a_bytes)
		{
			a_bytes.WriteInt(a_int);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:4,代码来源:IntHandler.cs

示例14: WriteObjectClassID

		private void WriteObjectClassID(ByteArrayBuffer reader, int id)
		{
			reader.WriteInt(-id);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:4,代码来源:MarshallingContext.cs

示例15: Write

		public virtual void Write(ByteArrayBuffer buffer)
		{
			buffer.WriteInt(PersistentGeneratorValue());
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:4,代码来源:SequentialIdGenerator.cs


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