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


C# IReadBuffer类代码示例

本文整理汇总了C#中IReadBuffer的典型用法代码示例。如果您正苦于以下问题:C# IReadBuffer类的具体用法?C# IReadBuffer怎么用?C# IReadBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: ReadTypeInfo

		public virtual void ReadTypeInfo(Transaction trans, IReadBuffer buffer, ArrayInfo
			 info, int classID)
		{
			BitMap4 typeInfoBitmap = new BitMap4(buffer.ReadByte());
			info.Primitive(typeInfoBitmap.IsTrue(0));
			info.Nullable(typeInfoBitmap.IsTrue(1));
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:ArrayVersionHelper.cs

示例2: SeekSecondaryOffset

		protected override void SeekSecondaryOffset(IReadBuffer buffer, ITypeHandler4 typeHandler
			)
		{
			if (Handlers4.HandlesPrimitiveArray(typeHandler))
			{
				buffer.Seek(buffer.ReadInt());
			}
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:OpenTypeHandler2.cs

示例3: ReadLengthAndString

		public virtual string ReadLengthAndString(IReadBuffer buffer)
		{
			int length = buffer.ReadInt();
			if (length == 0)
			{
				return string.Empty;
			}
			return Read(buffer, length);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:9,代码来源:LatinStringIO.cs

示例4: DoWithSlotIndirection

 public virtual object DoWithSlotIndirection(IReadBuffer buffer, ITypeHandler4 typeHandler
     , IClosure4 closure)
 {
     if (!IsIndirectedWithinSlot(typeHandler))
     {
         return closure.Run();
     }
     return DoWithSlotIndirection(buffer, closure);
 }
开发者ID:masroore,项目名称:db4o,代码行数:9,代码来源:SlotFormat.cs

示例5: Read

		public virtual string Read(IReadBuffer buffer, int length)
		{
			char[] chars = new char[length];
			for (int ii = 0; ii < length; ii++)
			{
				chars[ii] = (char)(buffer.ReadByte() & unchecked((int)(0xff)));
			}
			return new string(chars, 0, length);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:9,代码来源:LatinStringIO.cs

示例6: Read

 public override string Read(IReadBuffer buffer, int length)
 {
     var chars = new char[length];
     for (var ii = 0; ii < length; ii++)
     {
         chars[ii] = (char) ((buffer.ReadByte() & unchecked(0xff)) | ((buffer.ReadByte
             () & unchecked(0xff)) << 8));
     }
     return new string(chars, 0, length);
 }
开发者ID:masroore,项目名称:db4o,代码行数:10,代码来源:UnicodeStringIO.cs

示例7: QueryingReadContext

		private QueryingReadContext(Transaction transaction, QCandidates candidates, int 
			handlerVersion, IReadBuffer buffer, int collectionID, IdObjectCollector collector
			) : base(transaction, buffer)
		{
			_candidates = candidates;
			_activationDepth = new LegacyActivationDepth(0);
			_collectionID = collectionID;
			_handlerVersion = handlerVersion;
			_collector = collector;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:10,代码来源:QueryingReadContext.cs

示例8: ReadDimensions

 private void ReadDimensions(ArrayInfo info, IReadBuffer buffer, int dimensionCount
     )
 {
     var dim = new int[dimensionCount];
     for (var i = 0; i < dim.Length; i++)
     {
         dim[i] = buffer.ReadInt();
     }
     ((MultidimensionalArrayInfo) info).Dimensions(dim);
     info.ElementCount(ElementCount(dim));
 }
开发者ID:masroore,项目名称:db4o,代码行数:11,代码来源:MultidimensionalArrayHandler.cs

示例9: ReadLong

 public static long ReadLong(IReadBuffer buffer)
 {
     long ret = 0;
     if (Deploy.debug && Deploy.debugLong)
     {
         ret = long.Parse(new LatinStringIO().Read(buffer, Const4.LongBytes).Trim());
     }
     for (var i = 0; i < Const4.LongBytes; i++)
     {
         ret = (ret << 8) + (buffer.ReadByte() & unchecked(0xff));
     }
     return ret;
 }
开发者ID:masroore,项目名称:db4o,代码行数:13,代码来源:LongHandler.cs

示例10: DoWithSlotIndirection

		public virtual object DoWithSlotIndirection(IReadBuffer buffer, IClosure4 closure
			)
		{
			int payLoadOffset = buffer.ReadInt();
			buffer.ReadInt();
			// length, not used
			int savedOffset = buffer.Offset();
			object res = null;
			if (payLoadOffset != 0)
			{
				buffer.Seek(payLoadOffset);
				res = closure.Run();
			}
			buffer.Seek(savedOffset);
			return res;
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:16,代码来源:SlotFormat.cs

示例11: _IClosure4_318

 public _IClosure4_318(QCandidate _enclosing, ITypeHandler4 arrayElementHandler, IReadBuffer
     buffer, QCandidates candidates)
 {
     this._enclosing = _enclosing;
     this.arrayElementHandler = arrayElementHandler;
     this.buffer = buffer;
     this.candidates = candidates;
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:QCandidate.cs

示例12: ReadArrayCandidates

 private void ReadArrayCandidates(ITypeHandler4 typeHandler, IReadBuffer buffer, ITypeHandler4
     arrayElementHandler, QCandidates candidates)
 {
     if (!Handlers4.IsCascading(arrayElementHandler))
     {
         return;
     }
     var slotFormat = SlotFormat.ForHandlerVersion(_handlerVersion);
     slotFormat.DoWithSlotIndirection(buffer, typeHandler, new _IClosure4_318(this, arrayElementHandler
         , buffer, candidates));
 }
开发者ID:masroore,项目名称:db4o,代码行数:11,代码来源:QCandidate.cs

示例13: ReadEnd

 public static void ReadEnd(IReadBuffer buffer)
 {
     if (Deploy.debug && Deploy.brackets)
     {
         if (buffer.ReadByte() != Const4.Yapend)
         {
             throw new Exception("Debug.readEnd() YAPEND expected");
         }
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:10,代码来源:Debug4.cs

示例14: _CollectIdContext_203

			public _CollectIdContext_203(QueryingReadContext readContext, Transaction baseArg1
				, IdObjectCollector baseArg2, ObjectHeader baseArg3, IReadBuffer baseArg4) : base
				(baseArg1, baseArg2, baseArg3, baseArg4)
			{
				this.readContext = readContext;
			}
开发者ID:Galigator,项目名称:db4o,代码行数:6,代码来源:OpenTypeHandler.cs

示例15: ReadStringNoDebug

 public static string ReadStringNoDebug(IContext context, IReadBuffer buffer)
 {
     return Intern(context, StringIo(context).ReadLengthAndString(buffer));
 }
开发者ID:masroore,项目名称:db4o,代码行数:4,代码来源:StringHandler.cs


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