static void UpdateMember(IModelRuntimeMember modelRuntimeMember, XPMemberInfo xpMemberInfo) { var modelRuntimeCalculatedMember = modelRuntimeMember as IModelRuntimeCalculatedMember; if (modelRuntimeCalculatedMember != null) { ((XpandCalcMemberInfo)xpMemberInfo).SetAliasExpression(modelRuntimeCalculatedMember.AliasExpression); XpandModuleBase.TypesInfo.RefreshInfo(xpMemberInfo.Owner.ClassType); } }
static void AddAttributes(IModelRuntimeMember runtimeMember, XPCustomMemberInfo memberInfo) { if (runtimeMember.Size != 0) { memberInfo.AddAttribute(new SizeAttribute(runtimeMember.Size)); } if (runtimeMember is IModelRuntimeNonPersistentMember && !(runtimeMember is IModelRuntimeCalculatedMember)) { memberInfo.AddAttribute(new NonPersistentAttribute()); } }
static XpandCustomMemberInfo GetMemberInfo(IModelRuntimeMember modelMember, XPClassInfo xpClassInfo) { if (modelMember is IModelRuntimeCalculatedMember) return xpClassInfo.CreateCalculabeMember(modelMember.Name, modelMember.Type, new Attribute[] { new PersistentAliasAttribute(((IModelRuntimeCalculatedMember)modelMember).AliasExpression) }); if (modelMember is IModelRuntimeOrphanedColection) { var modelRuntimeOrphanedColection = ((IModelRuntimeOrphanedColection)modelMember); return xpClassInfo.CreateCollection(modelMember.Name, modelRuntimeOrphanedColection.CollectionType.TypeInfo.Type, modelRuntimeOrphanedColection.Criteria); } return xpClassInfo.CreateCustomMember(modelMember.Name, modelMember.Type, modelMember is IModelRuntimeNonPersistentMember); }
static XpandCustomMemberInfo GetMemberInfo(IModelRuntimeMember modelMember, XPClassInfo xpClassInfo) { var calculatedMember = modelMember as IModelRuntimeCalculatedMember; if (calculatedMember != null) return xpClassInfo.CreateCalculabeMember(calculatedMember.Name, calculatedMember.Type, calculatedMember.AliasExpression); var member = modelMember as IModelRuntimeOrphanedColection; if (member != null) { var modelRuntimeOrphanedColection = member; return xpClassInfo.CreateCollection(member.Name, modelRuntimeOrphanedColection.CollectionType.TypeInfo.Type, modelRuntimeOrphanedColection.Criteria); } return xpClassInfo.CreateCustomMember(modelMember.Name, modelMember.Type, modelMember is IModelRuntimeNonPersistentMember); }
static XpandCustomMemberInfo GetMemberInfo(IModelRuntimeMember modelMember, XPClassInfo xpClassInfo) { if (modelMember is IModelRuntimeCalculatedMember) { return(xpClassInfo.CreateCalculabeMember(modelMember.Name, modelMember.Type, new Attribute[] { new PersistentAliasAttribute(((IModelRuntimeCalculatedMember)modelMember).AliasExpression) })); } if (modelMember is IModelRuntimeOrphanedColection) { var modelRuntimeOrphanedColection = ((IModelRuntimeOrphanedColection)modelMember); return(xpClassInfo.CreateCollection(modelMember.Name, modelRuntimeOrphanedColection.CollectionType.TypeInfo.Type, modelRuntimeOrphanedColection.Criteria)); } return(xpClassInfo.CreateCustomMember(modelMember.Name, modelMember.Type, modelMember is IModelRuntimeNonPersistentMember)); }
static void AddAttributes(IModelRuntimeMember runtimeMember, XPCustomMemberInfo memberInfo) { if (runtimeMember.Size != 0) memberInfo.AddAttribute(new SizeAttribute(runtimeMember.Size)); if (runtimeMember is IModelRuntimeNonPersistentMember && !(runtimeMember is IModelRuntimeCalculatedMember)) memberInfo.AddAttribute(new NonPersistentAttribute()); }