예제 #1
0
        public static bool IsAllowedEntityCollection(CslaObjectInfo objectInfo)
        {
            if (objectInfo.IsEditableChildCollection() ||
                objectInfo.IsReadOnlyCollection())
            {
                return(true);
            }

            return(false);
        }
예제 #2
0
        // TODO Same "IsChildType" name but different results!!! When fixing, check also templates.
        public static bool IsChildType(this CslaObjectInfo info)
        {
            if (info.IsEditableSwitchable() ||
                info.IsEditableChild() ||
                info.IsEditableChildCollection() ||
                ((info.IsReadOnlyObject() ||
                  info.IsReadOnlyCollection()) &&
                 info.ParentType != string.Empty))
            {
                return(true);
            }

            return(false);
        }
예제 #3
0
        public static bool IsCompatibleEntityCollectionItemPair(CslaObjectInfo collectionObjectInfo, CslaObjectInfo itemObjectInfo)
        {
            if (collectionObjectInfo.IsEditableChildCollection() &&
                itemObjectInfo.IsEditableChild())
            {
                return(true);
            }
            if (collectionObjectInfo.IsReadOnlyCollection() &&
                itemObjectInfo.IsReadOnlyObject())
            {
                return(true);
            }

            return(false);
        }
예제 #4
0
 public static bool IsNotEditableChildCollection(this CslaObjectInfo info)
 {
     return(!info.IsEditableChildCollection());
 }