Exemplo n.º 1
0
        //
        internal virtual void AddMemberImpl(VDMetaMember metaMember)
        {
            VDConcreteMember newMember = newConcreteMember();

            newMember.Meta = metaMember;
            if (metaMember.Type is VDPrimitiveType)
            {
                newMember.Type = this.ModelStore.GetPrimitiveMemberType(metaMember.Type.FullName);
            }
            else
            {
                newMember.Type = this.newInstance(metaMember.Type as VDMetaType);
            }
            this.Members.Add(newMember);
        }
Exemplo n.º 2
0
 internal virtual void ChangeMemberTypeImpl(VDMetaMember metaMember, VDMetaType memberMetaType, VDConcreteMember member)
 {
     if (member.Type != null && member.Type.MembersOfThisType.Count <= 1 && !(member.Type is VDPrimitiveMemberType))
     {
         member.Type.Delete();
     }
     if (memberMetaType is VDPrimitiveType)
     {
         member.Type = this.ModelStore.GetPrimitiveMemberType(memberMetaType.FullName);
     }
     else
     {
         member.Type = this.newInstance(memberMetaType);
     }
 }