void ReadStateMachineScope(StateMachineScopeDebugInformation state_machine_scope) { state_machine_scope.start = new InstructionOffset(GetInstruction(state_machine_scope.start.Offset)); var end_instruction = GetInstruction(state_machine_scope.end.Offset); state_machine_scope.end = end_instruction == null ? new InstructionOffset() : new InstructionOffset(end_instruction); }
private void ReadStateMachineScope(StateMachineScopeDebugInformation state_machine_scope) { if (!state_machine_scope.scopes.IsNullOrEmpty()) { foreach (StateMachineScope scope in state_machine_scope.scopes) { scope.start = new InstructionOffset(GetInstruction(scope.start.Offset)); Instruction instruction = GetInstruction(scope.end.Offset); scope.end = ((instruction == null) ? default(InstructionOffset) : new InstructionOffset(instruction)); } } }
void ReadStateMachineScope(StateMachineScopeDebugInformation state_machine_scope) { if (state_machine_scope.scopes.IsNullOrEmpty()) { return; } foreach (var scope in state_machine_scope.scopes) { scope.start = new InstructionOffset(GetInstruction(scope.start.Offset)); var end_instruction = GetInstruction(scope.end.Offset); scope.end = end_instruction == null ? new InstructionOffset() : new InstructionOffset(end_instruction); } }
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 ReadStateMachineScope(StateMachineScopeDebugInformation state_machine_scope) { state_machine_scope.start = new InstructionOffset (GetInstruction (state_machine_scope.start.Offset)); var end_instruction = GetInstruction (state_machine_scope.end.Offset); state_machine_scope.end = end_instruction == null ? new InstructionOffset () : new InstructionOffset (end_instruction); }