public virtual IReflectClass CreateClass(string name, IReflectClass superClass, int fieldCount) { IReflectClass nativeClass = _delegate.ForName(name); GenericClass clazz = new GenericClass(_reflector, nativeClass, name, (GenericClass )superClass); clazz.SetDeclaredFieldCount(fieldCount); return(clazz); }
public virtual IReflectClass ForName(string className) { LogMethodCall("forName", className); IReflectClass klass = RepositoryForName(className); if (null != klass) { return(klass); } return(_delegate.ForName(className)); }
public virtual object DeepClone(object obj) { IReflector reflector = (IReflector)obj; IReflectClass newReflectClass = null; if (_type != null) { newReflectClass = reflector.ForName(_type.GetName()); } return(new Db4objects.Db4o.Reflect.Generic.GenericField(_name, newReflectClass, _primitive )); }
public void TestPrimitiveTypeRepresentation() { ReopenHidingClasses(ExcludedTypes()); IReflector reflector = Db().Ext().Reflector(); foreach (var type in Platform4.PrimitiveTypes()) { var klass = reflector.ForName(TypeReference.FromType(GenericItemTypeFor(type)).GetUnversionedName()); AssertType(reflector, type, FieldType(klass, "simpleField")); AssertType(reflector, NullableTypeFor(type), FieldType(klass, "nullableField")); } }
public static IReflectClass ReflectClassFor(IReflector reflector, object clazz) { if (clazz is IReflectClass) { return((IReflectClass)clazz); } if (clazz is Type) { return(reflector.ForClass((Type)clazz)); } if (clazz is string) { return(reflector.ForName((string)clazz)); } return(reflector.ForObject(clazz)); }
public static IReflectClass ReflectClassFor(IReflector reflector, object clazz) { if (clazz is IReflectClass) { return (IReflectClass)clazz; } if (clazz is Type) { return reflector.ForClass((Type)clazz); } if (clazz is string) { return reflector.ForName((string)clazz); } return reflector.ForObject(clazz); }
public IType Resolve(string typeFQN) { return(Resolve(_reflector.ForName(typeFQN))); }
public IReflectClass ForName(string className) { Console.WriteLine("Reflector.forName({0})", className); return(readReflector.ForName(className)); }