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)); } } }
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); } } }
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)); } } }
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)); }