Esempio n. 1
0
        public ValueHolderEntry(Type targetType, RelationMember member, IBytecodeEnhancer bytecodeEnhancer, IPropertyInfoProvider propertyInfoProvider,
                                IMemberTypeProvider memberTypeProvider)
        {
            this.member     = member;
            this.memberName = member.Name;
            String lastPropertyName = memberName;
            String prefix           = "";

            if (member is IEmbeddedMember)
            {
                IEmbeddedMember embeddedMember = (IEmbeddedMember)member;
                lastPropertyName = embeddedMember.ChildMember.Name;

                prefix = embeddedMember.GetMemberPathString() + ".";
            }
            state       = memberTypeProvider.GetMember(targetType, prefix + ValueHolderIEC.GetInitializedFieldName(lastPropertyName));
            objRefs     = memberTypeProvider.GetMember(targetType, prefix + ValueHolderIEC.GetObjRefsFieldName(lastPropertyName));
            directValue = memberTypeProvider.GetMember(targetType, prefix + lastPropertyName + ValueHolderIEC.GetNoInitSuffix());
        }
Esempio n. 2
0
 public CompositeIdMember(Type declaringType, Type realType, String name, PrimitiveMember[] members, IMemberTypeProvider memberTypeProvider)
 {
     this.declaringType  = declaringType;
     this.realType       = realType;
     this.name           = name;
     this.members        = members;
     fieldIndexOfMembers = new PrimitiveMember[members.Length];
     Type[] paramTypes = new Type[members.Length];
     for (int a = 0, size = members.Length; a < size; a++)
     {
         PrimitiveMember member = members[a];
         fieldIndexOfMembers[a] = memberTypeProvider.GetMember(realType, CompositeIdMember.FilterEmbeddedFieldName(member.Name));
         paramTypes[a]          = member.RealType;
     }
     realTypeConstructorAccess = realType.GetConstructor(paramTypes);
 }