public override IPreparedComparison PrepareComparison(ObjectContainerBase container , object constraint) { Db4objects.Db4o.Internal.ClassMetadata classMetadata = ClassMetadata(); if (classMetadata == null) { return(null); } return(classMetadata.PrepareComparison(container.Transaction.Context(), constraint )); }
internal virtual IPreparedComparison PrepareComparison(ObjectContainerBase container , object constraint) { IContext context = container.Transaction.Context(); if (_fieldMetadata != null) { return(_fieldMetadata.PrepareComparison(context, constraint)); } if (_classMetadata != null) { return(_classMetadata.PrepareComparison(context, constraint)); } IReflector reflector = container.Reflector(); Db4objects.Db4o.Internal.ClassMetadata classMetadata = null; if (_bytes != null) { classMetadata = container.ProduceClassMetadata(reflector.ForObject(constraint)); } else { if (_member != null) { classMetadata = container.ClassMetadataForReflectClass(reflector.ForObject(_member )); } } if (classMetadata != null) { if (_member != null && _member.GetType().IsArray) { ITypeHandler4 arrayElementTypehandler = classMetadata.TypeHandler(); if (reflector.Array().IsNDimensional(MemberClass())) { MultidimensionalArrayHandler mah = new MultidimensionalArrayHandler(arrayElementTypehandler , false); return(mah.PrepareComparison(context, _member)); } ArrayHandler ya = new ArrayHandler(arrayElementTypehandler, false); return(ya.PrepareComparison(context, _member)); } return(classMetadata.PrepareComparison(context, constraint)); } return(null); }