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


C# ByteArrayBuffer.ReadByte方法代码示例

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


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

示例1: Read1

		internal override object Read1(ByteArrayBuffer a_bytes)
		{
			byte b1 = a_bytes.ReadByte();
			byte b2 = a_bytes.ReadByte();
			char ret = (char)((b1 & unchecked((int)(0xff))) | ((b2 & unchecked((int)(0xff))) 
				<< 8));
			return ret;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:8,代码来源:CharHandler.cs

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

示例3: TestCopy

		public virtual void TestCopy()
		{
			ByteArrayBuffer from = new ByteArrayBuffer(Readerlength);
			for (int i = 0; i < Readerlength; i++)
			{
				from.WriteByte((byte)i);
			}
			ByteArrayBuffer to = new ByteArrayBuffer(Readerlength - 1);
			from.CopyTo(to, 1, 2, 10);
			Assert.AreEqual(0, to.ReadByte());
			Assert.AreEqual(0, to.ReadByte());
			for (int i = 1; i <= 10; i++)
			{
				Assert.AreEqual((byte)i, to.ReadByte());
			}
			for (int i = 12; i < Readerlength - 1; i++)
			{
				Assert.AreEqual(0, to.ReadByte());
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:20,代码来源:BufferTestCase.cs

示例4: Read1

		internal override object Read1(ByteArrayBuffer a_bytes)
		{
			byte ret = a_bytes.ReadByte();
			if (ret == True)
			{
				return true;
			}
			if (ret == False)
			{
				return false;
			}
			return null;
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:13,代码来源:BooleanHandler.cs

示例5: ReadSpec

		protected override RawFieldSpec ReadSpec(AspectType aspectType, ObjectContainerBase
			 stream, ByteArrayBuffer reader)
		{
			string name = StringHandler.ReadStringNoDebug(stream.Transaction.Context(), reader
				);
			if (!aspectType.IsFieldMetadata())
			{
				return new RawFieldSpec(aspectType, name);
			}
			if (name.IndexOf(Const4.VirtualFieldPrefix) == 0)
			{
				if (stream._handlers.VirtualFieldByName(name) != null)
				{
					return new RawFieldSpec(aspectType, name);
				}
			}
			int fieldTypeID = reader.ReadInt();
			byte attribs = reader.ReadByte();
			return new RawFieldSpec(aspectType, name, fieldTypeID, attribs);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:20,代码来源:FieldMarshaller0.cs

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

示例7: SignatureMatches

		protected virtual bool SignatureMatches(ByteArrayBuffer reader, byte[] signature, 
			byte version)
		{
			for (int i = 0; i < signature.Length; i++)
			{
				if (reader.ReadByte() != signature[i])
				{
					return false;
				}
			}
			return reader.ReadByte() == version;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:12,代码来源:FileHeader.cs

示例8: ReadNodeHeader

		private void ReadNodeHeader(ByteArrayBuffer reader)
		{
			_count = reader.ReadInt();
			byte leafByte = reader.ReadByte();
			_isLeaf = (leafByte == 1);
			_parentID = reader.ReadInt();
			_previousID = reader.ReadInt();
			_nextID = reader.ReadInt();
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:9,代码来源:BTreeNode.cs

示例9: Read1

		internal override object Read1(ByteArrayBuffer a_bytes)
		{
			byte ret = a_bytes.ReadByte();
			return ret;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:5,代码来源:ByteHandler.cs

示例10: ReadSpec

		protected override RawFieldSpec ReadSpec(AspectType aspectType, ObjectContainerBase
			 stream, ByteArrayBuffer reader)
		{
			return base.ReadSpec(AspectType.ForByte(reader.ReadByte()), stream, reader);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:5,代码来源:FieldMarshaller2.cs

示例11: TestLinkOffset

		public virtual void TestLinkOffset()
		{
			int linkOffset = 7;
			MarshallingBuffer buffer = new MarshallingBuffer();
			buffer.WriteInt(Data1);
			buffer.WriteByte(Data2);
			MarshallingBuffer child = buffer.AddChild();
			child.WriteInt(Data3);
			child.WriteInt(Data4);
			MarshallingBuffer grandChild = child.AddChild();
			grandChild.WriteInt(Data5);
			buffer.MergeChildren(null, 0, linkOffset);
			ByteArrayBuffer content = InspectContent(buffer);
			ByteArrayBuffer extendedBuffer = new ByteArrayBuffer(content.Length() + linkOffset
				);
			content.CopyTo(extendedBuffer, 0, linkOffset, content.Length());
			extendedBuffer.Seek(linkOffset);
			Assert.AreEqual(Data1, extendedBuffer.ReadInt());
			Assert.AreEqual(Data2, extendedBuffer.ReadByte());
			int address = extendedBuffer.ReadInt();
			extendedBuffer.Seek(address);
			Assert.AreEqual(Data3, extendedBuffer.ReadInt());
			Assert.AreEqual(Data4, extendedBuffer.ReadInt());
			address = extendedBuffer.ReadInt();
			extendedBuffer.Seek(address);
			Assert.AreEqual(Data5, extendedBuffer.ReadInt());
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:27,代码来源:MarshallingBufferTestCase.cs

示例12: CheckParentTransaction

		protected Db4objects.Db4o.Internal.Transaction CheckParentTransaction(Db4objects.Db4o.Internal.Transaction
			 a_trans, ByteArrayBuffer reader)
		{
			if (reader.ReadByte() == Const4.SystemTrans && a_trans.ParentTransaction() != null)
			{
				return a_trans.ParentTransaction();
			}
			return a_trans;
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:9,代码来源:Msg.cs

示例13: ReadBuffer

		protected virtual void ReadBuffer(ByteArrayBuffer buffer, bool versionsAreConsistent
			)
		{
			buffer.IncrementOffset(ChecksumLength);
			SystemData systemData = SystemData();
			systemData.IdSystemSlot(ReadSlot(buffer, false));
			systemData.InMemoryFreespaceSlot(ReadSlot(buffer, !versionsAreConsistent));
			systemData.BTreeFreespaceId(buffer.ReadInt());
			systemData.ConverterVersion(buffer.ReadInt());
			systemData.UuidIndexId(buffer.ReadInt());
			systemData.IdentityId(buffer.ReadInt());
			systemData.LastTimeStampID(buffer.ReadLong());
			systemData.FreespaceSystem(buffer.ReadByte());
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:14,代码来源:FileHeaderVariablePart2.cs


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