Exemplo n.º 1
0
 private void method_2()
 {
     Class29.Class30 stateMachine = new Class29.Class30();
     stateMachine.class29_0 = this;
     stateMachine.asyncVoidMethodBuilder_0 = AsyncVoidMethodBuilder.Create();
     stateMachine.int_0 = -1;
     stateMachine.asyncVoidMethodBuilder_0.Start <Class29.Class30>(ref stateMachine);
 }
Exemplo n.º 2
0
            void IAsyncStateMachine.MoveNext()
            {
                int int0 = this.int_0;

                try
                {
                    TaskAwaiter awaiter1;
                    int         num;
                    TaskAwaiter awaiter2;
                    switch (int0)
                    {
                    case 0:
                        awaiter2           = this.taskAwaiter_0;
                        this.taskAwaiter_0 = new TaskAwaiter();
                        num        = -1;
                        this.int_0 = -1;
                        goto label_7;

                    case 1:
                        awaiter1           = this.taskAwaiter_0;
                        this.taskAwaiter_0 = new TaskAwaiter();
                        num        = -1;
                        this.int_0 = -1;
                        break;

                    default:
label_5:
                        if (this.class29_0.socket_0 != null)
                        {
                            awaiter2 = Task.Delay(2500).GetAwaiter();
                            if (!awaiter2.IsCompleted)
                            {
                                num                = 0;
                                this.int_0         = 0;
                                this.taskAwaiter_0 = awaiter2;
                                Class29.Class30 stateMachine = this;
                                this.asyncVoidMethodBuilder_0.AwaitUnsafeOnCompleted <TaskAwaiter, Class29.Class30>(ref awaiter2, ref stateMachine);
                                return;
                            }
                            goto label_7;
                        }
                        else
                        {
                            goto label_11;
                        }
                    }
label_4:
                    awaiter1.GetResult();
                    awaiter1      = new TaskAwaiter();
                    this.class1_1 = new Class1((ushort)24833, true);
                    this.class29_0.method_1(this.class1_1);
                    this.class1_0 = (Class1)null;
                    this.class1_1 = (Class1)null;
                    goto label_5;
label_7:
                    awaiter2.GetResult();
                    awaiter2      = new TaskAwaiter();
                    this.class1_0 = new Class1((ushort)8194);
                    this.class29_0.method_1(this.class1_0);
                    awaiter1 = Task.Delay(2500).GetAwaiter();
                    if (!awaiter1.IsCompleted)
                    {
                        num                = 1;
                        this.int_0         = 1;
                        this.taskAwaiter_0 = awaiter1;
                        Class29.Class30 stateMachine = this;
                        this.asyncVoidMethodBuilder_0.AwaitUnsafeOnCompleted <TaskAwaiter, Class29.Class30>(ref awaiter1, ref stateMachine);
                        return;
                    }
                    goto label_4;
                }
                catch (Exception ex)
                {
                    this.int_0 = -2;
                    this.asyncVoidMethodBuilder_0.SetException(ex);
                    return;
                }
label_11:
                this.int_0 = -2;
                this.asyncVoidMethodBuilder_0.SetResult();
            }