Ejemplo n.º 1
0
        private void ReadStateMachineScope(StateMachineScopeDebugInformation state_machine_scope)
        {
            // TODO: Collection -> List
            if (state_machine_scope.scopes.IsNullOrEmpty())
            {
                return;
            }

            foreach (StateMachineScope scope in state_machine_scope.scopes)
            {
                scope.start = new(GetInstruction(scope.start.Offset));

                Instruction end_instruction = GetInstruction(scope.end.Offset);

                scope.end = end_instruction is null ? new() : new(end_instruction);
            }
        }
Ejemplo n.º 2
0
        private void ReadCustomDebugInformations(MethodDefinition method)
        {
            // TODO: Collection -> List
            Collection <CustomDebugInformation> custom_infos = method.custom_infos;

            for (int i = 0; i < custom_infos.Count; i++)
            {
                StateMachineScopeDebugInformation state_machine_scope = custom_infos[i] as StateMachineScopeDebugInformation;

                if (state_machine_scope is not null)
                {
                    ReadStateMachineScope(state_machine_scope);
                }

                AsyncMethodBodyDebugInformation async_method = custom_infos[i] as AsyncMethodBodyDebugInformation;

                if (async_method is not null)
                {
                    ReadAsyncMethodBody(async_method);
                }
            }
        }