private static XPMemberInfo CreateMemberCore(IPersistentMemberInfo info) {
     if (info is IPersistentCollectionMemberInfo)
         return info.Owner.PersistentTypeClassInfo.CreateMember(info.Name, typeof(XPCollection), true);
     if (info is IPersistentCoreTypeMemberInfo)
         return info.Owner.PersistentTypeClassInfo.CreateMember(info.Name, Type.GetType("System." + ((IPersistentCoreTypeMemberInfo)info).DataType, true));
     if (info is IPersistentReferenceMemberInfo) {
         var xpClassInfo = info.Owner.PersistentTypeClassInfo.Dictionary.GetClassInfo(((IPersistentReferenceMemberInfo)info).ReferenceType);
         return info.Owner.PersistentTypeClassInfo.CreateMember(info.Name, xpClassInfo);
     }
     throw new NotImplementedException(info.GetType().FullName);
 }
Exemple #2
0
 static string GetPropertyTypeCode(IPersistentMemberInfo persistentMemberInfo)
 {
     if (persistentMemberInfo is IPersistentCoreTypeMemberInfo)
     {
         return(GetCorePropertyTypeCode(persistentMemberInfo));
     }
     if (persistentMemberInfo is IPersistentReferenceMemberInfo persistentReferenceMemberInfo)
     {
         return(CleanFullName((persistentReferenceMemberInfo).ReferenceTypeFullName));
     }
     if (persistentMemberInfo is IPersistentCollectionMemberInfo persistentCollectionMemberInfo)
     {
         return(CleanFullName((persistentCollectionMemberInfo).CollectionTypeFullName));
     }
     throw new NotImplementedException(persistentMemberInfo.GetType().FullName);
 }
Exemple #3
0
 private static XPMemberInfo CreateMemberCore(IPersistentMemberInfo info)
 {
     if (info is IPersistentCollectionMemberInfo)
     {
         return(info.Owner.PersistentTypeClassInfo.CreateMember(info.Name, typeof(XPCollection), true));
     }
     if (info is IPersistentCoreTypeMemberInfo)
     {
         return(info.Owner.PersistentTypeClassInfo.CreateMember(info.Name, Type.GetType("System." + ((IPersistentCoreTypeMemberInfo)info).DataType, true)));
     }
     if (info is IPersistentReferenceMemberInfo)
     {
         var xpClassInfo = info.Owner.PersistentTypeClassInfo.Dictionary.GetClassInfo(((IPersistentReferenceMemberInfo)info).ReferenceType);
         return(info.Owner.PersistentTypeClassInfo.CreateMember(info.Name, xpClassInfo));
     }
     throw new NotImplementedException(info.GetType().FullName);
 }
Exemple #4
0
 static string GetPropertyTypeCode(IPersistentMemberInfo persistentMemberInfo) {
     if (persistentMemberInfo is IPersistentCoreTypeMemberInfo)
         return GetCorePropertyTypeCode(persistentMemberInfo);
     if (persistentMemberInfo is IPersistentReferenceMemberInfo)
         return CleanFullName(((IPersistentReferenceMemberInfo)persistentMemberInfo).ReferenceTypeFullName);
     if (persistentMemberInfo is IPersistentCollectionMemberInfo)
         return CleanFullName(((IPersistentCollectionMemberInfo)persistentMemberInfo).CollectionTypeFullName);
     throw new NotImplementedException(persistentMemberInfo.GetType().FullName);
 }
Exemple #5
0
 static string GetPropertyType(IPersistentMemberInfo persistentMemberInfo){
     if (persistentMemberInfo is IPersistentCoreTypeMemberInfo)
         return Type.GetType("System."+((IPersistentCoreTypeMemberInfo)persistentMemberInfo).DataType).FullName;
     if (persistentMemberInfo is IPersistentReferenceMemberInfo)
         return ((IPersistentReferenceMemberInfo) persistentMemberInfo).ReferenceTypeFullName;
     if (persistentMemberInfo is IPersistentCollectionMemberInfo)
         return ((IPersistentCollectionMemberInfo)persistentMemberInfo).CollectionTypeFullName;
     throw new NotImplementedException(persistentMemberInfo.GetType().FullName);
 }