本文整理汇总了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;
}
示例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());
}
示例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);
}
示例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);
}
示例5: ErasedFieldType
public static ClassMetadata ErasedFieldType(ObjectContainerBase container, IReflectClass
fieldType)
{
return fieldType.IsInterface() ? container.ClassMetadataForID(UntypedId) : container
.ProduceClassMetadata(BaseType(fieldType));
}