Esempio n. 1
0
        public static bool Create(object baseObject, out IEnumerator enumerator)
        {
            object getitem;

            if (Ops.TryGetAttr(baseObject, SymbolTable.GetItem, out getitem))
            {
                enumerator = new ItemEnumerator(baseObject, getitem);
                return(true);
            }
            else
            {
                enumerator = null;
                return(false);
            }
        }
Esempio n. 2
0
        public static bool TryCreate(object baseObject, out IEnumerator enumerator)
        {
            object getitem;

            if (Ops.TryGetAttr(baseObject, SymbolTable.GetItem, out getitem)) {
                enumerator = new ItemEnumerator(getitem);
                return true;
            } else {
                enumerator = null;
                return false;
            }
        }