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


C# ObjectContainerBase.ClassMetadataForID方法代码示例

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


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

示例1: ReflectClassFromElementsEntry

		public override IReflectClass ReflectClassFromElementsEntry(ObjectContainerBase container
			, ArrayInfo info, int classID)
		{
			if (classID == Const4.IgnoreId)
			{
				// TODO: Here is a low-frequency mistake, extremely unlikely.
				// If classID == 99999 by accident then we will get ignore.
				return null;
			}
			info.Primitive(false);
			if (UseJavaHandling())
			{
				if (classID < Const4.Primitive)
				{
					info.Primitive(true);
					classID -= Const4.Primitive;
				}
			}
			classID = -classID;
			ClassMetadata classMetadata = container.ClassMetadataForID(classID);
			if (classMetadata != null)
			{
				return ClassReflector(container.Reflector(), classMetadata, info.Primitive());
			}
			return null;
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:26,代码来源:ArrayVersionHelper3.cs

示例2: ReflectClassFromElementsEntry

		public virtual IReflectClass ReflectClassFromElementsEntry(ObjectContainerBase container
			, ArrayInfo info, int classID)
		{
			if (classID == 0)
			{
				return null;
			}
			ClassMetadata classMetadata = container.ClassMetadataForID(classID);
			if (classMetadata == null)
			{
				return null;
			}
			return ClassReflector(container.Reflector(), classMetadata, info.Primitive());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:14,代码来源:ArrayVersionHelper.cs

示例3: ObjectHeader

		private ObjectHeader(ObjectContainerBase container, Db4objects.Db4o.Internal.ClassMetadata
			 classMetadata, IReadWriteBuffer reader)
		{
			int classID = reader.ReadInt();
			_marshallerFamily = ReadMarshallerFamily(reader, classID);
			classID = NormalizeID(classID);
			_classMetadata = (classMetadata != null ? classMetadata : container.ClassMetadataForID
				(classID));
			// This check has been added to cope with defragment in debug mode: SlotDefragment#setIdentity()
			// will trigger calling this constructor with a source db class metadata and a target db stream,
			// thus _classMetadata==null. There may be a better solution, since this call is just meant to
			// skip the object header.
			_headerAttributes = SlotFormat().ReadHeaderAttributes((ByteArrayBuffer)reader);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:14,代码来源:ObjectHeader.cs

示例4: Read

		public void Read(ObjectContainerBase stream, ClassMetadata clazz, ByteArrayBuffer
			 reader)
		{
			clazz.SetAncestor(stream.ClassMetadataForID(reader.ReadInt()));
			//        if(clazz.callConstructor()){
			//            // The logic further down checks the ancestor YapClass, whether
			//            // or not it is allowed, not to call constructors. The ancestor
			//            // YapClass may possibly have not been loaded yet.
			//            clazz.createConstructor(true);
			//        }
			clazz.CheckType();
			ReadIndex(stream, clazz, reader);
			clazz._aspects = ReadAspects(stream, reader, clazz);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:14,代码来源:ClassMarshaller.cs

示例5: ErasedFieldType

		public static ClassMetadata ErasedFieldType(ObjectContainerBase container, IReflectClass
			 fieldType)
		{
			return fieldType.IsInterface() ? container.ClassMetadataForID(UntypedId) : container
				.ProduceClassMetadata(BaseType(fieldType));
		}
开发者ID:erdincay,项目名称:db4o,代码行数:6,代码来源:Handlers4.cs


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