public static XPClassInfo FindXPClassInfo(this XPObjectSpace objectSpace, Type type) { ITypeInfo typeInfo = objectSpace.TypesInfo.FindTypeInfo(type); var xpoTypeInfoSource = ((XpoTypeInfoSource)objectSpace.GetFieldValue("xpoTypeInfoSource")); if (xpoTypeInfoSource.TypeIsKnown(typeInfo.Type)) { return(xpoTypeInfoSource.GetEntityClassInfo(typeInfo.Type)); } return(null); }