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


C# ByteArrayBuffer.Length方法代码示例

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


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

示例1: AppendPayLoad

		private void AppendPayLoad(StatefulBuffer target, Pointer4 pointer, ByteArrayBuffer
			 payLoad)
		{
			target.WriteInt(payLoad.Length());
			target.WriteInt(pointer.Id());
			target.WriteInt(pointer.Address());
			target.Append(payLoad._buffer);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:8,代码来源:MsgObject.cs

示例2: GetWriterForBuffer

		public Db4objects.Db4o.CS.Internal.Messages.MsgD GetWriterForBuffer(Transaction trans
			, ByteArrayBuffer buffer)
		{
			Db4objects.Db4o.CS.Internal.Messages.MsgD writer = GetWriterForLength(trans, buffer
				.Length());
			writer.WriteBytes(buffer._buffer);
			return writer;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:MsgD.cs

示例3: GetWriterForBuffer

 public MsgD GetWriterForBuffer(Transaction trans
     , ByteArrayBuffer buffer)
 {
     var writer = GetWriterForLength(trans, buffer
         .Length());
     writer.WriteBytes(buffer._buffer);
     return writer;
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:MsgD.cs

示例4: GetWriter

		internal MsgD GetWriter(Transaction trans, Pointer4 pointer, ByteArrayBuffer buffer
			, int[] prependInts)
		{
			int lengthNeeded = buffer.Length() + LengthForFirst;
			if (prependInts != null)
			{
				lengthNeeded += (prependInts.Length * Const4.IntLength);
			}
			MsgD message = GetWriterForLength(trans, lengthNeeded);
			if (prependInts != null)
			{
				for (int i = 0; i < prependInts.Length; i++)
				{
					message._payLoad.WriteInt(prependInts[i]);
				}
			}
			AppendPayLoad(message._payLoad, pointer, buffer);
			return message;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:19,代码来源:MsgObject.cs

示例5: WriteBytes

		public override void WriteBytes(ByteArrayBuffer buffer, int blockedAddress, int addressOffset
			)
		{
			if (Deploy.debug && !Deploy.flush)
			{
				return;
			}
			if (Debug4.xbytes && Deploy.overwrite)
			{
				if (buffer.CheckXBytes())
				{
					CheckXBytes(blockedAddress, addressOffset, buffer.Length());
				}
				else
				{
					buffer.CheckXBytes(true);
				}
			}
			if (DTrace.enabled)
			{
				DTrace.WriteBytes.LogLength(blockedAddress + addressOffset, buffer.Length());
			}
			_file.BlockWrite(blockedAddress, addressOffset, buffer._buffer, buffer.Length());
			if (_backupFile != null)
			{
				_backupFile.BlockWrite(blockedAddress, addressOffset, buffer._buffer, buffer.Length
					());
			}
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:29,代码来源:IoAdaptedObjectContainer.cs

示例6: Encrypt

		public void Encrypt(ByteArrayBuffer reader)
		{
			if (i_encrypt)
			{
				byte[] bytes = reader._buffer;
				int encryptorOffSet = i_lastEncryptorByte;
				for (int i = reader.Length() - 1; i >= 0; i--)
				{
					bytes[i] -= i_encryptor[encryptorOffSet];
					if (encryptorOffSet == 0)
					{
						encryptorOffSet = i_lastEncryptorByte;
					}
					else
					{
						encryptorOffSet--;
					}
				}
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:20,代码来源:HandlerRegistry.cs

示例7: WriteBytes

 public override void WriteBytes(ByteArrayBuffer buffer, int address, int addressOffset
     )
 {
     _memoryBin.Write(address + addressOffset, buffer._buffer, buffer.Length());
 }
开发者ID:masroore,项目名称:db4o,代码行数:5,代码来源:TransportObjectContainer.cs

示例8: GetWriter

		public virtual Msg GetWriter(Transaction trans, ByteArrayBuffer bytes)
		{
			MsgD msg = GetWriterForLength(trans, bytes.Length());
			msg._payLoad.Append(bytes._buffer);
			return msg;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:6,代码来源:MReadBytes.cs

示例9: Write

		private void Write(IBin storage, ByteArrayBuffer buffer)
		{
			storage.Write(0, buffer._buffer, buffer.Length());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:4,代码来源:FileBasedTransactionLogHandler.cs

示例10: Read

		private void Read(IBin storage, ByteArrayBuffer buffer)
		{
			storage.Read(0, buffer._buffer, buffer.Length());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:4,代码来源:FileBasedTransactionLogHandler.cs

示例11: ProcessCopy

		public static void ProcessCopy(IDefragmentServices services, int sourceID, ISlotCopyHandler
			 command, ByteArrayBuffer sourceReader)
		{
			int targetID = services.StrictMappedID(sourceID);
			Slot targetSlot = services.AllocateTargetSlot(sourceReader.Length());
			services.Mapping().MapId(targetID, targetSlot);
			Db4objects.Db4o.Internal.DefragmentContextImpl context = new Db4objects.Db4o.Internal.DefragmentContextImpl
				(sourceReader, services);
			command.ProcessCopy(context);
			services.TargetWriteBytes(context, targetSlot.Address());
		}
开发者ID:erdincay,项目名称:db4o,代码行数:11,代码来源:DefragmentContextImpl.cs

示例12: BytesToSendFor

		private static byte[] BytesToSendFor(string message)
		{
			LatinStringIO io = new LatinStringIO();
			int marshalledStringLength = io.Length(message);
			ByteArrayBuffer buffer = new ByteArrayBuffer(marshalledStringLength + Const4.IntLength);

			buffer.WriteInt(marshalledStringLength);

			io.WriteLengthAndString(buffer, message);
			buffer.Seek(0);
			return buffer.ReadBytes(buffer.Length());
		}
开发者ID:erdincay,项目名称:db4o,代码行数:12,代码来源:SslSocketTestCase.cs

示例13: Decrypt

 public void Decrypt(ByteArrayBuffer reader)
 {
     if (i_encrypt)
     {
         var encryptorOffSet = i_lastEncryptorByte;
         var bytes = reader._buffer;
         for (var i = reader.Length() - 1; i >= 0; i--)
         {
             bytes[i] += i_encryptor[encryptorOffSet];
             if (encryptorOffSet == 0)
             {
                 encryptorOffSet = i_lastEncryptorByte;
             }
             else
             {
                 encryptorOffSet--;
             }
         }
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:20,代码来源:HandlerRegistry.cs


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