• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IReadBuffer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: ReadFrom

		private static Guid ReadFrom(IReadBuffer buffer)
		{
			byte[] guidBytes = new byte[GuidSize];
			buffer.ReadBytes(guidBytes);
			return new Guid(guidBytes);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:6,代码来源:GuidTypeHandler.cs


示例17: ReadElementTypeHandler

        private static ITypeHandler4 ReadElementTypeHandler(IReadBuffer buffer, IContext context)
        {
            int elementHandlerId = buffer.ReadInt();
            if (elementHandlerId == 0) return OpenTypeHandlerFrom(context);

            ITypeHandler4 elementHandler = Container(context).TypeHandlerForClassMetadataID(elementHandlerId);
            return elementHandler ?? OpenTypeHandlerFrom(context);
        }
开发者ID:Galigator,项目名称:db4o,代码行数:8,代码来源:SystemArrayTypeHandler.cs


示例18: ReadKeyValueTypeHandlers

		private KeyValueHandlerPair ReadKeyValueTypeHandlers(IReadBuffer buffer, IContext
			 context)
		{
			buffer.ReadInt();
			buffer.ReadInt();
			ITypeHandler4 untypedHandler = (ITypeHandler4)Container(context).Handlers.OpenTypeHandler
				();
			return new KeyValueHandlerPair(untypedHandler, untypedHandler);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:MapTypeHandler.cs


示例19: AbstractReadContext

		protected AbstractReadContext(Transaction transaction, IReadBuffer buffer) : base
			(transaction, buffer)
		{
		}
开发者ID:erdincay,项目名称:db4o,代码行数:4,代码来源:AbstractReadContext.cs


示例20: Read

		public override string Read(IReadBuffer buffer, int length)
		{
			byte[] bytes = new byte[length];
			buffer.ReadBytes(bytes);
			return Decode(bytes, 0, bytes.Length);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:6,代码来源:DelegatingStringIO.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IReadContext类代码示例发布时间:2022-05-24
下一篇:
C# IReactiveCommand类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap