Example #1
0
        private void InitProperties(Type ty, DataComponent oref)
        {
            //Add class props
            foreach (PropertyInfo prop in ty.GetProperties())
            {
                object[] attribs = prop.GetCustomAttributes(typeof(FieldName), false);
                if (attribs.Length > 0)
                {
                    m_table.Add(((FieldName)attribs[0]).Name, new PropertyEntry(prop, oref));
                }
            }

            //Add any joined components
            foreach (MemberInfo mem in ty.GetMembers())
            {
                if (mem.MemberType == MemberTypes.Field)
                {
                    FieldInfo fmem = mem as FieldInfo;
                    if (mem.IsDefined(typeof(JoinedEntity), false))
                    {
                        InitProperties(fmem.FieldType, (DataComponent)fmem.GetValue(oref));
                    }
                }
            }
        }
Example #2
0
        private void InitProperties(Type ty, DataComponent oref)
        {
            //Add class props
            foreach (PropertyInfo prop in ty.GetProperties()) {
                object[] attribs = prop.GetCustomAttributes(typeof(FieldName), false);
                if (attribs.Length > 0)
                    m_table.Add(((FieldName) attribs[0]).Name, new PropertyEntry(prop, oref));
            }

            //Add any joined components
            foreach (MemberInfo mem in ty.GetMembers()) {
                if (mem.MemberType == MemberTypes.Field) {
                    FieldInfo fmem = mem as FieldInfo;
                    if (mem.IsDefined(typeof(JoinedEntity), false))
                        InitProperties(fmem.FieldType, (DataComponent) fmem.GetValue(oref));
                }
            }
        }
Example #3
0
 public PropertyEntry(PropertyInfo prop, DataComponent h)
 {
     Property = prop; Host = h;
 }
Example #4
0
 public PropertyEntry(PropertyInfo prop, DataComponent h)
 {
     Property = prop; Host = h;
 }