void RuntimeMemberBuilderOnCustomCreateMember(object sender, CustomCreateMemberArgs customCreateMemberArgs) { if (customCreateMemberArgs.ModelMemberEx is IModelMemberAuditTrail modelMemberAuditTrail) { XPClassInfo owner = modelMemberAuditTrail.ModelClass.TypeInfo.QueryXPClassInfo(); if (owner.FindMember(modelMemberAuditTrail.Name) == null) { new AuditTrailCollectionMemberInfo(owner, modelMemberAuditTrail.Name, modelMemberAuditTrail.CollectionType.TypeInfo.Type); } customCreateMemberArgs.Handled = true; } }
void RuntimeMemberBuilderOnCustomCreateMember(object sender, CustomCreateMemberArgs customCreateMemberArgs) { var modelMemberAuditTrail = customCreateMemberArgs.ModelMemberEx as IModelMemberAuditTrail; if (modelMemberAuditTrail != null) { XPClassInfo owner = Dictiorary.GetClassInfo(modelMemberAuditTrail.ModelClass.TypeInfo.Type); if (owner.FindMember(modelMemberAuditTrail.Name) == null) { new AuditTrailCollectionMemberInfo(owner, modelMemberAuditTrail.Name, modelMemberAuditTrail.CollectionType.TypeInfo.Type); } customCreateMemberArgs.Handled = true; } }