Example #1
0
        //other variables

        public void MoveNext()
        {
            // Jump table to get back to the right statement upon resumption
            switch (this._state)
            {
            case 1:
                goto Label1;
            }

            var t = new TestAwaiter(true);

            this._awaiter = t.GetAwaiter();

            if (!this._awaiter.IsCompleted)
            {
                this._state = 1;
                this._awaiter.OnCompleted(MoveNext);
                return;
            }
Label1:
            string result = this._awaiter.GetResult();
            var stack = new StackTrace();

            Console.WriteLine(stack);
        }
Example #2
0
        //other variables

        public void MoveNext()
        {
            // Jump table to get back to the right statement upon resumption 
            switch (this._state)
            {
                case 1:
                    goto Label1;
            }

            var t = new TestAwaiter(true);
            this._awaiter = t.GetAwaiter();

            if (!this._awaiter.IsCompleted)
            {
                this._state = 1;
                this._awaiter.OnCompleted(MoveNext);
                return;

            }
            Label1:
            string result = this._awaiter.GetResult();
            var stack = new StackTrace();
            Console.WriteLine(stack);
        }