Ejemplo n.º 1
0
        public System.Collections.IDictionaryEnumerator[] GetEnumerators()
        {
            if (!didopen)
            {
                throw new Exception("Attempted to GetEnumerators before Open");
            }

            System.Collections.IDictionaryEnumerator[] results;
            lock (dslaves)
            {
                byte enumid = nextenumid;
                if (nextenumid >= 32)
                {
                    nextenumid = 0;
                }
                else
                {
                    nextenumid++;
                }

                int i;
                results = new System.Collections.IDictionaryEnumerator[dslaves.Count];

                i = 0;
                foreach (SlaveInfo slave in dslaves)
                {
                    results[i++] = new HashtablePartEnumerator(slave, enumid);
                }
            }
            return(results);
        }
Ejemplo n.º 2
0
        public System.Collections.IDictionaryEnumerator[] GetEnumerators()
        {
            if (!didopen)
            {
                throw new Exception("Attempted to GetEnumerators before Open");
            }

            System.Collections.IDictionaryEnumerator[] results;
            lock (dslaves)
            {
                byte enumid = nextenumid;
                if (nextenumid >= 32)
                    nextenumid = 0;
                else
                    nextenumid++;

                int i;
                results = new System.Collections.IDictionaryEnumerator[dslaves.Count];

                i = 0;
                foreach (SlaveInfo slave in dslaves)
                {
                    results[i++] = new HashtablePartEnumerator(slave, enumid);
                }
            }
            return results;
        }