コード例 #1
0
        private bool GetBuilderField()
        {
            stackVariable2 = this.GetStateMachineMethod("SetStateMachine");
            if (stackVariable2 == null)
            {
                dummyVar0      = stackVariable2;
                stackVariable2 = this.GetStateMachineMethod("System.Runtime.CompilerServices.IAsyncStateMachine.SetStateMachine");
            }
            V_0 = stackVariable2;
            if (V_0 == null || V_0.get_Body() == null)
            {
                return(false);
            }
            if (V_0.get_Body().get_Instructions().get_Count() <= 1)
            {
                V_5 = this.stateMachineTypeDef.get_Fields().GetEnumerator();
                try
                {
                    while (V_5.MoveNext())
                    {
                        V_6 = V_5.get_Current();
                        if (!String.op_Equality(V_6.get_FieldType().get_Name(), "AsyncVoidMethodBuilder") && !String.op_Equality(V_6.get_FieldType().get_Name(), "AsyncTaskMethodBuilder") && !String.op_Equality(V_6.get_FieldType().get_Name(), "AsyncTaskMethodBuilder`1"))
                        {
                            continue;
                        }
                        this.builderField = V_6;
                        V_4 = true;
                        goto Label1;
                    }
                    goto Label0;
                }
                finally
                {
                    V_5.Dispose();
                }
            }
            else
            {
                V_1 = V_0.get_Body().get_Instructions().GetEnumerator();
                try
                {
                    while (V_1.MoveNext())
                    {
                        V_2 = V_1.get_Current();
                        if (V_2.get_OpCode().get_Code() != 121)
                        {
                            continue;
                        }
                        this.builderField = ((FieldReference)V_2.get_Operand()).Resolve();
                        V_4 = true;
                        goto Label1;
                    }
                    goto Label0;
                }
                finally
                {
                    V_1.Dispose();
                }
            }
Label1:
            return(V_4);

Label0:
            return(false);
        }