本文整理汇总了C#中Db4objects.Db4o.Internal.ClassMetadata.ClassReflector方法的典型用法代码示例。如果您正苦于以下问题:C# ClassMetadata.ClassReflector方法的具体用法?C# ClassMetadata.ClassReflector怎么用?C# ClassMetadata.ClassReflector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Internal.ClassMetadata
的用法示例。
在下文中一共展示了ClassMetadata.ClassReflector方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SkipClass
public virtual bool SkipClass(ClassMetadata classMetadata)
{
if (classMetadata.GetName() == null)
{
return true;
}
IReflectClass claxx = classMetadata.ClassReflector();
if (Stream()._handlers.IclassInternal.IsAssignableFrom(claxx))
{
return true;
}
return false;
}
示例2: AddClassMetadata
public void AddClassMetadata(ClassMetadata clazz)
{
Container().SetDirtyInSystemTransaction(this);
_classes.Add(clazz);
if (clazz.StateUnread())
{
_classMetadataByBytes.Put(clazz.i_nameBytes, clazz);
}
else
{
_classMetadataByClass.Put(clazz.ClassReflector(), clazz);
}
RegisterClassMetadataById(clazz);
}
示例3: IsTAAware
private bool IsTAAware(ClassMetadata classMetadata)
{
GenericReflector reflector = classMetadata.Reflector();
return reflector.ForClass(typeof(IActivatable)).IsAssignableFrom(classMetadata.ClassReflector
());
}
示例4: RefreshClassCache
public void RefreshClassCache(ClassMetadata clazz, IReflectClass oldReflector)
{
if (clazz.StateUnread())
{
_classMetadataByBytes.Put(clazz.ReadName(_systemTransaction), clazz);
}
else
{
if (oldReflector != null)
{
_classMetadataByClass.Remove(oldReflector);
}
_classMetadataByClass.Put(clazz.ClassReflector(), clazz);
}
}
示例5: ReadClassMetadata
public ClassMetadata ReadClassMetadata(ClassMetadata classMetadata, IReflectClass
clazz)
{
if (classMetadata == null)
{
throw new ArgumentNullException();
}
if (!classMetadata.StateUnread())
{
return classMetadata;
}
_classMetadataCreationDepth++;
try
{
classMetadata.CreateConfigAndConstructor(_classMetadataByBytes, clazz);
IReflectClass claxx = classMetadata.ClassReflector();
if (claxx != null)
{
_classMetadataByClass.Put(claxx, classMetadata);
classMetadata.ReadThis();
classMetadata.CheckChanges();
_initClassMetadataOnUp.Add(classMetadata);
}
}
finally
{
_classMetadataCreationDepth--;
}
InitClassMetadataOnUp();
return classMetadata;
}
示例6: ClassReflector
public virtual IReflectClass ClassReflector(IReflector reflector, ClassMetadata classMetadata
, bool isPrimitive)
{
return isPrimitive ? Handlers4.PrimitiveClassReflector(classMetadata, reflector) :
classMetadata.ClassReflector();
}
示例7: IsAssignableFrom
public virtual bool IsAssignableFrom(ClassMetadata other
)
{
return ClassReflector().IsAssignableFrom(other.ClassReflector());
}
示例8: OnClassRegistered
public void OnClassRegistered(ClassMetadata clazz)
{
// if(Platform4.isDb4oClass(clazz.getName())) {
// return;
// }
IReflectClass reflectClass = clazz.ClassReflector();
if (this.ActivatableClass().IsAssignableFrom(reflectClass))
{
return;
}
if (this.HasNoActivatingFields(reflectClass))
{
return;
}
NotTransparentActivationEnabled diagnostic = new NotTransparentActivationEnabled(
clazz);
DiagnosticProcessor processor = this._container.Handlers.DiagnosticProcessor();
processor.OnDiagnostic(diagnostic);
}
示例9: AddFieldConstraint
private void AddFieldConstraint(ClassMetadata containingClass, FieldMetadata field
)
{
QConClass qcc = new QConClass(this._enclosing._trans, null, field.QField(this._enclosing
._trans), containingClass.ClassReflector());
this._enclosing.AddConstraint(qcc);
this._enclosing.ToConstraint(this._enclosing.i_constraints).Or(qcc);
}
示例10: ReadClassMetadata
internal virtual Db4objects.Db4o.Internal.ClassMetadata ReadClassMetadata()
{
if (_classMetadata == null)
{
Read();
if (_bytes != null)
{
Seek(0);
ObjectContainerBase stream = Container();
ObjectHeader objectHeader = new ObjectHeader(stream, _bytes);
_classMetadata = objectHeader.ClassMetadata();
if (_classMetadata != null)
{
if (stream._handlers.IclassCompare.IsAssignableFrom(_classMetadata.ClassReflector
()))
{
ReadThis(false);
}
}
}
}
return _classMetadata;
}