Inheritance: CustomDebugInformation
Beispiel #1
0
        private void ReadAsyncMethodBody(AsyncMethodBodyDebugInformation async_method)
        {
            if (async_method.catch_handler.Offset > -1)
            {
                async_method.catch_handler = new InstructionOffset(GetInstruction(async_method.catch_handler.Offset));
            }
            InstructionOffset instructionOffset;

            if (!async_method.yields.IsNullOrEmpty())
            {
                for (int i = 0; i < async_method.yields.Count; i++)
                {
                    Collection <InstructionOffset> yields = async_method.yields;
                    int index = i;
                    instructionOffset = async_method.yields[i];
                    yields[index]     = new InstructionOffset(GetInstruction(instructionOffset.Offset));
                }
            }
            if (!async_method.resumes.IsNullOrEmpty())
            {
                for (int j = 0; j < async_method.resumes.Count; j++)
                {
                    Collection <InstructionOffset> resumes = async_method.resumes;
                    int index2 = j;
                    instructionOffset = async_method.resumes[j];
                    resumes[index2]   = new InstructionOffset(GetInstruction(instructionOffset.Offset));
                }
            }
        }
Beispiel #2
0
        private void ReadCustomDebugInformations(MethodDefinition method)
        {
            Collection <CustomDebugInformation> custom_infos = method.custom_infos;

            for (int i = 0; i < custom_infos.Count; i++)
            {
                StateMachineScopeDebugInformation stateMachineScopeDebugInformation = custom_infos[i] as StateMachineScopeDebugInformation;
                if (stateMachineScopeDebugInformation != null)
                {
                    ReadStateMachineScope(stateMachineScopeDebugInformation);
                }
                AsyncMethodBodyDebugInformation asyncMethodBodyDebugInformation = custom_infos[i] as AsyncMethodBodyDebugInformation;
                if (asyncMethodBodyDebugInformation != null)
                {
                    ReadAsyncMethodBody(asyncMethodBodyDebugInformation);
                }
            }
        }
Beispiel #3
0
        void ReadAsyncMethodBody(AsyncMethodBodyDebugInformation async_method)
        {
            if (async_method.catch_handler.Offset > -1)
            {
                async_method.catch_handler = new InstructionOffset(GetInstruction(async_method.catch_handler.Offset));
            }

            if (!async_method.yields.IsNullOrEmpty())
            {
                for (int i = 0; i < async_method.yields.Count; i++)
                {
                    async_method.yields [i] = new InstructionOffset(GetInstruction(async_method.yields [i].Offset));
                }
            }

            if (!async_method.resumes.IsNullOrEmpty())
            {
                for (int i = 0; i < async_method.resumes.Count; i++)
                {
                    async_method.resumes [i] = new InstructionOffset(GetInstruction(async_method.resumes [i].Offset));
                }
            }
        }
Beispiel #4
0
        void ReadAsyncMethodBody(AsyncMethodBodyDebugInformation async_method)
        {
            if (async_method.catch_handler.Offset > -1)
                async_method.catch_handler = new InstructionOffset (GetInstruction (async_method.catch_handler.Offset));

            if (!async_method.yields.IsNullOrEmpty ())
                for (int i = 0; i < async_method.yields.Count; i++)
                    async_method.yields [i] = new InstructionOffset (GetInstruction (async_method.yields [i].Offset));

            if (!async_method.resumes.IsNullOrEmpty ())
                for (int i = 0; i < async_method.resumes.Count; i++)
                    async_method.resumes [i] = new InstructionOffset (GetInstruction (async_method.resumes [i].Offset));
        }