Пример #1
0
        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);
        }
Пример #2
0
 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));
         }
     }
 }
Пример #3
0
        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);
            }
        }
Пример #4
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);
                }
            }
        }
Пример #5
0
        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);
        }