コード例 #1
0
        internal bool MoveNext(ref TokenBasedSetEnumerator e)
        {
            switch (this.m_cElt)
            {
            case 0:
                return(false);

            case 1:
                if (e.Index != -1)
                {
                    e.Index   = (short)(this.m_maxIndex + 1);
                    e.Current = null;
                    return(false);
                }
                e.Index   = this.m_maxIndex;
                e.Current = this.m_Obj;
                return(true);
            }
            while (++e.Index <= this.m_maxIndex)
            {
                e.Current = this.m_Set[e.Index];
                if (e.Current != null)
                {
                    return(true);
                }
            }
            e.Current = null;
            return(false);
        }
コード例 #2
0
        internal bool MoveNext(ref TokenBasedSetEnumerator e)
        {
            switch (this.m_cElt)
            {
            case 0:
                return(false);

            case 1:
                if (e.Index == -1)
                {
                    e.Index   = this.m_maxIndex;
                    e.Current = this.m_Obj;
                    return(true);
                }
                e.Index   = (int)(short)(this.m_maxIndex + 1);
                e.Current = (object)null;
                return(false);

            default:
                do
                {
                    // ISSUE: explicit reference operation
                    // ISSUE: variable of a reference type
                    int& local = @e.Index;
                    // ISSUE: explicit reference operation
                    int num1 = ^ local + 1;
                    int num2 = num1;
                    // ISSUE: explicit reference operation
                    ^ local = num2;
                    if (num1 <= this.m_maxIndex)
                    {
                        e.Current = Volatile.Read <object>(ref this.m_Set[e.Index]);
                    }
                    else
                    {
                        goto label_8;
                    }
                }while (e.Current == null);
                return(true);

label_8:
                e.Current = (object)null;
                return(false);
            }
コード例 #3
0
        internal bool MoveNext(ref TokenBasedSetEnumerator e)
        {
            switch (m_cElt)
            {
            case 0:
                return(false);

            case 1:
                if (e.Index == -1)
                {
                    e.Index   = m_maxIndex;
                    e.Current = m_Obj;
                    return(true);
                }
                else
                {
                    e.Index   = (short)(m_maxIndex + 1);
                    e.Current = null;
                    return(false);
                }

            default:
                while (++e.Index <= m_maxIndex)
                {
                    e.Current = Volatile.Read(ref m_Set[e.Index]);

                    if (e.Current != null)
                    {
                        return(true);
                    }
                }

                e.Current = null;
                return(false);
            }
        }
コード例 #4
0
        // Token: 0x06002B45 RID: 11077 RVA: 0x000A0F14 File Offset: 0x0009F114
        internal bool MoveNext(ref TokenBasedSetEnumerator e)
        {
            int num = this.m_cElt;

            if (num == 0)
            {
                return(false);
            }
            if (num != 1)
            {
                do
                {
                    num     = e.Index + 1;
                    e.Index = num;
                    if (num > this.m_maxIndex)
                    {
                        goto Block_5;
                    }
                    e.Current = Volatile.Read <object>(ref this.m_Set[e.Index]);
                }while (e.Current == null);
                return(true);

Block_5:
                e.Current = null;
                return(false);
            }
            if (e.Index == -1)
            {
                e.Index   = this.m_maxIndex;
                e.Current = this.m_Obj;
                return(true);
            }
            e.Index   = (int)((short)(this.m_maxIndex + 1));
            e.Current = null;
            return(false);
        }
コード例 #5
0
        internal bool MoveNext(ref TokenBasedSetEnumerator e)
        {
            switch (m_cElt)
            {
            case 0:
                return false;

            case 1:
                if (e.Index == -1)
                {
                    e.Index = m_maxIndex;
                    e.Current = m_Obj;
                    return true;
                }
                else
                {
                    e.Index = (short)(m_maxIndex+1);
                    e.Current = null;
                    return false;
                }

            default:
                while (++e.Index <= m_maxIndex)
                {
                    e.Current = Volatile.Read(ref m_Set[e.Index]);
                    
                    if (e.Current != null)
                        return true;
                }

                e.Current = null;
                return false;
            }
        }
コード例 #6
0
        internal bool MoveNext(ref TokenBasedSetEnumerator e)
        {
            switch (this.m_cElt)
            {
                case 0:
                    return false;

                case 1:
                    if (e.Index != -1)
                    {
                        e.Index = (short) (this.m_maxIndex + 1);
                        e.Current = null;
                        return false;
                    }
                    e.Index = this.m_maxIndex;
                    e.Current = this.m_Obj;
                    return true;
            }
            while (++e.Index <= this.m_maxIndex)
            {
                e.Current = this.m_Set[e.Index];
                if (e.Current != null)
                {
                    return true;
                }
            }
            e.Current = null;
            return false;
        }