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

C# Marshall.QueryingReadContext类代码示例

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

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



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

示例1: CollectIDs

 //    	throw new IllegalStateException();
 public virtual void CollectIDs(QueryingReadContext readContext)
 {
     IInternalReadContext context = readContext;
     var payloadOffset = context.ReadInt();
     if (payloadOffset == 0)
     {
         return;
     }
     var savedOffSet = context.Offset();
     try
     {
         var typeHandler = ReadTypeHandler(context, payloadOffset);
         if (typeHandler == null)
         {
             return;
         }
         SeekSecondaryOffset(context, typeHandler);
         if (IsPlainObject(typeHandler))
         {
             readContext.Collector().AddId(readContext.ReadInt());
             return;
         }
         CollectIdContext collectIdContext = new _CollectIdContext_203(readContext, readContext
             .Transaction(), readContext.Collector(), null, readContext.Buffer());
         Handlers4.CollectIdsInternal(collectIdContext, context.Container().Handlers.CorrectHandlerVersion
             (typeHandler, context.HandlerVersion()), 0, false);
     }
     finally
     {
         context.Seek(savedOffSet);
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:33,代码来源:OpenTypeHandler.cs


示例2: Run

			public object Run()
			{
				QueryingReadContext queryingReadContext = new QueryingReadContext(context.Transaction
					(), context.HandlerVersion(), context.Buffer(), 0, context.Collector());
				((ICascadingTypeHandler)this._enclosing._typeHandler).CollectIDs(queryingReadContext
					);
				return null;
			}
开发者ID:superyfwy,项目名称:db4o,代码行数:8,代码来源:TypeHandlerAspect.cs


示例3: CollectIDs

		public virtual void CollectIDs(QueryingReadContext context)
		{
			ITypeHandler4 elementHandler = ReadElementTypeHandler(context, context);
			int elementCount = context.ReadInt();
			for (int i = 0; i < elementCount; i++)
			{
				context.ReadId(elementHandler);
			}
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:9,代码来源:GenericCollectionTypeHandler.cs


示例4: CollectIDs

 public virtual void CollectIDs(QueryingReadContext context)
 {
     var handlers = ReadKeyValueTypeHandlers(context, context);
     var elementCount = context.ReadInt();
     for (var i = 0; i < elementCount; i++)
     {
         context.ReadId(handlers._keyHandler);
         context.SkipId(handlers._valueHandler);
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:10,代码来源:MapTypeHandler.cs


示例5: ReadCandidateHandler

		public virtual ITypeHandler4 ReadCandidateHandler(QueryingReadContext context)
		{
			int payLoadOffSet = context.ReadInt();
			if (payLoadOffSet == 0)
			{
				return null;
			}
			context.Seek(payLoadOffSet);
			int classMetadataID = context.ReadInt();
			ClassMetadata classMetadata = context.Container().ClassMetadataForID(classMetadataID
				);
			if (classMetadata == null)
			{
				return null;
			}
			return classMetadata.ReadCandidateHandler(context);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:17,代码来源:OpenTypeHandler.cs


示例6: ReadCandidateHandler

		public override ITypeHandler4 ReadCandidateHandler(QueryingReadContext context)
		{
			int id = 0;
			int offset = context.Offset();
			try
			{
				id = context.ReadInt();
			}
			catch (Exception)
			{
			}
			context.Seek(offset);
			if (id != 0)
			{
				StatefulBuffer reader = context.Container().ReadStatefulBufferById(context.Transaction
					(), id);
				if (reader != null)
				{
					ObjectHeader oh = new ObjectHeader(context.Container(), reader);
					try
					{
						if (oh.ClassMetadata() != null)
						{
							context.Buffer(reader);
							return oh.ClassMetadata().SeekCandidateHandler(context);
						}
					}
					catch (Exception e)
					{
					}
				}
			}
			// TODO: Check Exception Types
			// Errors typically occur, if classes don't match
			return null;
		}
开发者ID:Galigator,项目名称:db4o,代码行数:36,代码来源:OpenTypeHandler0.cs


示例7: ReadCandidateHandler

 // TODO Auto-generated method stub
 public virtual ITypeHandler4 ReadCandidateHandler(QueryingReadContext context)
 {
     // TODO Auto-generated method stub
     return null;
 }
开发者ID:masroore,项目名称:db4o,代码行数:6,代码来源:BigSetTypeHandler.cs


示例8: CollectIDs

 // TODO Auto-generated method stub
 public virtual void CollectIDs(QueryingReadContext context)
 {
 }
开发者ID:masroore,项目名称:db4o,代码行数:4,代码来源:BigSetTypeHandler.cs


示例9: ReadFieldValue

 private object ReadFieldValue(int id, FieldMetadata field)
 {
     var buffer = BufferFor(id);
     var handlerVersion = field.ContainingClass().SeekToField(_transaction,
         buffer, field);
     if (handlerVersion == HandlerVersion.Invalid)
     {
         return null;
     }
     var context = new QueryingReadContext(_transaction, handlerVersion
         ._number, buffer, id);
     return field.Read(context);
 }
开发者ID:masroore,项目名称:db4o,代码行数:13,代码来源:SodaQueryComparator.cs


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


示例11: CollectIdsInternal

		public static void CollectIdsInternal(CollectIdContext context, ITypeHandler4 handler
			, int linkLength, bool doWithSlotIndirection)
		{
			if (!(IsCascading(handler)))
			{
				IReadBuffer buffer = context.Buffer();
				buffer.Seek(buffer.Offset() + linkLength);
				return;
			}
			if (handler is StandardReferenceTypeHandler)
			{
				context.AddId();
				return;
			}
			LocalObjectContainer container = (LocalObjectContainer)context.Container();
			SlotFormat slotFormat = context.SlotFormat();
			if (HandleAsObject(handler))
			{
				// TODO: Code is similar to QCandidate.readArrayCandidates. Try to refactor to one place.
				int collectionID = context.ReadInt();
				ByteArrayBuffer collectionBuffer = container.ReadBufferById(context.Transaction()
					, collectionID);
				ObjectHeader objectHeader = new ObjectHeader(container, collectionBuffer);
				QueryingReadContext subContext = new QueryingReadContext(context.Transaction(), context
					.HandlerVersion(), collectionBuffer, collectionID, context.Collector());
				objectHeader.ClassMetadata().CollectIDs(subContext);
				return;
			}
			QueryingReadContext queryingReadContext = new QueryingReadContext(context.Transaction
				(), context.HandlerVersion(), context.Buffer(), 0, context.Collector());
			IClosure4 collectIDsFromQueryingContext = new _IClosure4_263(handler, queryingReadContext
				);
			if (doWithSlotIndirection)
			{
				slotFormat.DoWithSlotIndirection(queryingReadContext, handler, collectIDsFromQueryingContext
					);
			}
			else
			{
				collectIDsFromQueryingContext.Run();
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:42,代码来源:Handlers4.cs


示例12: CollectIDs

		public static void CollectIDs(QueryingReadContext context, ITypeHandler4 typeHandler
			)
		{
			if (typeHandler is ICascadingTypeHandler)
			{
				((ICascadingTypeHandler)typeHandler).CollectIDs(context);
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:Handlers4.cs


示例13: _IVisitor4_390

 public _IVisitor4_390(QueryingReadContext context)
 {
     this.context = context;
 }
开发者ID:masroore,项目名称:db4o,代码行数:4,代码来源:StandardReferenceTypeHandler.cs


示例14: CollectIDsByTypehandlerAspect

 /// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
 private bool CollectIDsByTypehandlerAspect(QueryingReadContext context)
 {
     var aspectFound = new BooleanByRef(false);
     var subContext = CollectIdContext.ForID(context.Transaction(), context
         .Collector(), context.CollectionID());
     ITraverseAspectCommand command = new _MarshallingInfoTraverseAspectCommand_349(this
         , aspectFound, subContext, EnsureFieldList(subContext));
     TraverseAllAspects(subContext, command);
     return aspectFound.value;
 }
开发者ID:masroore,项目名称:db4o,代码行数:11,代码来源:StandardReferenceTypeHandler.cs


示例15: CollectIDsByInstantiatingCollection

 /// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
 private void CollectIDsByInstantiatingCollection(QueryingReadContext context)
 {
     var id = context.CollectionID();
     if (id == 0)
     {
         return;
     }
     var transaction = context.Transaction();
     var container = context.Container();
     var obj = container.GetByID(transaction, id);
     if (obj == null)
     {
         return;
     }
     // FIXME: [TA] review activation depth
     var depth = DepthUtil.AdjustDepthToBorders(2);
     container.Activate(transaction, obj, container.ActivationDepthProvider().ActivationDepth
         (depth, ActivationMode.Activate));
     Platform4.ForEachCollectionElement(obj, new _IVisitor4_390(context));
 }
开发者ID:masroore,项目名称:db4o,代码行数:21,代码来源:StandardReferenceTypeHandler.cs


示例16: CollectIDs

 /// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
 public virtual void CollectIDs(QueryingReadContext context)
 {
     if (CollectIDsByTypehandlerAspect(context))
     {
         return;
     }
     CollectIDsByInstantiatingCollection(context);
 }
开发者ID:masroore,项目名称:db4o,代码行数:9,代码来源:StandardReferenceTypeHandler.cs


示例17: ReadCandidateHandler

 public virtual ITypeHandler4 ReadCandidateHandler(QueryingReadContext context)
 {
     if (ClassMetadata().IsArray())
     {
         return this;
     }
     return null;
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:StandardReferenceTypeHandler.cs


示例18: CollectIDs

 public virtual void CollectIDs(QueryingReadContext context)
 {
     throw new NotImplementedException();
 }
开发者ID:masroore,项目名称:db4o,代码行数:4,代码来源:TranslatorToTypehandlerMigrationTestCase.cs


示例19: ReadCandidateHandler

 public virtual ITypeHandler4 ReadCandidateHandler(QueryingReadContext context)
 {
     return this;
 }
开发者ID:Galigator,项目名称:db4o,代码行数:4,代码来源:SystemArrayTypeHandler.cs


示例20: _IRunnable_71

			public _IRunnable_71(QueryingReadContext context, ITypeHandler4 handler)
			{
				this.context = context;
				this.handler = handler;
			}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:ArrayHandler.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Processor.QCon类代码示例发布时间:2022-05-24
下一篇:
C# Btree.BTreeNode类代码示例发布时间: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