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


C# ByteArrayBuffer.ReadInt方法代码示例

本文整理汇总了C#中Db4objects.Db4o.Internal.ByteArrayBuffer.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# ByteArrayBuffer.ReadInt方法的具体用法?C# ByteArrayBuffer.ReadInt怎么用?C# ByteArrayBuffer.ReadInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Db4objects.Db4o.Internal.ByteArrayBuffer的用法示例。


在下文中一共展示了ByteArrayBuffer.ReadInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

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

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

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

示例4: ReadThis

		public override void ReadThis(Transaction trans, ByteArrayBuffer reader)
		{
			int length = reader.ReadInt();
			_ints = new int[length];
			for (int i = 0; i < length; i++)
			{
				_ints[i] = reader.ReadInt();
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:PersistentIntegerArray.cs

示例5: ReadThis

		public virtual void ReadThis(ByteArrayBuffer buffer)
		{
			SystemData().ConverterVersion(buffer.ReadInt());
			SystemData().FreespaceSystem(buffer.ReadByte());
			buffer.ReadInt();
			// was BTreeFreespaceId, converted to slot, can no longer be used
			SystemData().IdentityId(buffer.ReadInt());
			SystemData().LastTimeStampID(buffer.ReadLong());
			SystemData().UuidIndexId(buffer.ReadInt());
		}
开发者ID:erdincay,项目名称:db4o,代码行数:10,代码来源:FileHeaderVariablePart1.cs

示例6: ReadSpec

		public virtual RawClassSpec ReadSpec(Transaction trans, ByteArrayBuffer reader)
		{
			byte[] nameBytes = ReadName(trans, reader);
			string className = trans.Container().StringIO().Read(nameBytes);
			ReadMetaClassID(reader);
			// skip
			int ancestorID = reader.ReadInt();
			reader.IncrementOffset(Const4.IntLength);
			// index ID
			int numFields = reader.ReadInt();
			return new RawClassSpec(className, ancestorID, numFields);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:12,代码来源:ClassMarshaller.cs

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

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

示例9: Read

		public override object Read(ByteArrayBuffer buffer)
		{
			int size = buffer.ReadInt();
			int address = buffer.ReadInt();
			if (size > sizeLimit)
			{
				Db4objects.Db4o.Internal.Freespace.FreeSlotNode node = new Db4objects.Db4o.Internal.Freespace.FreeSlotNode
					(size);
				node.CreatePeer(address);
				if (Deploy.debug && Debug4.xbytes)
				{
					DebugCheckBuffer(buffer, node);
				}
				return node;
			}
			return null;
		}
开发者ID:Galigator,项目名称:db4o,代码行数:17,代码来源:FreeSlotNode.cs

示例10: ReadInteger

		public override object ReadInteger(ByteArrayBuffer bytes)
		{
			int value = bytes.ReadInt();
			if (value == int.MaxValue)
			{
				return null;
			}
			return value;
		}
开发者ID:Galigator,项目名称:db4o,代码行数:9,代码来源:PrimitiveMarshaller0.cs

示例11: ReadIndex

		protected override void ReadIndex(ObjectContainerBase stream, ClassMetadata clazz
			, ByteArrayBuffer reader)
		{
			int indexID = reader.ReadInt();
			if (indexID == 0)
			{
				return;
			}
			clazz.Index().Read(stream, indexID);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:10,代码来源:ClassMarshaller2.cs

示例12: ReadIndexEntry

		public virtual object ReadIndexEntry(IContext context, ByteArrayBuffer buffer)
		{
			int parentID = buffer.ReadInt();
			object objPart = _valueHandler.ReadIndexEntry(context, buffer);
			if (parentID < 0)
			{
				objPart = null;
				parentID = -parentID;
			}
			return new FieldIndexKeyImpl(parentID, objPart);
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:11,代码来源:FieldIndexKeyHandler.cs

示例13: Read

		public override object Read(ByteArrayBuffer a_bytes)
		{
			int key = a_bytes.ReadInt();
			object obj = null;
			if (_object is TreeInt)
			{
				obj = new TreeReader(a_bytes, (IReadable)_object).Read();
			}
			else
			{
				obj = ((IReadable)_object).Read(a_bytes);
			}
			return new Db4objects.Db4o.Internal.TreeIntObject(key, obj);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:14,代码来源:TreeIntObject.cs

示例14: Read

		protected override void Read(LocalObjectContainer container, ByteArrayBuffer reader
			)
		{
			NewTimerFileLock(container);
			OldEncryptionOff(container);
			CheckThreadFileLock(container, reader);
			reader.Seek(BlocksizeOffset);
			container.BlockSizeReadFromFile(reader.ReadInt());
			SystemData systemData = container.SystemData();
			systemData.ClassCollectionID(reader.ReadInt());
			container.SystemData().IdSystemType(reader.ReadByte());
			_variablePart = CreateVariablePart(container);
			int variablePartAddress = reader.ReadInt();
			int variablePartLength = reader.ReadInt();
			_variablePart.Read(variablePartAddress, variablePartLength);
			_transactionPointerAddress = reader.ReadInt();
			if (_transactionPointerAddress != 0)
			{
				ByteArrayBuffer buffer = new ByteArrayBuffer(TransactionPointerLength);
				buffer.Read(container, _transactionPointerAddress, 0);
				systemData.TransactionPointer1(buffer.ReadInt());
				systemData.TransactionPointer2(buffer.ReadInt());
			}
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:24,代码来源:FileHeader2.cs

示例15: ReadSpec

		protected override RawFieldSpec ReadSpec(AspectType aspectType, ObjectContainerBase
			 stream, ByteArrayBuffer reader)
		{
			RawFieldSpec spec = base.ReadSpec(aspectType, stream, reader);
			if (spec == null)
			{
				return null;
			}
			if (spec.IsVirtual())
			{
				return spec;
			}
			int indexID = reader.ReadInt();
			spec.IndexID(indexID);
			return spec;
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:16,代码来源:FieldMarshaller1.cs


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