Example #1
0
        private static EntityChildrenListInfo[] GetChildrenListsData(
            FieldInfo[] Fields,
            bool bIsOwner)
        {
            int nListsCount = Fields.Length;

            EntityChildrenListInfo[] ChildrenLists = new EntityChildrenListInfo[nListsCount];

            for (int i = 0; i < nListsCount; i++)
            {
                FieldInfo oField = Fields[i];

                // Obtain ChildrenListAttribute
                ChildrenListAttribute oAttribute = (ChildrenListAttribute)ReflectionUtil.GetAttribute(
                    oField,
                    typeof(ChildrenListAttribute));

                EntityChildrenListInfo oListData = new EntityChildrenListInfo(
                    oField,
                    oAttribute.ElementType,
                    bIsOwner);

                // Put to array
                ChildrenLists[i] = oListData;
            }

            return(ChildrenLists);
        }
Example #2
0
 public EntityChildInfoExternal(
     EntityChildrenListInfo oChildrenListInfo,
     ITisEntityReflection oReflectionExternal)
 {
     m_oChildrenListInfo   = oChildrenListInfo;
     m_oReflectionExternal = oReflectionExternal;
 }
        private static bool ChildrenListFilter_TypeMatch(
            EntityChildrenListInfo oChildrenListInfo,
            object oCriteria)
        {
            Type oRequestedType = (Type)oCriteria;

            if (oRequestedType.IsAssignableFrom(oChildrenListInfo.ChildType))
            {
                return(true);
            }

            return(false);
        }
 private static bool ChildrenListFilter_AllPass(
     EntityChildrenListInfo oChildrenListInfo,
     object oCriteria)
 {
     return(true);
 }