When generating delegates attributed types need to be taken into account or proper calling convention won't get picked up.