internal bool FieldExists(string field) { ClassMetadataIterator i = Iterator(); while (i.MoveNext()) { if (i.CurrentClass().FieldMetadataForName(field) != null) { return(true); } } return(false); }
public void AttachQueryNode(string fieldName, IVisitor4 visitor) { ClassMetadataIterator i = Iterator(); while (i.MoveNext()) { ClassMetadata classMetadata = i.CurrentClass(); if (!classMetadata.IsInternal()) { classMetadata.TraverseAllAspects(new _TraverseFieldCommand_65(fieldName, visitor, classMetadata)); } } }
public void IterateTopLevelClasses(IVisitor4 visitor) { ClassMetadataIterator i = Iterator(); while (i.MoveNext()) { ClassMetadata classMetadata = i.CurrentClass(); if (!classMetadata.IsInternal()) { if (classMetadata.GetAncestor() == null) { visitor.Visit(classMetadata); } } } }
public Collection4 ForInterface(IReflectClass claxx) { Collection4 col = new Collection4(); ClassMetadataIterator i = Iterator(); while (i.MoveNext()) { ClassMetadata clazz = i.CurrentClass(); IReflectClass candidate = clazz.ClassReflector(); if (!candidate.IsInterface()) { if (claxx.IsAssignableFrom(candidate)) { col.Add(clazz); IEnumerator j = new Collection4(col).GetEnumerator(); while (j.MoveNext()) { ClassMetadata existing = (ClassMetadata)j.Current; if (existing != clazz) { ClassMetadata higher = clazz.GetHigherHierarchy(existing); if (higher != null) { if (higher == clazz) { col.Remove(existing); } else { col.Remove(clazz); } } } } } } } return(col); }
public override void LoadFromClassIndexes(ClassMetadataIterator iter) { // duplicates because of inheritance hierarchies ByRef duplicates = new ByRef(); while (iter.MoveNext()) { ClassMetadata classMetadata = iter.CurrentClass(); if (classMetadata.GetName() != null) { IReflectClass claxx = classMetadata.ClassReflector(); if (claxx == null || !(Stream()._handlers.IclassInternal.IsAssignableFrom(claxx))) { IClassIndexStrategy index = classMetadata.Index(); index.TraverseAll(_transaction, new _IVisitor4_130(this, duplicates)); } } } }