Ejemplo n.º 1
0
 public SameTableElementInfo(Table parentTable, Type valueType, MemberInfo member, SameTableElementInfo parentSameTableElementInfo)
     : base(member, null)
 {
     ParentTable = parentTable;
     ValueType   = valueType;
     ParentSameTableElementInfo = parentSameTableElementInfo;
 }
Ejemplo n.º 2
0
 public ChildRelationInfo(Type parentValueType, Type valueType, MemberInfo member, string elementMemberName, MemberInfo choiceMember,
                          string description, bool isOneToMany, SameTableElementInfo sameTableElementInfo) :
     base(member, choiceMember)
 {
     ExceptionUtils.ThrowIfNull(parentValueType, "parentValueType");
     ExceptionUtils.ThrowIfNull(valueType, "valueType");
     Description       = description;
     IsOneToMany       = isOneToMany;
     ParentValueType   = parentValueType;
     ValueType         = valueType;
     ElementMemberName = elementMemberName;    // This may be different from member.Name if a XmlElementAttribute is used for "public object[] Items"
     if (sameTableElementInfo != null)
     {
         ParentToMemberChain = new List <SameTableElementInfo>();
         SameTableElementInfo nextSameTableElementInfo = sameTableElementInfo;
         do
         {
             ParentToMemberChain.Add(nextSameTableElementInfo);
             nextSameTableElementInfo = sameTableElementInfo.ParentSameTableElementInfo;
         } while (nextSameTableElementInfo != null);
         ParentToMemberChain.Reverse();
     }
 }